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

Issue 337823002: Stop attempting to write to transport sockets in NSS on failure. (Closed)

Created:
6 years, 6 months ago by davidben
Modified:
6 years, 3 months ago
Reviewers:
wtc, Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Stop attempting to write to transport sockets in NSS on failure. On failure, future transport writes should synchronously return. This is important on Chrome OS and Linux where we have a separate NSS task runner. If we query the transport each time (in hopes that it will return the error code) it becomes an asynchronous error and so the state machine keeps pumping itself in response to the state change. (It alternates between "write pending" and "write failed".) Add a test that asserts we do not keep trying to write to the transport in a loop. This fixes one of the infinite loops in bug #381160, but not the other. BUG=381160 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278014

Patch Set 1 #

Patch Set 2 : document CountingStreamSocket (try jobs on patch set 1) #

Total comments: 10

Patch Set 3 : wtc comments #

Patch Set 4 : rsleevi comments #

Total comments: 11

Patch Set 5 : more comments #

Total comments: 2

Patch Set 6 : Update ssl_server_socket_nss.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -10 lines) Patch
M net/base/nss_memio.h View 1 2 3 4 1 chunk +6 lines, -5 lines 0 comments Download
M net/base/nss_memio.c View 1 2 3 4 1 chunk +7 lines, -3 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 1 2 3 4 3 chunks +102 lines, -0 lines 0 comments Download
M net/socket/ssl_server_socket_nss.cc View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 19 (0 generated)
davidben
I'm not super-thrilled with the test, but asserting that we do not do something is ...
6 years, 6 months ago (2014-06-13 21:30:32 UTC) #1
wtc
Patch set 2 LGTM. https://codereview.chromium.org/337823002/diff/20001/net/socket/ssl_client_socket_nss.cc File net/socket/ssl_client_socket_nss.cc (right): https://codereview.chromium.org/337823002/diff/20001/net/socket/ssl_client_socket_nss.cc#newcode960 net/socket/ssl_client_socket_nss.cc:960: transport_send_error_(0), I assume transport_send_error_ is ...
6 years, 6 months ago (2014-06-16 19:57:21 UTC) #2
wtc
David: I forgot to mention that I only reviewed your CL but did not read ...
6 years, 6 months ago (2014-06-16 19:58:44 UTC) #3
davidben
On 2014/06/16 19:58:44, wtc wrote: > David: > > I forgot to mention that I ...
6 years, 6 months ago (2014-06-16 20:15:24 UTC) #4
Ryan Sleevi
https://codereview.chromium.org/337823002/diff/20001/net/socket/ssl_client_socket_nss.cc File net/socket/ssl_client_socket_nss.cc (right): https://codereview.chromium.org/337823002/diff/20001/net/socket/ssl_client_socket_nss.cc#newcode2145 net/socket/ssl_client_socket_nss.cc:2145: return transport_send_error_; Why introduce another member, when we already ...
6 years, 6 months ago (2014-06-16 22:07:07 UTC) #5
davidben
https://codereview.chromium.org/337823002/diff/20001/net/socket/ssl_client_socket_nss.cc File net/socket/ssl_client_socket_nss.cc (right): https://codereview.chromium.org/337823002/diff/20001/net/socket/ssl_client_socket_nss.cc#newcode960 net/socket/ssl_client_socket_nss.cc:960: transport_send_error_(0), On 2014/06/16 19:57:21, wtc wrote: > > I ...
6 years, 6 months ago (2014-06-16 23:02:13 UTC) #6
Ryan Sleevi
https://codereview.chromium.org/337823002/diff/60001/net/socket/ssl_client_socket_unittest.cc File net/socket/ssl_client_socket_unittest.cc (right): https://codereview.chromium.org/337823002/diff/60001/net/socket/ssl_client_socket_unittest.cc#newcode1418 net/socket/ssl_client_socket_unittest.cc:1418: loop.Run(); What about using RunUntilIdle here? Or explicitly scoping ...
6 years, 6 months ago (2014-06-17 00:56:32 UTC) #7
wtc
Patch set 4 LGTM. https://codereview.chromium.org/337823002/diff/60001/net/base/nss_memio.h File net/base/nss_memio.h (right): https://codereview.chromium.org/337823002/diff/60001/net/base/nss_memio.h#newcode98 net/base/nss_memio.h:98: * has been no error. ...
6 years, 6 months ago (2014-06-17 18:24:06 UTC) #8
Ryan Sleevi
LGTM as well; the testing comment I think is more a nit/suggestion than something I ...
6 years, 6 months ago (2014-06-17 19:43:40 UTC) #9
davidben
https://codereview.chromium.org/337823002/diff/60001/net/base/nss_memio.h File net/base/nss_memio.h (right): https://codereview.chromium.org/337823002/diff/60001/net/base/nss_memio.h#newcode98 net/base/nss_memio.h:98: * has been no error. On 2014/06/17 18:24:06, wtc ...
6 years, 6 months ago (2014-06-17 20:27:43 UTC) #10
davidben
The CQ bit was checked by davidben@chromium.org
6 years, 6 months ago (2014-06-17 20:51:57 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davidben@chromium.org/337823002/80001
6 years, 6 months ago (2014-06-17 20:52:23 UTC) #12
wtc
Review comments on patch set 5: https://codereview.chromium.org/337823002/diff/80001/net/socket/ssl_client_socket_nss.cc File net/socket/ssl_client_socket_nss.cc (right): https://codereview.chromium.org/337823002/diff/80001/net/socket/ssl_client_socket_nss.cc#newcode2146 net/socket/ssl_client_socket_nss.cc:2146: if (memio_GetWriteParams(nss_bufs_, &buf1, ...
6 years, 6 months ago (2014-06-17 22:48:55 UTC) #13
davidben
The CQ bit was unchecked by davidben@chromium.org
6 years, 6 months ago (2014-06-17 23:01:38 UTC) #14
davidben
Whoops. Removed from CQ. https://codereview.chromium.org/337823002/diff/80001/net/socket/ssl_client_socket_nss.cc File net/socket/ssl_client_socket_nss.cc (right): https://codereview.chromium.org/337823002/diff/80001/net/socket/ssl_client_socket_nss.cc#newcode2146 net/socket/ssl_client_socket_nss.cc:2146: if (memio_GetWriteParams(nss_bufs_, &buf1, &len1, &buf2, ...
6 years, 6 months ago (2014-06-17 23:04:44 UTC) #15
wtc
Patch set 6 LGTM.
6 years, 6 months ago (2014-06-17 23:11:33 UTC) #16
davidben
The CQ bit was checked by davidben@chromium.org
6 years, 6 months ago (2014-06-17 23:45:53 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davidben@chromium.org/337823002/100001
6 years, 6 months ago (2014-06-17 23:47:37 UTC) #18
commit-bot: I haz the power
6 years, 6 months ago (2014-06-18 10:22:28 UTC) #19
Message was sent while issue was closed.
Change committed as 278014

Powered by Google App Engine
This is Rietveld 408576698