-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
debugger: propagate --debug-port= to debuggee #3470
Conversation
LGTM |
One more CI with a fix-up for Windows path munging in the test: https://ci.nodejs.org/job/node-test-pull-request/551/ |
LGTM |
It looks like the test is hitting a race condition in the debugger where the child processes get stuck waiting on a semaphore...
Happens locally about once every ~50 runs. Will investigate. EDIT: Interestingly enough I've also seen cases where the main thread is already gone but the debugger thread is still around, sleeping in epoll_wait. EDIT2: It may be much more trivial than that. Looks like killing the debugger doesn't always terminate the debuggee. |
@bnoordhuis what ended up happening with this? |
@thealphanerd It's basically blocked by #5368 - |
7da4fd4
to
c7066fb
Compare
@bnoordhuis #5368 was closed by #5904. Does that mean this is ready to move forward again? Or is life not that simple? |
This should be good to go again. I actually had "dusting off debugger PRs" on my TODO list for this week. Rebased + new CI: https://ci.nodejs.org/job/node-test-pull-request/2778/ |
LGTM. There were some CI failures that all look unrelated, but the number of failures might warrant another CI. |
The (hopefully unrelated) failures are all EADDRINUSE on localhost: |
Le sigh, Java exceptions on the ARM bots. Third time is the charm: https://ci.nodejs.org/job/node-test-pull-request/2788/ |
Probably fine to table-flip the CI and land the code at this point but hey, I loves me some CI runs, so here's another one: https://ci.nodejs.org/job/node-test-pull-request/2790/ |
Before this commit `node --debug-port=1234 debug t.js` ignored the --debug-port= argument, binding to the default port 5858 instead, making it impossible to debug more than one process on the same machine that way. This commit also reduces the number of places where the default port is hard-coded by one. Fixes: nodejs#3345 PR-URL: nodejs#3470 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]>
This time it was the ARM bots and one of the plinux machines... =) I'm confident enough it works though. Landed in 18fb4f9 and added the lts-watch-v4.x tag. Thanks for the reviews, everyone. |
It looks like that may be exactly what's going on and why (or at least one reason why) the last couple days have been unpleasant in CI-land... https://ci.nodejs.org/job/node-stress-single-test/nodes=freebsd102-64/748/console
|
Continues in #7034. |
On UNIX platforms, the debugger doesn't reliably kill the inferior when killed by a signal. Work around that by spawning the debugger in its own process group and killing the process group instead of just the debugger process. This is a hack to get the continuous integration back to green, it doesn't address the underlying issue, which is that the debugger shouldn't leave stray processes behind. Fixes: nodejs#7034 Refs: nodejs#3470 Reviewed-By: Colin Ihrig <[email protected]>
On UNIX platforms, the debugger doesn't reliably kill the inferior when killed by a signal. Work around that by spawning the debugger in its own process group and killing the process group instead of just the debugger process. This is a hack to get the continuous integration back to green, it doesn't address the underlying issue, which is that the debugger shouldn't leave stray processes behind. Fixes: #7034 PR-URL: #7037 Refs: #3470 Reviewed-By: Colin Ihrig <[email protected]>
Before this commit `node --debug-port=1234 debug t.js` ignored the --debug-port= argument, binding to the default port 5858 instead, making it impossible to debug more than one process on the same machine that way. This commit also reduces the number of places where the default port is hard-coded by one. Fixes: nodejs#3345 PR-URL: nodejs#3470 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]>
On UNIX platforms, the debugger doesn't reliably kill the inferior when killed by a signal. Work around that by spawning the debugger in its own process group and killing the process group instead of just the debugger process. This is a hack to get the continuous integration back to green, it doesn't address the underlying issue, which is that the debugger shouldn't leave stray processes behind. Fixes: nodejs#7034 PR-URL: nodejs#7037 Refs: nodejs#3470 Reviewed-By: Colin Ihrig <[email protected]>
Before this commit `node --debug-port=1234 debug t.js` ignored the --debug-port= argument, binding to the default port 5858 instead, making it impossible to debug more than one process on the same machine that way. This commit also reduces the number of places where the default port is hard-coded by one. Fixes: #3345 PR-URL: #3470 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]>
On UNIX platforms, the debugger doesn't reliably kill the inferior when killed by a signal. Work around that by spawning the debugger in its own process group and killing the process group instead of just the debugger process. This is a hack to get the continuous integration back to green, it doesn't address the underlying issue, which is that the debugger shouldn't leave stray processes behind. Fixes: #7034 PR-URL: #7037 Refs: #3470 Reviewed-By: Colin Ihrig <[email protected]>
Before this commit `node --debug-port=1234 debug t.js` ignored the --debug-port= argument, binding to the default port 5858 instead, making it impossible to debug more than one process on the same machine that way. This commit also reduces the number of places where the default port is hard-coded by one. Fixes: #3345 PR-URL: #3470 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]>
On UNIX platforms, the debugger doesn't reliably kill the inferior when killed by a signal. Work around that by spawning the debugger in its own process group and killing the process group instead of just the debugger process. This is a hack to get the continuous integration back to green, it doesn't address the underlying issue, which is that the debugger shouldn't leave stray processes behind. Fixes: #7034 PR-URL: #7037 Refs: #3470 Reviewed-By: Colin Ihrig <[email protected]>
Before this commit `node --debug-port=1234 debug t.js` ignored the --debug-port= argument, binding to the default port 5858 instead, making it impossible to debug more than one process on the same machine that way. This commit also reduces the number of places where the default port is hard-coded by one. Fixes: #3345 PR-URL: #3470 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]>
On UNIX platforms, the debugger doesn't reliably kill the inferior when killed by a signal. Work around that by spawning the debugger in its own process group and killing the process group instead of just the debugger process. This is a hack to get the continuous integration back to green, it doesn't address the underlying issue, which is that the debugger shouldn't leave stray processes behind. Fixes: #7034 PR-URL: #7037 Refs: #3470 Reviewed-By: Colin Ihrig <[email protected]>
Before this commit
node --debug-port=1234 debug t.js
ignored the--debug-port= argument, binding to the default port 5858 instead,
making it impossible to debug more than one process on the same
machine that way.
This commit also reduces the number of places where the default port
is hard-coded by one.
Fixes: #3345
R=@indutny
CI: https://ci.nodejs.org/job/node-test-pull-request/550/