Skip to content

Conversation

@ronag
Copy link
Member

@ronagronag commented Dec 18, 2020

Related Issues

Fixes: #36544

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

@ronag
Copy link
MemberAuthor

Missing test

@HomerSp
Copy link

I've updated your test slightly to check for the deadlock: https://gist.github.com/bea83eb0dcbd0aea3b2689c2cd91bb38
Now it will check for the initial pause, which will happen without the fix, and also for end, which won't happen without it. I also set highWaterMark to 1 so it'll happen immediately.

@HomerSp
Copy link

Seems like we may need to use common.mustCallAtLeast(1) instead of common.mustCall() because the latter requires it to be called exactly once, and it looks like the build system calls pause twice.

@ronagronag requested a review from mcollinaDecember 18, 2020 18:43
@ronagronag added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 18, 2020
@ronag
Copy link
MemberAuthor

@nodejs/streams

@ronag
Copy link
MemberAuthor

and it looks like the build system calls pause twice.

This was also a separate bug.

@ronagronag requested a review from lpincaDecember 18, 2020 18:51
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 18, 2020
@nodejs-github-bot
Copy link
Collaborator

@ronagronag added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 18, 2020
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 18, 2020
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollinamcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@ronagronag added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 18, 2020
@HomerSp
Copy link

and it looks like the build system calls pause twice.

This was also a separate bug.

It's because pause is called when it's finishing (in unpipe) as well as in the pipe call - so your latest test code looks good to me.

@ronag
Copy link
MemberAuthor

Landed in ab895bd

@ronagronag closed this Dec 20, 2020
ronag added a commit that referenced this pull request Dec 20, 2020
Fixes: #36544 PR-URL: #36563 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc: Piping multiple streams to the same Writable stream might not end

5 participants

@ronag@HomerSp@nodejs-github-bot@mcollina@lpinca