Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Issue 2783683002: Log source_dependency in HTTP2_SESSION_SEND_HEADERS. (Closed)

Created:
3 years, 8 months ago by Bence
Modified:
3 years, 8 months ago
Reviewers:
Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org, bnc+watch_chromium.org, fuzzing_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Log source_dependency in HTTP2_SESSION_SEND_HEADERS. Pass in HttpStreamFactoryImpl::Job's NetLog source as source_dependency to SpdyHttpStream and BidirectionalStreamSpdyImpl, where it is saved in a private member. Save HttpProxyClientSocketWrapper's NetLog source in SpdyProxyClientSocket constructor (NetLog object was already passed in). Add SpdyStream::Delegate::source_dependency() and log it in SpdySession::CreateHeaders(). Add dummy implementation to test-only classes FuzzerDelegate, SessionOpeningDelegate, ClosingDelegate, and StreamDelegateBase. Example NetLog excerpt: 1567: HTTP_STREAM_JOB https://clients1.google.com/ Start Time: 2017-03-29 09:09:35.617 t=9692 [st= 0] +HTTP_STREAM_JOB [dt=74] --> alternative_service = "unknown :0" --> original_url = "https://clients1.google.com/" --> priority = "LOWEST" --> source_dependency = 1566 (HTTP_STREAM_JOB_CONTROLLER) --> url = "https://clients1.google.com/" [...] t=9764 [st=72] HTTP2_SESSION_POOL_IMPORTED_SESSION_FROM_SOCKET --> source_dependency = 1576 (HTTP2_SESSION) t=9766 [st=74] HTTP_STREAM_JOB_BOUND_TO_REQUEST --> source_dependency = 1565 (URL_REQUEST) t=9766 [st=74] -HTTP_STREAM_JOB 1576: HTTP2_SESSION clients1.google.com:443 (DIRECT) Start Time: 2017-03-29 09:09:35.688 t= 9763 [st= 0] +HTTP2_SESSION [dt=318+] --> host = "clients1.google.com:443" --> proxy = "DIRECT" t= 9763 [st= 0] HTTP2_SESSION_INITIALIZED --> protocol = "h2" --> source_dependency = 1573 (SOCKET) [...] t= 9768 [st= 5] HTTP2_SESSION_SEND_HEADERS --> exclusive = true --> fin = false --> has_priority = true --> :method: POST :authority: clients1.google.com :scheme: https :path: /tbproxy/af/query?client=Chromium content-length: 113 content-type: text/proto user-agent: [...] accept-encoding: gzip, deflate, br accept-language: en-US,en;q=0.8 --> parent_stream_id = 0 --> source_dependency = 1567 (HTTP_STREAM_JOB) --> stream_id = 1 --> weight = 147 t= 9769 [st= 6] HTTP2_SESSION_SEND_DATA --> fin = true --> size = 113 --> stream_id = 1 [...] 1567 HTTP_STREAM_JOB's HTTP2_SESSION_POOL_IMPORTED_SESSION_FROM_SOCKET already had a source_dependency pointing to 1576 HTTP2_SESSION before this CL. This CL adds the reverse direction: 1576 HTTP2_SESSION's HTTP2_SESSION_SEND_HEADERS now has a source_dependency pointing to 1567 HTTP_STREAM_JOB. BUG=705967 Review-Url: https://codereview.chromium.org/2783683002 Cr-Commit-Position: refs/heads/master@{#460365} Committed: https://chromium.googlesource.com/chromium/src/+/3d95ca9fd487e0a0dd2617eee0f683eea7a7bed0

Patch Set 1 #

Patch Set 2 : Nit. #

Patch Set 3 : Fix use-after-free. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -48 lines) Patch
M net/http/http_stream_factory_impl.h View 2 chunks +3 lines, -1 line 0 comments Download
M net/http/http_stream_factory_impl.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M net/http/http_stream_factory_impl_job.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M net/http/http_stream_factory_impl_job_controller.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M net/spdy/bidirectional_stream_spdy_impl.h View 4 chunks +5 lines, -2 lines 0 comments Download
M net/spdy/bidirectional_stream_spdy_impl.cc View 2 chunks +7 lines, -1 line 0 comments Download
M net/spdy/bidirectional_stream_spdy_impl_unittest.cc View 2 chunks +1 line, -2 lines 0 comments Download
M net/spdy/spdy_http_stream.h View 4 chunks +6 lines, -1 line 0 comments Download
M net/spdy/spdy_http_stream.cc View 2 chunks +7 lines, -1 line 0 comments Download
M net/spdy/spdy_http_stream_unittest.cc View 16 chunks +21 lines, -23 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket.h View 3 chunks +3 lines, -0 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket.cc View 3 chunks +5 lines, -1 line 0 comments Download
M net/spdy/spdy_session.h View 2 chunks +7 lines, -4 lines 0 comments Download
M net/spdy/spdy_session.cc View 5 chunks +7 lines, -3 lines 0 comments Download
M net/spdy/spdy_session_fuzzer.cc View 1 2 chunks +5 lines, -0 lines 0 comments Download
M net/spdy/spdy_session_pool_unittest.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M net/spdy/spdy_stream.h View 2 chunks +3 lines, -0 lines 0 comments Download
M net/spdy/spdy_stream.cc View 1 chunk +2 lines, -1 line 0 comments Download
M net/spdy/spdy_stream_test_util.h View 3 chunks +3 lines, -0 lines 0 comments Download
M net/spdy/spdy_stream_test_util.cc View 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (17 generated)
Bence
Ryan: PTAL. Thank you. Note that NetLogSource is an enum plus an uint32_t, so I ...
3 years, 8 months ago (2017-03-28 19:01:28 UTC) #14
Ryan Hamilton
I think this LGTM, but can you include an example txt output of what ends ...
3 years, 8 months ago (2017-03-28 21:17:59 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2783683002/40001
3 years, 8 months ago (2017-03-29 13:15:58 UTC) #18
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 13:21:27 UTC) #21
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/3d95ca9fd487e0a0dd2617eee0f6...

Powered by Google App Engine
This is Rietveld 408576698