Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test: fix flaky test-tls-multiple-cas-as-string #27569

Closed

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented May 5, 2019

The following error is emitted in a nondeterministic way on the server
side socket on macOS:

events.js:173
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:183:27)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)

Prevent the error from being emitted by moving the socket.end() call
to the client. Also, run tests in parallel and use common.mustCall().

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

The following error is emitted in a nondeterministic way on the server
side socket on macOS:

```
events.js:173
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:183:27)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)
```

Prevent the error from being emitted by moving the `socket.end()` call
to the client. Also, run tests in parallel and use `common.mustCall()`.
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label May 5, 2019
@lpinca
Copy link
Member Author

lpinca commented May 5, 2019

Issue is reproducible with

./tools/test.py -J --repeat=1000 test/parallel/test-tls-multiple-cas-as-string.js

The underlying problem seems to be the same of #26910 and #27426.

@lpinca lpinca added the macos Issues and PRs related to the macOS platform / OSX. label May 5, 2019
@nodejs-github-bot
Copy link
Collaborator

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 5, 2019
@danbev
Copy link
Contributor

danbev commented May 8, 2019

Landed in a681d95.

@danbev danbev closed this May 8, 2019
danbev pushed a commit that referenced this pull request May 8, 2019
The following error is emitted in a nondeterministic way on the server
side socket on macOS:

```
events.js:173
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:183:27)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)
```

Prevent the error from being emitted by moving the `socket.end()` call
to the client. Also, run tests in parallel and use `common.mustCall()`.

PR-URL: #27569
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
@lpinca lpinca deleted the fix/test-tls-multiple-cas-as-string branch May 8, 2019 05:23
targos pushed a commit that referenced this pull request May 9, 2019
The following error is emitted in a nondeterministic way on the server
side socket on macOS:

```
events.js:173
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:183:27)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)
```

Prevent the error from being emitted by moving the `socket.end()` call
to the client. Also, run tests in parallel and use `common.mustCall()`.

PR-URL: #27569
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
@BridgeAR BridgeAR mentioned this pull request May 21, 2019
4 tasks
@lpinca lpinca mentioned this pull request Aug 15, 2019
2 tasks
lpinca added a commit to lpinca/node that referenced this pull request Aug 15, 2019
Move `socket.end()` to client.

Fixes: nodejs#28111
Refs: nodejs#27569
Trott pushed a commit that referenced this pull request Aug 19, 2019
Move `socket.end()` to client.

Fixes: #28111
Refs: #27569

PR-URL: #29134
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Aug 20, 2019
Move `socket.end()` to client.

Fixes: #28111
Refs: #27569

PR-URL: #29134
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. macos Issues and PRs related to the macOS platform / OSX. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants