You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! as mentioned in the past I really like your software and I've been using it a lot recently.
I was very occasionally running into an issue where the process I'm trying to monitor would hang after I finished py-spy with crtl + c; the way I'm running py-spy is the following:
py-spy record --native --pid 1234
And what happened was that when I looked into the process I'm trying to monitor by doing ps aux I noticed that the state of the process was "T" which means "stopped, either by a job control signal or because it is being traced.". My understanding is that this state could be reached by sending SIGSTOPs to a given proces; I haven't looked very deep into the logic used by py-spy's code whenever the native flag is set but my guess is that maybe what's happening under the hood is that SIGSTOPs + SIGCONTs are being sent to look at the stacktrace of the process in between and, if someone happens to pres ctrl + c in between that time-span the process being monitored will remain in a SIGSTOP state as a SIGCONT wouldn't be send by py-spy on finalization by doing ctrl+c.
I was wondering if by any chance this could be possible?
Thanks!:)
The text was updated successfully, but these errors were encountered:
We have a control-c handler in py-spy - so we should clean up and resume the python process when py-spy exits. However, there have been issues around this before .
What version of py-spy are you using? I'm wondering if this is the same issue as in #390 . If you aren't on py-spy v3.7 can you try upgrading and see if that resolves?
I see; I'm using py-spy 3.5; I'll do some tests using the later version and let you know tomorrow, hopefully it's the same thing; thanks for looking into this!!
:)
Hi! as mentioned in the past I really like your software and I've been using it a lot recently.
I was very occasionally running into an issue where the process I'm trying to monitor would hang after I finished py-spy with crtl + c; the way I'm running py-spy is the following:
py-spy record --native --pid 1234
And what happened was that when I looked into the process I'm trying to monitor by doing
ps aux
I noticed that the state of the process was "T" which means "stopped, either by a job control signal or because it is being traced.". My understanding is that this state could be reached by sending SIGSTOPs to a given proces; I haven't looked very deep into the logic used by py-spy's code whenever the native flag is set but my guess is that maybe what's happening under the hood is that SIGSTOPs + SIGCONTs are being sent to look at the stacktrace of the process in between and, if someone happens to pres ctrl + c in between that time-span the process being monitored will remain in a SIGSTOP state as a SIGCONT wouldn't be send by py-spy on finalization by doing ctrl+c.I was wondering if by any chance this could be possible?
Thanks!:)
The text was updated successfully, but these errors were encountered: