-
Notifications
You must be signed in to change notification settings - Fork 52
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
Unable to send SIGINT to the remote debugger client process #132
Comments
I'm not really sure how to get the remote debugger working, but it may be instructive to look at how ptyprocess handles keyboard interrupts (see |
I get this error when I try to run the script Traceback (most recent call last):
File "/Users/aaronmeurer/Documents/pyflyby/lib/python/pyflyby/_dbg.py", line 610, in wait_for_debugger_to_attach
_send_email_with_attach_instructions(arg, mailto, originalpid=originalpid)
File "/Users/aaronmeurer/Documents/pyflyby/lib/python/pyflyby/_dbg.py", line 757, in _send_email_with_attach_instructions
s = smtplib.SMTP("localhost")
File "/Users/aaronmeurer/anaconda3/envs/pyflyby3/lib/python3.8/smtplib.py", line 253, in __init__
(code, msg) = self.connect(host, port)
File "/Users/aaronmeurer/anaconda3/envs/pyflyby3/lib/python3.8/smtplib.py", line 339, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/Users/aaronmeurer/anaconda3/envs/pyflyby3/lib/python3.8/smtplib.py", line 308, in _get_socket
return socket.create_connection((host, port), timeout,
File "/Users/aaronmeurer/anaconda3/envs/pyflyby3/lib/python3.8/socket.py", line 808, in create_connection
raise err
File "/Users/aaronmeurer/anaconda3/envs/pyflyby3/lib/python3.8/socket.py", line 796, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused I don't understand the error. Is it trying to send an email? Clearly there is some step that I'm missing in order to get the remote debugger working. |
I can't completely reproduce the issue, but I have an idea of what is causing it.
It may be that the debug symbols are not installed and this will fix your issue. Just before the _copy call
The terminal is set in raw mode which purposefully ignore escape sequences like Ctrl-C and pass them down to the subprocess that actually do the debugging and with which in the end the user is interacting with. That might not be that easy to fix. Even with debug symbols I hit an immediate segfault (maybe related to #131), when I try to ensure that GIL is taken via GDB and am working toward fixing the cause of this. |
I believe this should have been fixed by #141 let us know if that's not the case or if there are other issues. |
Internal ticket for reference: Prop#279270 |
reproducer.py
I'm using zsh. It seems like SIGINT is not sent to the P2 on ctrl+c. However, sending SIGINT from another terminal killed the client and both its children - the gdb and watchdog processes.
Doesn't respond to ctrl+c
Here, 27991 is the client, 27997 is the gdb process and 27998 is the watchdog process.
From another terminal
$ kill -2 27991
The debugger client:
The text was updated successfully, but these errors were encountered: