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

Issue 174287: Resend on IO errors on late bound sockets that were idle. (Closed)

Created:
11 years, 4 months ago by willchan no longer on Chromium
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Resend on IO errors on late bound sockets that were idle. According to UMA data, late bound sockets that were idle are significantly more likely to get (reset/close/abort) errors. Currently, we don't resend on late bound sockets that were idle because they weren't reused. This changes that. TODO: determine how long a socket has to be idle before it is likely to get a TCP RST if we try to reuse it. Also document the ClientSocketHandle::ReuseSocketType values. BUG=http://crbug.com/18192. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=24084

Patch Set 1 #

Patch Set 2 : Add comments for ClientSocketHandle::SocketReuseType. #

Total comments: 2

Patch Set 3 : Update comment. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -4 lines) Patch
M net/http/http_network_transaction.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M net/socket/client_socket_handle.h View 1 chunk +3 lines, -3 lines 1 comment Download

Messages

Total messages: 19 (0 generated)
willchan no longer on Chromium
11 years, 4 months ago (2009-08-22 00:46:26 UTC) #1
wtc
LGTM. You should document the three SocketReuseType values in client_socket_handle.h.
11 years, 4 months ago (2009-08-22 01:07:12 UTC) #2
willchan no longer on Chromium
On 2009/08/22 01:07:12, wtc wrote: > LGTM. > > You should document the three SocketReuseType ...
11 years, 4 months ago (2009-08-22 01:39:32 UTC) #3
wtc
http://codereview.chromium.org/174287/diff/4/1003 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/174287/diff/4/1003#newcode1557 Line 1557: // We didn't use an idle socket. I ...
11 years, 4 months ago (2009-08-22 02:05:13 UTC) #4
willchan no longer on Chromium
http://codereview.chromium.org/174287/diff/4/1003 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/174287/diff/4/1003#newcode1557 Line 1557: // We didn't use an idle socket. On ...
11 years, 4 months ago (2009-08-22 02:17:09 UTC) #5
darin (slow to review)
I'm confused by this change. If the idle time is very short for a late-bound ...
11 years, 4 months ago (2009-08-24 16:54:41 UTC) #6
willchan no longer on Chromium
I don't think the RST errors are a function of whether or not the newly ...
11 years, 4 months ago (2009-08-24 17:34:37 UTC) #7
willchan no longer on Chromium
Woops, I forgot to mention which histograms to look at. Take a look at the ...
11 years, 4 months ago (2009-08-24 17:40:38 UTC) #8
wtc
On 2009/08/24 16:54:41, darin wrote: > > I think it is a mistake to keep ...
11 years, 4 months ago (2009-08-24 17:49:02 UTC) #9
willchan no longer on Chromium
Yeah, I know both of you said this :) Do you guys still stand by ...
11 years, 4 months ago (2009-08-24 17:54:53 UTC) #10
willchan no longer on Chromium
That's a very valid concern. I'm happy to change it only to retry on the ...
11 years, 4 months ago (2009-08-24 17:56:32 UTC) #11
darin (slow to review)
So, I think what you are doing is safe for the RST case since that ...
11 years, 4 months ago (2009-08-24 17:57:13 UTC) #12
willchan no longer on Chromium
On Mon, Aug 24, 2009 at 10:54 AM, Darin Fisher<darin@chromium.org> wrote: > Backing up a ...
11 years, 4 months ago (2009-08-24 17:57:27 UTC) #13
darin (slow to review)
On Mon, Aug 24, 2009 at 10:56 AM, William Chan (=B3=C2=D6=C7=B2=FD) <willchan@chromium.org>wrote: > On Mon, ...
11 years, 4 months ago (2009-08-24 17:59:06 UTC) #14
darin (slow to review)
Backing up a second... I agree that finding the right timeout value is the best ...
11 years, 4 months ago (2009-08-24 18:06:08 UTC) #15
wtc
Yes, ERR_CONNECTION_CLOSED isn't returned by socket functions when TCP is used. I looked into ERR_CONNECTION_CLOSED ...
11 years, 4 months ago (2009-08-24 18:18:38 UTC) #16
darin (slow to review)
On Mon, Aug 24, 2009 at 11:18 AM, <wtc@chromium.org> wrote: > Yes, ERR_CONNECTION_CLOSED isn't returned ...
11 years, 4 months ago (2009-08-24 20:56:29 UTC) #17
wtc
On 2009/08/24 20:56:29, darin wrote: > On Mon, Aug 24, 2009 at 11:18 AM, <mailto:wtc@chromium.org> ...
11 years, 4 months ago (2009-08-26 00:48:30 UTC) #18
darin (slow to review)
11 years, 4 months ago (2009-08-26 04:51:33 UTC) #19
On Tue, Aug 25, 2009 at 5:48 PM, <wtc@chromium.org> wrote:

> On 2009/08/24 20:56:29, darin wrote:
>
>> On Mon, Aug 24, 2009 at 11:18 AM, <mailto:wtc@chromium.org> wrote:
>>
>
>  > We should take this opportunity to define exactly what
>> > ERR_CONNECTION_CLOSED means because our error handling
>> > depends on this error code.  Perhaps we should add a new
>> > error code for SOCKS and other layered protocols, and remove
>> > ERR_CONNECTION_CLOSED.
>> >
>> >
>> +1
>>
>
>  What is the SOCKS use case?
>>
>
> SOCKS uses ERR_CONNECTION_CLOSED to mean the SOCKS
> layer gets an unexpected EOF (0, as opposed to an
> error like ECONNRESET) from the underlying socket.
> This is a reasonable interpretation of ERR_CONNECTION_CLOSED
> in a layered protocol.
>
> Should we define ERR_CONNECTION_CLOSED that way?
>
>
Maybe



> Or should we add a new error code ERR_UNEXPECTED_EOF
> (or more verbosely, ERR_UNDERLYING_CONNECTION_CLOSED)?
>


It seems like what we want is a signal from the socket that tells us whether
or not data that we wrote to it was delivered.  This is what TCP RST means
(closed without all sent packets receiving an ACK), so maybe the SOCKS layer
should just be returning ERR_CONNECTION_RESET if it finds the underlying
connection to be prematurely closed after it has accepted data from the
application layer.

-Darin





>
> Note: we could also use an *internal* error code ERR_EOF
> in two places to disambiguate a rv of 0 in DoLoop, which
> may mean
> - we read and reached EOF, or
> - we didn't need to read for some reason, for example,
>  in a HTTP response with a known length, we've reached
>  the end of the response body on a keep-alive connection
>  (hence no EOF).
> Right now we're using additional bool members to help
> disambiguate the 0 rv value.
>
>
> http://codereview.chromium.org/174287
>

Powered by Google App Engine
This is Rietveld 408576698