Repository navigation
Investigate flaky test-tls-socket-close on macOS #13184
Description
Activity
- addedmacosIssues and PRs related to the macOS platform.Issues and PRs related to the macOS platform.testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.tlsIssues and PRs related to the tls subsystem.Issues and PRs related to the tls subsystem.
on May 24, 2017 Just a very uninformed guess. I was able to replicate the issue using the command you mention. If I move this code https://github.com/nodejs/node/blob/master/test/parallel/test-tls-socket-close.js#L27-L58 into the
tls.createServer()callback I am no longer able to replicate the issue.@sebastianplesciuc Thanks for trying to figure this one out! Unfortunately, that change invalidates the test as Node.js 7.7.3 no longer segfaults on that test if that change is made.
Reacted by Sebastian PlesciucRunning with
export NODE_DEBUG=netyields the following:NET 24869: setupListenHandle null 0 4 0 undefined NET 24869: setupListenHandle: create a handle NET 24869: bind to :: NET 24869: pipe false undefined NET 24869: connect: find host localhost NET 24869: connect: dns options { family: undefined, hints: 1024 } NET 24869: _read NET 24869: _read wait for connection NET 24869: afterConnect NET 24869: _read NET 24869: Socket._read readStart NET 24869: onconnection NET 24869: _read NET 24869: Socket._read readStart NET 24869: _read NET 24869: afterWrite 0 NET 24869: afterWrite call cb NET 24869: _onTimeout NET 24869: destroy NET 24869: close NET 24869: close handle NET 24869: has server NET 24869: SERVER _emitCloseIfDrained NET 24869: SERVER handle? true connections? 0 NET 24869: onread -54 NET 24869: destroy NET 24869: close NET 24869: close handle events.js:182 throw er; // Unhandled 'error' event ^ Error: read ECONNRESET at exports._errnoException (util.js:1026:11) at TLSWrap.onread (net.js:607:25)I don't understand it yet, but I thought it might help someone who can.
Still a thing:
https://ci.nodejs.org/job/node-test-commit-osx/10336/nodes=osx1010/console
not ok 1276 parallel/test-tls-socket-close --- duration_ms: 0.164 severity: fail stack: |- events.js:182 throw er; // Unhandled 'error' event ^ Error: read ECONNRESET at exports._errnoException (util.js:1012:11) at TLSWrap.onread (net.js:607:25) ...
Adding an error listener that ignores
ECONNRESETmakes the test reliable while still seg-faulting as expected on Node.js v7.7.3. Race condition, I suppose. Quite possibly unavoidable (if we want to keep the segfault on relevant versions of Node.js, which we do because it's the whole point of the test). PR coming momentarily.- added a commit that references this issue
on Jun 7, 2017 PR to fix: #13529
- added a commit that references this issue
on Jun 10, 2017 - added a commit that references this issue
on Jun 10, 2017 - added a commit that references this issue
on Jul 17, 2017 5 remaining items
- added a commit that references this issue
on Feb 8, 2019
From https://ci.nodejs.org/job/node-test-commit-osx/9995/nodes=osx1010/console:
I was able to replicate this with:
So it's possible the solution is to move it to
sequential. But it's also possible that this is a race condition somewhere in the code.