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

Issue 200723004: Fix SPDY error-handling if the connection gets closed just after use. (Closed)

Created:
6 years, 9 months ago by davidben
Modified:
6 years, 9 months ago
Reviewers:
Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org, mmenke, Johnny
Visibility:
Public.

Description

Fix SPDY error-handling if the connection gets closed just after use. - Make SpdySession::IsReused() return true if the underlying socket was UNUSED_IDLE. This makes the HttpNetworkTransaction-level retry try a fresh socket in case a preconnected socket was stale. - If the SpdySession closes in an event loop iteration between HttpStreamFactoryImplJob::DoCreateStream and OnNewSpdySessionReadyCallback, propogate the error to the request to prevent it from hanging. Do so by creating the originating request's SpdyHttpStream as soon as the SpdySession is created so it can sample SpdySession::IsReused() and advise HttpNetworkTransaction on error. - Delay pumping the SpdySession read loop by an event loop iteration. This simplifies some logic and ensures that HttpNetworkTransaction receives a SpdyHttpStream to advise retry logic. This does mean we lose the error code; it now follows the asynchronous case and turns into ERR_CONNECTION_CLOSED in SpdyHttpStream::InitializeStream. BUG=352156 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=258647

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -144 lines) Patch
M net/http/http_network_transaction_unittest.cc View 6 chunks +93 lines, -29 lines 0 comments Download
M net/http/http_proxy_client_socket_pool.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M net/http/http_stream_factory_impl_job.cc View 2 chunks +20 lines, -11 lines 0 comments Download
M net/http/http_stream_factory_impl_request.h View 2 chunks +2 lines, -0 lines 0 comments Download
M net/http/http_stream_factory_impl_request.cc View 2 chunks +17 lines, -13 lines 0 comments Download
M net/spdy/spdy_session.h View 3 chunks +10 lines, -10 lines 0 comments Download
M net/spdy/spdy_session.cc View 5 chunks +18 lines, -22 lines 0 comments Download
M net/spdy/spdy_session_pool.h View 1 chunk +4 lines, -5 lines 0 comments Download
M net/spdy/spdy_session_pool.cc View 3 chunks +7 lines, -14 lines 0 comments Download
M net/spdy/spdy_session_unittest.cc View 4 chunks +10 lines, -7 lines 0 comments Download
M net/spdy/spdy_test_util_common.h View 2 chunks +9 lines, -6 lines 0 comments Download
M net/spdy/spdy_test_util_common.cc View 4 chunks +18 lines, -22 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
davidben
Split off from https://codereview.chromium.org/169643006/. rch: For review. It contains the one-line change you reviewed in ...
6 years, 9 months ago (2014-03-18 23:02:33 UTC) #1
Ryan Hamilton
Sorry for the delay! This change looks promising, but I'm not sure I understand why ...
6 years, 9 months ago (2014-03-21 00:39:12 UTC) #2
davidben
On 2014/03/21 00:39:12, Ryan Hamilton wrote: > Sorry for the delay! > > This change ...
6 years, 9 months ago (2014-03-21 00:51:51 UTC) #3
Ryan Hamilton
LGTM. After discussing this offline, I think this approach is good. I'm nervous about changing ...
6 years, 9 months ago (2014-03-21 15:49:02 UTC) #4
davidben
The CQ bit was checked by davidben@chromium.org
6 years, 9 months ago (2014-03-21 15:54:42 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davidben@chromium.org/200723004/1
6 years, 9 months ago (2014-03-21 15:54:46 UTC) #6
commit-bot: I haz the power
Change committed as 258647
6 years, 9 months ago (2014-03-21 19:35:32 UTC) #7
vandebo (ex-Chrome)
6 years, 9 months ago (2014-03-21 20:15:46 UTC) #8
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/208663003/ by vandebo@chromium.org.

The reason for reverting is: Linux LSan isn't happy: AddressSanitizer:
stack-buffer-overflow

http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%2BLSan%20Te....

Powered by Google App Engine
This is Rietveld 408576698