-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[BUG] Node 20: Test timeouts do not exit gracefully #22641
Comments
Narrowed it down to a node bug nodejs/node#47566 that's been fixed in nightly with nodejs/node#47620 Going to keep this issue open because playwright/packages/playwright-test/src/cli.ts Lines 265 to 268 in 44e56d2
should likely be adjusted to make it easier to diagnose any similar regressions in the future and to exit any other child processes started by the cli (eg. webserver). |
This specific place does not really spawn child processes like webserver or test worker. It restarts itself with some more options, and mirrors the exit. I don't see what should we do differently here. @gtm-nayan Do you have a particular improvement in mind? |
This is actually working as intended; if the inner process crashes here, than the program is in invalid state. Killing the whole process tree would only hide the behavior under the carpet. Since we already exit with a non-zero code, the error should be surfaced well-enough for us to debug later. I'll close this since we believe the current behavior is optimal. |
Ahh, sorry I have misunderstood that part then. There's a race condition somewhere still, sometimes the worker process will receive a SIGKILL, it'll log that the worker process exited unexpectedly, the webserver will get cleaned up and that forked process will exit with a Other times, the forked process from the linked snippet will be closed before anything is logged. The close event handler receives a code of null and a SIGKILL signal. And in that case, the webserver will leak as well. The setup with the loop from #22643 is more reliable in reproducing that case. |
System info
Source code
Test file (self-contained)
Steps
Expected
test failure is reported, webserver is closed
Actual
exits without any message, test remains unmarked, webserver remains open
The text was updated successfully, but these errors were encountered: