Skip to content

stream: don't call _read after destroy()#29491

Closed
ronag wants to merge 2 commits into
nodejs:masterfrom
nxtedition:no-read-after-destroy
Closed

stream: don't call _read after destroy()#29491
ronag wants to merge 2 commits into
nodejs:masterfrom
nxtedition:no-read-after-destroy

Conversation

@ronag

@ronag ronag commented Sep 8, 2019

Copy link
Copy Markdown
Member

Partly fixes #29477.

Currently stream implementations MUST check for destroyed inside _read.

Found this while investigating a suspicious destroyed conditional in fs streams.

"Full" fix in #29485 but it is way too breaking at this point and needs more updated tests.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the stream Issues and PRs related to the stream subsystem. label Sep 8, 2019
@ronag ronag force-pushed the no-read-after-destroy branch 3 times, most recently from 0b2d7a0 to c65a3a3 Compare September 8, 2019 08:44

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@ronag

ronag commented Sep 8, 2019

Copy link
Copy Markdown
Member Author

@Trott: I'm a little confused. That test does not fail for me locally?

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ronag ronag force-pushed the no-read-after-destroy branch from c65a3a3 to 4f09ffc Compare September 8, 2019 23:12
@Trott

This comment has been minimized.

@Trott

This comment has been minimized.

@Trott

This comment has been minimized.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ronag ronag force-pushed the no-read-after-destroy branch from 4f09ffc to fd8f2b6 Compare September 11, 2019 19:56
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@lpinca lpinca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SGTM, not sure about semverness

@mcollina

Copy link
Copy Markdown
Member

There seem to be some tests failures/regressions on specific environments :/.
Maybe @Trott can help.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ronag

ronag commented Sep 20, 2019

Copy link
Copy Markdown
Member Author

@Trott: This looks ready?

@benjamingr benjamingr added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 22, 2019
Trott pushed a commit that referenced this pull request Sep 22, 2019
PR-URL: #29491
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
@Trott

Trott commented Sep 22, 2019

Copy link
Copy Markdown
Member

Landed in ec390b6

@Trott Trott closed this Sep 22, 2019
targos pushed a commit that referenced this pull request Sep 23, 2019
PR-URL: #29491
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
@BridgeAR BridgeAR mentioned this pull request Sep 24, 2019
BridgeAR pushed a commit that referenced this pull request Sep 25, 2019
PR-URL: #29491
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stream: read after destroy?

9 participants