-
Notifications
You must be signed in to change notification settings - Fork 822
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
Spawning child shell process while debugging via gdb causes hang #2333
Comments
I could have sworn @therealkenc mentioned this in another issue (where you have to send a SIGKILL to any child process of gdb from a separate terminal in order to kill it |
bump -- I finally found both time and tools to track down why I've been having trouble using GDB within WSL, for applications that I care about. Buried under a few layers of proprietary code, it turns out that it's this issue. Here's a reproducer that uses parent.c:
child.c:
Build commands:
As it turns out, this issue no longer affects me as directly. I'm working on different software these days and not hitting this issue most of the time. (I care more about I/O performance, but y'all are well aware of that issue :-) A more-elegant Docker story would also be nice.) I'm also not sure that this is the only issue with gdb; it's just the first one, I can't get past it to see what's underneath. @benhillis FYI -- I'm pretty sure I promised to report this several months ago; apologies for being so lame in getting it out the door... |
Thanks @aseering for the simple repro steps. I am marking this as a bug. We will try to prioritize this. |
This should be fixed in the Insider build 17017. |
When debugging via gdb, spawning a child shell process via popen causes gdb to hang. The only way to fix it is to kill the gdb process.
This post exhibits the same problem I am having with a minimum repro (I am not the author of the post):
https://askubuntu.com/questions/927339/gdb-hangs-trying-to-open-proc-file-on-bash-on-windows-on-ubuntu-16-04-2-lts
The program hangs when popen is called.
Running the program outside of gdb works as expected. Also, running on a non-WSL linux instance (with or without gdb) works as expected.
Apologies if this issue is already documented. I didn't see it when I searched...
The text was updated successfully, but these errors were encountered: