PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 1139 - Crash at exit due to thread state (tstate) being NULL
: Crash at exit due to thread state (tstate) being NULL
Status: NEW
Product: PySide
Classification: Unclassified
Component: Shiboken
: HEAD
: Macintosh Mac OS
: P2 major
Assigned To: Paulo Alcantara
:
:
:
  Show dependency treegraph
 
Reported: 2012-02-09 18:21 EET by Jason McCampbell
Modified: 2012-03-08 16:57 EET (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason McCampbell 2012-02-09 18:21:14 EET
When running our regression suite we occasionally see a crash at exit in
PyErr_Occurred().  The stack trace is below.  The issue is that the static
destructor for the binding manager singleton is triggered after the Python
interpreter has shutdown.  If there are any weak references in a not-yet
released object, the call into the interpreter is illegal.

This may be related to bug #1075 but I couldn't tell.  I will submit a patch to
github.

Jason



(gdb) where
#0  0x000daa43 in PyErr_Occurred () at Python/errors.c:80
#1  0x0008160f in PyObject_ClearWeakRefs (object=0x291b8160) at
Objects/weakrefobject.c:916
#2  0x01656ef6 in SbkDeallocWrapper (pyObj=0x291b8160) at
/Users/jmccampbell/packages/PySide/shiboken/libshiboken/basewrapper.cpp:210
#3  0x000708d7 in subtype_dealloc (self=0x291b8160) at
Objects/typeobject.c:1014
#4  0x01654b74 in Shiboken::Object::destroy (self=0x291b8160,
cppData=0x291b8258) at
/Users/jmccampbell/packages/PySide/shiboken/libshiboken/basewrapper.cpp:1087
#5  0x0166bed2 in Shiboken::BindingManager::~BindingManager (this=0x1687b88) at
/Users/jmccampbell/packages/PySide/shiboken/libshiboken/bindingmanager.cpp:164
#6  0x0166bf6f in __tcf_0 () at
/Users/jmccampbell/packages/PySide/shiboken/libshiboken/bindingmanager.cpp:171
#7  0x99475bff in __cxa_finalize ()
#8  0x99475b14 in exit ()
#9  0x000f33bf in Py_Exit (sts=Could not find the frame base for "Py_Exit".
) at Python/pythonrun.c:1755
#10 0x000f1be9 in handle_system_exit () at Python/pythonrun.c:1127
#11 0x000f1c17 in PyErr_PrintEx (set_sys_last_vars=1) at
Python/pythonrun.c:1137
#12 0x000f18c0 in PyErr_Print () at Python/pythonrun.c:1040
#13 0x000f1475 in PyRun_SimpleFileExFlags (fp=0xa0be08e0, filename=0xbffff5de
"./nosetests", closeit=1, flags=0xbffff3d8) at Python/pythonrun.c:940
#14 0x000f0d24 in PyRun_AnyFileExFlags (fp=0xa0be08e0, filename=0xbffff5de
"./nosetests", closeit=1, flags=0xbffff3d8) at Python/pythonrun.c:740
#15 0x0010afcd in Py_Main (argc=8, argv=0xbffff4c0) at Modules/main.c:599
#16 0x00002532 in main (argc=8, argv=0xbffff4c0) at ./Modules/python.c:23
Comment 1 Jason McCampbell 2012-02-09 18:28:11 EET
Submitted a pull request to GitHub: https://github.com/PySide/Shiboken/pull/63
Comment 2 Matti Airas 2012-03-08 16:57:29 EET
PySide is now a Qt-addon and uses Qt Project's JIRA tool for tracking bugs.
Please verify that the bug is still valid and re-submit it in the address
below:

https://bugreports.qt-project.org/

Sorry for the inconvenience!