-
Notifications
You must be signed in to change notification settings - Fork 559
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
fix: terminate the process correctly #2499
Conversation
Sorry, but I could not create a unit test. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2499 +/- ##
==========================================
- Coverage 85.54% 84.31% -1.24%
==========================================
Files 76 79 +3
Lines 6858 7211 +353
==========================================
+ Hits 5867 6080 +213
- Misses 991 1131 +140 ☔ View full report in Codecov by Sentry. |
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.
A test that just makes a fetch call in a worker sounds useful. FWIW I couldn't repro it locally either, but maybe it is in the CIs.
Is there a reason you're using the first tee'd stream instead of the second? IIRC I had issues using the first one.
No particular reason. What problems did you have? |
Don't recall exactly, probably related to the comment |
Is this? #1700 |
that's why we needed the tee, not why I used the second stream. Just wondering, how do you know that this fixes the issue? |
I found that I could run a reproducible script of 2 issues and fix it. |
why can't that be made into a test? |
This is because it requires access to an external server. If you want the test, you need a few days. Still, you may not be able to create the test. |
as I mentioned before, it might not work locally but it might run on the CI, which is better than nothing (even if it doesn't work on the CI either) |
I can't do that right now. I will do some research |
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.
lgtm
that'd be a good test |
Hi @AriPerkkio, |
@KhafraDev I'd like you approval on this before merging. |
No, #2026 still gets stuck with these changes applied locally: ari ~/Git/undici (main) $ node repro.mjs
Unable to terminate
...
There are 1 stuck workers
Forcing process.exit on main thread |
Thanks for the report! I thought I had fixed it. |
@tsctx it's most likely a bug in node, not really sure how much of it can be fixed here. If you find a fix for nodejs/node#44985 it would probably help. |
Fixes #2413