You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Node 20: Test timeouts do not exit gracefully #22641
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.
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.
This specific place does not really spawn child processes like webserver or test worker.
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 1 code.
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.
Activity
gtm-nayan commentedon Apr 26, 2023
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).
dgozman commentedon Apr 26, 2023
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.
gtmnayan (@gtm-nayan) Do you have a particular improvement in mind?
aslushnikov commentedon Apr 26, 2023
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.
gtm-nayan commentedon Apr 27, 2023
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
1code.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.