Closed
Bug 1214981
Opened 4 years ago
Closed 4 years ago
Intermittent test_weak_crypto.js | - Actual and expected connection result should match - 2153394174 == 2152398868
Categories
(Core :: Security, defect)
Core
Security
Not set
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: philor, Assigned: emk)
References
Details
(Keywords: intermittent-failure)
Attachments
(1 file, 1 obsolete file)
4.20 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
This has been failing quite frequently (at least two hundred times in two days) ever since bug 1168635 landed. I'd like to avoid having to back that out since you've landed UI on top of it. Could you look into this, Masatoshi-san?
Flags: needinfo?(VYV03354)
Assignee | ||
Comment 6•4 years ago
|
||
But please disable the test instead of reverting the entire patch. Looks like this is an existing bug. It's just no test was present before bug 1215268.
Assignee | ||
Comment 7•4 years ago
|
||
checkHandshake() will return a fake NS_ERROR_NET_RESET only once when insecure fallback is needed. https://mxr.mozilla.org/mozilla-central/source/security/manager/ssl/nsNSSIOLayer.cpp?rev=bd6226d81b60#1248 nsSocketInputStream and nsSocketOutputStream will store the error code separately. https://mxr.mozilla.org/mozilla-central/source/netwerk/base/nsSocketTransport2.h?rev=41dea9df27ed&mark=67-67#64 https://mxr.mozilla.org/mozilla-central/source/netwerk/base/nsSocketTransport2.h?rev=41dea9df27ed&mark=101-101#98 So if nsSocketInputStream::Read() and nsSocketOutputStream::Write() is called alternately, the correct error code may not be stored. Why Read() can be called before Write()? I couldn't investigate it completely, but apparently a buffered stream is doing something weird. If the buffering is enabled, Write() will never fail as long as the written size is smaller than the buffer. So the test couldn't receive error until onInputStreamReady() is fired. I disabled the buffering to workaround the problem. Android s4 succeeded 10/10 with this patch. Hopefully this patch can avoid intermittent failures... https://treeherder.mozilla.org/#/jobs?repo=try&revision=617ac3513df5
Assignee | ||
Comment 8•4 years ago
|
||
xpcshell test on other platforms: https://treeherder.mozilla.org/#/jobs?repo=try&revision=67715a52457e
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment on attachment 8675256 [details] [diff] [review] Disable output stream buffering Review of attachment 8675256 [details] [diff] [review]: ----------------------------------------------------------------- For the moment, this looks like an ok solution. However, I do think there is a bug here that we should investigate in the future. r=me with comments addressed. ::: security/manager/ssl/tests/unit/test_weak_crypto.js @@ +149,5 @@ > + output.close(); > + deferred.resolve(); > + return; > + } > + equal(Cr.NS_OK, expectedResult, "Connection should success"); nit: s/success/succeed/ @@ -151,5 @@ > input = transport.openInputStream(0, 0, 0); > input.asyncWait(handler, 0, 0, Services.tm.currentThread); > } catch (e) { > - let errorCode = -1 * (e.result & 0xFFFF); > - if (errorCode == SSL_ERROR_BAD_CERT_ALERT) { If we're getting rid of SSL_ERROR_BAD_CERT_ALERT, we don't need to define it earlier on in startClient (same with SSL_ERROR_BASE as a result).
Attachment #8675256 -
Flags: review?(dkeeler) → review+
Assignee | ||
Comment 14•4 years ago
|
||
Attachment #8675256 -
Attachment is obsolete: true
Attachment #8677137 -
Flags: review+
Assignee | ||
Updated•4 years ago
|
Keywords: checkin-needed
Comment 15•4 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f81fb04f1189
Keywords: checkin-needed
Comment hidden (Intermittent Failures Robot) |
Comment 17•4 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f81fb04f1189
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Assignee | ||
Comment 18•4 years ago
|
||
Filed bug 1217368 to track the root cause.
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
You need to log in
before you can comment on or make changes to this bug.
Description
•