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 1099 - Garbage collector problems...
: Garbage collector problems...
Status: RESOLVED DUPLICATE of bug 1110
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: PC Linux
: P3 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2011-12-21 01:45 EET by David Butler
Modified: 2012-01-05 06:38 EET (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Butler 2011-12-21 01:45:19 EET
This bug started in python's bug tracker more info there:
http://bugs.python.org/issue13616

#0  0xb76fe424 in __kernel_vsyscall ()
#1  0xb740ccb1 in *__GI_raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0xb740e3f2 in *__GI_abort () at abort.c:92
#3  0xb766193f in Py_FatalError (msg=0xb76949de "GC object already tracked")
    at Python/pythonrun.c:1670
#4  0xb7595a3a in PyMethod_New (func=<function at remote 0x8d649cc>, self=
    <QtReactor(waker=<_UnixWaker(i=13, fileno=<function at remote 0x93f6994>,
reactor=<...>, o=14) at remote 0x93f3dac>, threadCallQueue=[(<instancemethod at
remote 0x9b5639c>, (0,), {})], _cancellations=0, _justStopped=False,
_newTimedCalls=[], _pendingTimedCalls=[<DelayedCall(resetter=<instancemethod at
remote 0x9b5d504>, seconds=<built-in function time>, args=(),
canceller=<instancemethod at remote 0x9cb48ec>, delayed_time=0, kw={},
func=<LoopingCall(a=(...), interval=2, clock=<...>, _expectNextCallAt=<float at
remote 0x9ab7b44>, f=<instancemethod at remote 0x96db34c>,
deferred=<Deferred(_canceller=None, callbacks=[((<function at remote
0x8bc6f44>, None, None), (<instancemethod at remote 0x96db374>, (...), {}))])
at remote 0x96da0cc>, running=True, kw={}, starttime=<float at remote
0x8c3f0f4>, call=<...>, _runAtStart=True) at remote 0x96d776c>, time=<float at
remote 0x9d4cb74>, cancelled=0, called=0) at remote 0x9d1184c>,
<DelayedCall(resetter=<instancemethod at remote 0xa2c4edc>, seconds=<built-in
function ti...(truncated), klass=<type at remote 0x8e5a3dc>) at
Objects/classobject.c:2250
#5  0xb6c71225 in PySide::DynamicSlotDataV2::callback (this=0x96b6440)
    at
/var/tmp/portage/dev-python/pyside-1.0.9/work/pyside-qt4.7+1.0.9/libpyside/globalreceiverv2.cpp:129
#6  0xb6c718fc in PySide::GlobalReceiverV2::qt_metacall (this=0x9519b88, 
    call=QMetaObject::InvokeMetaMethod, id=5, args=0xbffbeef4)
    at
/var/tmp/portage/dev-python/pyside-1.0.9/work/pyside-qt4.7+1.0.9/libpyside/globalreceiverv2.cpp:289
#7  0xb6ab76a7 in QMetaObject::metacall (object=0x9519b88,
cl=QMetaObject::InvokeMetaMethod, 
    idx=5, argv=0xbffbeef4) at kernel/qmetaobject.cpp:237
#8  0xb6ac9b8c in QMetaObject::activate (sender=0x9760e40, m=0xb6c5d644, 
    local_signal_index=<optimized out>, argv=<optimized out>) at
kernel/qobject.cpp:3278
#9  0xb6b21b27 in QTimer::timeout (this=0x9760e40) at
.moc/debug-shared/moc_qtimer.cpp:128
#10 0xb6acfb01 in QTimer::timerEvent (this=0x9760e40, e=0xbffbf41c) at
kernel/qtimer.cpp:271
#11 0xb6e35efb in QTimerWrapper::timerEvent (this=0x9760e40, arg__1=0xbffbf41c)
    at
/var/tmp/portage/dev-python/pyside-1.0.9/work/pyside-1.0.9_build/PySide/QtCore/PySide/QtCore/qtimer_wrapper.cpp:233
#12 0xb6ac2e67 in QObject::event (this=0x9760e40, e=0x6) at
kernel/qobject.cpp:1181
#13 0xb6e37717 in QTimerWrapper::event (this=0x9760e40, arg__1=0xbffbf41c)
    at
/var/tmp/portage/dev-python/pyside-1.0.9/work/pyside-1.0.9_build/PySide/QtCore/PySide/QtCore/qtimer_wrapper.cpp:164
....

from Amaury Forgeot d'Arc (amaury.forgeotdarc) of python:
"
PySide::DynamicSlotDataV2::callback() calls PyMethod_New() without getting the
GIL.  The Python allocator is not thread-safe, operations are supposed to be
serialized by this Global Interpreter Lock.

I suggest to modify this DynamicSlotDataV2::callback() and add the line
"Shiboken::GilState gil;" at the beginning of the function.
"
Comment 1 David Butler 2011-12-21 01:48:10 EET
(gdb) info threads
  Id   Target Id         Frame 
  12   Thread 0xb0afab70 (LWP 2752) 0xb76fe424 in __kernel_vsyscall ()
  11   Thread 0xb12fbb70 (LWP 2751) 0xb76fe424 in __kernel_vsyscall ()
  10   Thread 0xaf2f7b70 (LWP 2755) 0xb76fe424 in __kernel_vsyscall ()
  9    Thread 0xb22fdb70 (LWP 2749) 0xb76fe424 in __kernel_vsyscall ()
  8    Thread 0xb2afeb70 (LWP 2748) 0xb76fe424 in __kernel_vsyscall ()
  7    Thread 0xb1afcb70 (LWP 2750) 0xb76fe424 in __kernel_vsyscall ()
  6    Thread 0xb32ffb70 (LWP 2747) 0xb76fe424 in __kernel_vsyscall ()
  5    Thread 0xaeaeeb70 (LWP 2757) 0xb76fe424 in __kernel_vsyscall ()
  4    Thread 0xb02f9b70 (LWP 2753) 0xb76fe424 in __kernel_vsyscall ()
  3    Thread 0xb3ce6b70 (LWP 2740) 0xb76fe424 in __kernel_vsyscall ()
  2    Thread 0xafaf8b70 (LWP 2754) 0xb7039cda in __i686.get_pc_thunk.bx ()
   from /usr/lib/python2.7/lib-dynload/datetime.so
* 1    Thread 0xb73af6c0 (LWP 2597) 0xb76fe424 in __kernel_vsyscall ()
Comment 2 David Butler 2012-01-05 06:38:18 EET
#1110 appears to be the same thing as this... closing this one, because the
other one has more information

*** This bug has been marked as a duplicate of bug 1110 ***