This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2008-08-21.12:39:38
SpamBayes Score 0.00011630794
Marked as misclassified No
Message-id <1219322380.25.0.792509106776.issue3632@psf.upfronthosting.co.za>
In-reply-to
Content
"pyo" macro from gdbinit (see #3631) uses _PyObject_Dump() to display 
an object. This function calls (indirectly) string_print() to display 
one line of text. But if the GIL is released (I guess it's the GIL or 
is it called the "thread state"?), gdb crashs Python:

   object  : Fatal Python error: PyEval_SaveThread: NULL tstate
   Program received signal SIGABRT, Aborted.
   0xffffe410 in __kernel_vsyscall ()

Workaround: ensure GIL before Py_BEGIN_ALLOW_THREADS... That sounds 
ugly but it works :-) So I propose to enable it in debug mode (#ifdef 
Py_DEBUG) with a patch.

I guess that the issue is very specific to (gdb) debugging and should 
not affect normal usage of Python. That's why I choosed to enable it 
only in debug mode.
History
Date User Action Args
2008-08-21 12:39:40vstinnersetrecipients: + vstinner
2008-08-21 12:39:40vstinnersetmessageid: <1219322380.25.0.792509106776.issue3632@psf.upfronthosting.co.za>
2008-08-21 12:39:39vstinnerlinkissue3632 messages
2008-08-21 12:39:38vstinnercreate