Investigate flaky test-tls-socket-close on macOS

  • Version: v8.0.0-pre
  • Platform: macOS
  • Subsystem: test

From https://ci.nodejs.org/job/node-test-commit-osx/9995/nodes=osx1010/console:

not ok 1205 parallel/test-tls-socket-close
  ---
  duration_ms: 0.243
  severity: fail
  stack: |-
    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 was able to replicate this with:

$ tools/test.py --repeat 64 -j 16 test/parallel/test-tls-socket-close.js 
=== release test-tls-socket-close ===                    
Path: parallel/test-tls-socket-close
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)
Command: out/Release/node /Users/trott/io.js/test/parallel/test-tls-socket-close.js
[00:03|% 100|+  63|-   1]: Done 
$

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.