-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Worker with inspector.waitForDebugger()
cannot be terminated
#52467
Comments
VoltrexKeyva
added
inspector
Issues and PRs related to the V8 inspector protocol
worker
Issues and PRs related to Worker support.
labels
Apr 11, 2024
nodejs-github-bot
pushed a commit
that referenced
this issue
May 13, 2024
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #52527 Fixes: #52467 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
targos
pushed a commit
that referenced
this issue
May 13, 2024
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #52527 Fixes: #52467 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
marco-ippolito
pushed a commit
that referenced
this issue
Jun 17, 2024
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #52527 Fixes: #52467 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
marco-ippolito
pushed a commit
that referenced
this issue
Jun 17, 2024
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #52527 Fixes: #52467 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
marco-ippolito
pushed a commit
that referenced
this issue
Jun 17, 2024
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #52527 Fixes: #52467 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
sophonieb
pushed a commit
to sophonieb/node
that referenced
this issue
Jun 20, 2024
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: nodejs#52527 Fixes: nodejs#52467 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
bmeck
pushed a commit
to bmeck/node
that referenced
this issue
Jun 22, 2024
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: nodejs#52527 Fixes: nodejs#52467 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v20.12.2, v21.7.3
Platform
Darwin Aris-MacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020 arm64
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
worker.terminate()
should terminate the worker and the pendinginspector.waitForDebugger()
process.exit()
should kill the main thread's processCTRL+c
is able to do both requirements.What do you see instead?
Worker does not terminate. Main thread cannot be exited.
Additional information
vitest-dev/vitest#5511
As (quite complex) work-around we can use web socket connection from main thread and connect to the inspector session. As soon as connection is made, the
worker.terminate()
activates and code afterinspector.waitForDebugger()
is not executed.$ node workers.mjs Debugger listening on ws://127.0.0.1:9229/9fc3b32f-23cf-4597-b79e-30d4a61f32cd For help, see: https://nodejs.org/en/docs/inspector Timeout Debugger attached. Debugger ending on ws://127.0.0.1:9229/9fc3b32f-23cf-4597-b79e-30d4a61f32cd For help, see: https://nodejs.org/en/docs/inspector Done # process exits correctly
The text was updated successfully, but these errors were encountered: