GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — http2: do not emit 'aborted' if the stream closed locally by lovinglyy · Pull Request #22869 · nodejs/node

Conversation

@lovinglyy

@lovinglyy lovinglyy commented Sep 15, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

check if the stream didn't close locally before calling aborted

Fixes: #22851

Checklist
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@lovinglyy
http2: do not emit 'aborted' if the stream closed
1f813cc
@nodejs-github-bot nodejs-github-bot added dont-land-on-v6.x http2 Issues and PRs related to the http2 subsystem. labels Sep 15, 2018
Trott
Trott requested changes Sep 15, 2018
View reviewed changes

@Trott Trott left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @lovinglyy, and thanks for the pull request! Is it possible to add a test for this condition?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Trott

Trott commented Sep 15, 2018

Copy link
Copy Markdown
Member

This change appears to cause many existing http2 tests to fail.

=== release test-http2-client-socket-destroy ===
Path: parallel/test-http2-client-socket-destroy
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at Http2Server.server.on.common.mustCall (/home/travis/build/nodejs/node/test/parallel/test-http2-client-socket-destroy.js:18:31)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Http2Server.emit (events.js:182:13)
    at ServerHttp2Session.sessionOnStream (internal/http2/core.js:2516:19)
    at ServerHttp2Session.emit (events.js:182:13)
    at emit (internal/http2/core.js:232:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Command: out/Release/node --expose-internals /home/travis/build/nodejs/node/test/parallel/test-http2-client-socket-destroy.js
=== release test-http2-compat-aborted ===
Path: parallel/test-http2-compat-aborted
Mismatched <anonymous> function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/parallel/test-http2-compat-aborted.js:11:28)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Http2Server.emit (events.js:182:13)
    at Http2Server.onServerStream (internal/http2/compat.js:741:10)
    at Http2Server.emit (events.js:182:13)
    at ServerHttp2Session.sessionOnStream (internal/http2/core.js:2516:19)
    at ServerHttp2Session.emit (events.js:182:13)
    at emit (internal/http2/core.js:232:8)
Command: out/Release/node /home/travis/build/nodejs/node/test/parallel/test-http2-compat-aborted.js
=== release test-http2-compat-errors ===
Path: parallel/test-http2-compat-errors
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/parallel/test-http2-compat-errors.js:18:28)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Http2Server.emit (events.js:182:13)
    at Http2Server.onServerStream (internal/http2/compat.js:741:10)
    at Http2Server.emit (events.js:182:13)
    at ServerHttp2Session.sessionOnStream (internal/http2/core.js:2516:19)
    at ServerHttp2Session.emit (events.js:182:13)
    at emit (internal/http2/core.js:232:8)
Command: out/Release/node --expose-internals /home/travis/build/nodejs/node/test/parallel/test-http2-compat-errors.js
=== release test-http2-max-concurrent-streams ===
Path: parallel/test-http2-max-concurrent-streams
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at Http2Server.server.listen.common.mustCall (/home/travis/build/nodejs/node/test/parallel/test-http2-max-concurrent-streams.js:45:30)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Object.onceWrapper (events.js:273:13)
    at Http2Server.emit (events.js:182:13)
    at emitListeningNT (net.js:1322:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:749:11)
    at startup (internal/bootstrap/node.js:270:19)
Command: out/Release/node /home/travis/build/nodejs/node/test/parallel/test-http2-max-concurrent-streams.js
=== release test-http2-options-max-reserved-streams ===
Path: parallel/test-http2-options-max-reserved-streams
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at stream.pushStream.common.mustCall (/home/travis/build/nodejs/node/test/parallel/test-http2-options-max-reserved-streams.js:38:39)
    at /home/travis/build/nodejs/node/test/common/index.js:350:15
    at process._tickCallback (internal/process/next_tick.js:63:19)
Command: out/Release/node /home/travis/build/nodejs/node/test/parallel/test-http2-options-max-reserved-streams.js
=== release test-http2-server-rst-stream ===
Path: parallel/test-http2-server-rst-stream
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at tests.forEach (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:57:30)
    at Array.forEach (<anonymous>)
    at Http2Server.server.listen.common.mustCall (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:48:9)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Object.onceWrapper (events.js:273:13)
    at Http2Server.emit (events.js:182:13)
    at emitListeningNT (net.js:1322:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at tests.forEach (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:57:30)
    at Array.forEach (<anonymous>)
    at Http2Server.server.listen.common.mustCall (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:48:9)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Object.onceWrapper (events.js:273:13)
    at Http2Server.emit (events.js:182:13)
    at emitListeningNT (net.js:1322:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at tests.forEach (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:57:30)
    at Array.forEach (<anonymous>)
    at Http2Server.server.listen.common.mustCall (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:48:9)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Object.onceWrapper (events.js:273:13)
    at Http2Server.emit (events.js:182:13)
    at emitListeningNT (net.js:1322:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at tests.forEach (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:57:30)
    at Array.forEach (<anonymous>)
    at Http2Server.server.listen.common.mustCall (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:48:9)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Object.onceWrapper (events.js:273:13)
    at Http2Server.emit (events.js:182:13)
    at emitListeningNT (net.js:1322:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at tests.forEach (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:57:30)
    at Array.forEach (<anonymous>)
    at Http2Server.server.listen.common.mustCall (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:48:9)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Object.onceWrapper (events.js:273:13)
    at Http2Server.emit (events.js:182:13)
    at emitListeningNT (net.js:1322:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at tests.forEach (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:57:30)
    at Array.forEach (<anonymous>)
    at Http2Server.server.listen.common.mustCall (/home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js:48:9)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Object.onceWrapper (events.js:273:13)
    at Http2Server.emit (events.js:182:13)
    at emitListeningNT (net.js:1322:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Command: out/Release/node /home/travis/build/nodejs/node/test/parallel/test-http2-server-rst-stream.js
=== release test-http2-server-socket-destroy ===
Path: parallel/test-http2-server-socket-destroy
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at Http2Server.server.on.common.mustCall (/home/travis/build/nodejs/node/test/parallel/test-http2-server-socket-destroy.js:59:28)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Http2Server.emit (events.js:182:13)
    at emitListeningNT (net.js:1322:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:749:11)
    at startup (internal/bootstrap/node.js:270:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:801:3)
Mismatched noop function calls. Expected exactly 1, actual 0.
    at Object.mustCall (/home/travis/build/nodejs/node/test/common/index.js:310:10)
    at Http2Server.onStream (/home/travis/build/nodejs/node/test/parallel/test-http2-server-socket-destroy.js:31:31)
    at Http2Server.<anonymous> (/home/travis/build/nodejs/node/test/common/index.js:350:15)
    at Http2Server.emit (events.js:182:13)
    at ServerHttp2Session.sessionOnStream (internal/http2/core.js:2516:19)
    at ServerHttp2Session.emit (events.js:182:13)
    at emit (internal/http2/core.js:232:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Command: out/Release/node --expose-internals /home/travis/build/nodejs/node/test/parallel/test-http2-server-socket-destroy.js
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lovinglyy
http2: aborted check if the stream closed locally
b2596fc
@lovinglyy lovinglyy changed the title http2: do not emit 'aborted' if the stream closed http2: do not emit 'aborted' if the stream closed locally Sep 15, 2018
@lovinglyy

lovinglyy commented Sep 15, 2018

Copy link
Copy Markdown
Contributor Author

@Trott sorry, my bad with the tests, I did run the working ones I think, thanks for the welcome and actually running that tests, this time I did run it correctly, all the tests(got some failures but not http2 related or due the changes) I'll do a test with the issue reported.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski

apapirovski commented Sep 15, 2018

Copy link
Copy Markdown
Contributor

That check is still not quite correct @lovinglyy (we just don't have any tests that would fail it, which probably indicates some gaps). I opened a PR with the correct fix in #22878

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lovinglyy

lovinglyy commented Sep 15, 2018

Copy link
Copy Markdown
Contributor Author

Oh just noticed, @apapirovski, also did some tests to understand better, your pr does it definitely better as the ending property don't get a false value when aborted shouldn't be emitted, nice work there, however, shouldn't it still not be emitted if localClose is defined? If the stream truly aborts it is undefined.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski

apapirovski commented Sep 15, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

however, shouldn't it still not be emitted if localClose is defined? If the stream truly aborts it is undefined.

If the two states are out of sync when they shouldn't be then it could indicate a deeper problem which I would be weary to mask. That is, I would consider the fact that we didn't call .end() on pushStreams by default a bug but had this fix been in place, it would mask the issue.

Since the user interface is in form of the writable stream, we should make sure the state of that writable stream represents the underlying state of the Http2Stream.

lovinglyy reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lovinglyy

lovinglyy commented Sep 15, 2018

Copy link
Copy Markdown
Contributor Author

Thank you for clarifying, now I understand how your pr makes much more sense I'll close this pr.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lovinglyy lovinglyy closed this Sep 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Trott Trott Trott requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

http2 Issues and PRs related to the http2 subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

HTTP2 Push Stream always results in aborted event being fired

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@lovinglyy @Trott @apapirovski @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.