-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Hard to repro bug: screen locks sometimes #3605
Comments
It keeps happening - any clues on how to debug it would be helpful. |
Are you hitting ^Z while the program you are debugging is running or at delve's prompt? |
^Z while in dlv
Here's my config, in case it matters:
It seems to happen 100% now for me, but when I |
The 'T' status looks fine, it means dlv did suspend in response to the signal. What's not good is the '+', at that point the shell should take over the terminal. What's the environment here: shell, terminal, any terminal multiplexes involved, ssh, is any of this being started by a script? |
It is a local terminal, no SSH but it IS being started by a script. That is
an excellent observation. Let me try to eliminate that (exec).
…On Mon, Dec 25, 2023, 11:01 PM Alessandro Arzilli ***@***.***> wrote:
The 'T' status looks fine, it means dlv did suspend in response to the
signal. What's not good is the '+', at that point the shell should take
over the terminal. What's the environment here: shell, terminal, any
terminal multiplexes involved, ssh, is any of this being started by a
script?
—
Reply to this email directly, view it on GitHub
<#3605 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKWAVGO3BK52FJNJSRILE3YLJY5JAVCNFSM6AAAAABBAEIDL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZGMYTENZZG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
hah, that does seem to trigger it. I admit I don't know enough about how the terminal SHOULD react to say if this is right or not. I tested by putting
Is that a fair analog? I think so but not 100% sure. |
To correctly mimic the behavior of a terminal we need to send SIGTSTP to the whole foreground process group, instead of just sending it to ourselves. Fixes go-delve/delve#3605
We're sending SIGTSTP to ourselves when we should be sending it to our process group. The workaround for this should be to have an actual exec in the script ( |
Yes, exec fixes the problem for now. Thanks for digging in. |
To correctly mimic the behavior of a terminal we need to send SIGTSTP to the whole foreground process group, instead of just sending it to ourselves. Fixes go-delve/delve#3605
Update version of go-delve/liner to include the Ctrl-Z fix (SIGTSTP should be sent to our process group instead of just sending it to ourselves to correctly imitate a terminal). Fixes go-delve#3605
Update version of go-delve/liner to include the Ctrl-Z fix (SIGTSTP should be sent to our process group instead of just sending it to ourselves to correctly imitate a terminal). Fixes #3605
dlv version
)?Delve Debugger$Id: a358c02f24aa7047ecc562b0587dc2d08330b2cf $
Version: 1.21.1
Build:
go version
)?go version go1.21.3 linux/amd64
linux amd64
Ran dlv, hit ^Z
My terminal
Frozen screen, no input or output. I had to
killall -9 dlv
from another terminal, at which point all of the buffered input was sent to shell! And I had toreset
the terminal.I can't 100% repro this, but it happened several times yesterday. Not sure how to debug it.
The text was updated successfully, but these errors were encountered: