Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

test-http2-client-jsstream-destroy.js write after a stream was destroyed #36078

Closed
rickyes opened this issue Nov 11, 2020 · 3 comments · Fixed by #36129
Closed

test-http2-client-jsstream-destroy.js write after a stream was destroyed #36078

rickyes opened this issue Nov 11, 2020 · 3 comments · Fixed by #36129
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. http2 Issues or PRs related to the http2 subsystem.

Comments

@rickyes
Copy link
Contributor

rickyes commented Nov 11, 2020

  • Test: test-http2-client-jsstream-destroy
  • Platform: OSX
  • Console Output:
node:events:306
      throw er; // Unhandled 'error' event
      ^

Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at new NodeError (node:internal/errors:277:15)
    at TLSSocket.Writable.write (node:internal/streams/writable:324:11)
    at JSSocket._write (/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1015/test/parallel/test-http2-client-jsstream-destroy.js:25:17)
    at doWrite (node:internal/streams/writable:407:12)
    at clearBuffer (node:internal/streams/writable:566:7)
    at JSSocket.Writable.uncork (node:internal/streams/writable:347:7)
    at JSStreamSocket.doWrite (node:internal/js_stream_socket:176:17)
    at JSStream.onwrite (node:internal/js_stream_socket:33:57)
Emitted 'error' event on ClientHttp2Stream instance at:
    at emitErrorNT (node:internal/streams/destroy:188:8)
    at emitErrorCloseNT (node:internal/streams/destroy:153:3)
    at processTicksAndRejections (node:internal/process/task_queues:80:21) {
  code: 'ERR_STREAM_DESTROYED'
}
@rickyes rickyes added flaky-test Issues and PRs related to the tests with unstable failures on the CI. http2 Issues or PRs related to the http2 subsystem. labels Nov 11, 2020
@rickyes rickyes changed the title Cannot call write after a stream was destroyed test-http2-client-jsstream-destroy.js write after a stream was destroyed Nov 13, 2020
@Trott
Copy link
Member

Trott commented Nov 15, 2020

Happened again on macOS in CI:

not ok 1111 parallel/test-http2-client-jsstream-destroy
  ---
  duration_ms: 0.566
  severity: fail
  exitcode: 1
  stack: |-
    node:events:306
          throw er; // Unhandled 'error' event
          ^
    
    Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
        at new NodeError (node:internal/errors:277:15)
        at TLSSocket.Writable.write (node:internal/streams/writable:324:11)
        at JSSocket._write (/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1014/test/parallel/test-http2-client-jsstream-destroy.js:25:17)
        at doWrite (node:internal/streams/writable:407:12)
        at clearBuffer (node:internal/streams/writable:566:7)
        at JSSocket.Writable.uncork (node:internal/streams/writable:347:7)
        at JSStreamSocket.doWrite (node:internal/js_stream_socket:176:17)
        at JSStream.onwrite (node:internal/js_stream_socket:33:57)
    Emitted 'error' event on ClientHttp2Stream instance at:
        at emitErrorNT (node:internal/streams/destroy:188:8)
        at emitErrorCloseNT (node:internal/streams/destroy:153:3)
        at processTicksAndRejections (node:internal/process/task_queues:80:21) {
      code: 'ERR_STREAM_DESTROYED'
    }
  ...

@Trott
Copy link
Member

Trott commented Nov 15, 2020

Finding this very easy to reproduce locally with this:

tools/test.py -j96 --repeat 192 test/parallel/test-http2-client-jsstream-destroy.js

@Trott
Copy link
Member

Trott commented Nov 15, 2020

Proposed fix in #36129.

@Trott Trott closed this as completed in fff25a0 Nov 17, 2020
codebytere pushed a commit that referenced this issue Nov 22, 2020
Use events instead of setTimeout() calls.

Fixes: #36078

PR-URL: #36129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
BethGriggs pushed a commit that referenced this issue Dec 10, 2020
Use events instead of setTimeout() calls.

Fixes: #36078

PR-URL: #36129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
BethGriggs pushed a commit that referenced this issue Dec 10, 2020
Use events instead of setTimeout() calls.

Fixes: #36078

PR-URL: #36129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
BethGriggs pushed a commit that referenced this issue Dec 15, 2020
Use events instead of setTimeout() calls.

Fixes: #36078

PR-URL: #36129
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants