-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
vmprof causes process to hang #116
Comments
Besides this issue, I have found vmprof to be very useful and look forward to using it more in the future, thanks for such as great tool! |
Can you post some more information about your system? If have seen this issue once, but could not reproduce it. PyGILState_GetThisThreadState seems not to be able to acquire the lock and hangs forever. |
Python version: python 2.7.3 I am trying to get our system running under @planrich is there any other information that you want? |
got python with debug information working:
Also our process is single threaded. |
Thanks, as I see things now the reason for this is the following: PyGILState_GetThisThreadState looks up the thread local state which uses a mutex (keymutex in find_key, Python/thread.c). Assuming the following (as shown in the gdb stack trace in your first post): PyGILState_Release also calls find_key and the signal occurs just after the keymutex has been acuqired. The signal in PyGILState_GetThisThreadState (which also tries to acquire keymutex) will hang, forever. This could have happened most of the previous releases already. Thinking about a fix for that. |
so good news, I have worked around the issue described above and uploaded a pre release (version 0.4.2.dev1). Could you install that version an try again? pip install vmprof --pre should do |
@planrich thanks, I tested out 0.4.2.dev1 and its now working! |
Fix has been released in 0.4.2, closing |
Released a fix, closing this issue. |
When enabling vmprof in a large gevent based server process, it outputs data for a few minutes then causes everything to hang.
when attaching gdb to the process and looking at the backtrace I get the following (confirmed I saw the same trace twice):
I am not sure what other information would be useful to debug this issue.
The text was updated successfully, but these errors were encountered: