[PyQt] Deadlock in 5.9.1
Milorad Pop-Tosic
pop at hiri.com
Wed Aug 30 14:29:04 BST 2017
We're seeing a deadlock after upgrading from PyQt5.8.2 to 5.9.1. Since our application is complex, it's difficult to pinpoint to what's causing this. The problem is intermittent, but it can be reproduced by repeatedly clicking on an action. I managed to get this stacktrace with VisualStudio:
ntdll.dll!_NtWaitForSingleObject at 12
() Unknown
KernelBase.dll!WaitForSingleObjectEx() Unknown
python35.dll!take_gil(_ts * tstate=0x1f194160) Line 224 C
python35.dll!PyEval_RestoreThread(_ts * tstate=0x1f194160) Line 452 C
python35.dll!PyGILState_Ensure() Line 821 C
sip.pyd!689b3355() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for sip.pyd]
QtCore.pyd!654b68a4() Unknown
> Qt5Core.dll!QObject::~QObject() Line 986 C++
QtCore.pyd!654b4744() Unknown
Qt5Core.dll!QObject::event(QEvent * e=0x1e632358) Line 1273 C++
QtCore.pyd!654b73a7() Unknown
Qt5Widgets.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x1e632358, QEvent * e) Line 3717 C++
Qt5Widgets.dll!QApplication::notify(QObject * receiver=0x1e632438, QEvent * e=0x19a6a948) Line 3680 C++
QtWidgets.pyd!648bd38b() Unknown
Qt5Core.dll!QCoreApplication::notifyInternal2(QObject * receiver, QEvent * event) Line 1018 C++
Qt5Core.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver=0x00000000, int event_type, QThreadData * data=0x1e632438) Line 1678 C++
Qt5Core.dll!QEventDispatcherWin32::sendPostedEvents() Line 1062 C++
Qt5Core.dll!qt_internal_proc(HWND__ * hwnd=0x00460908, unsigned int message=0x00000401, unsigned int wp=0x00000000, long lp=0x00000000) Line 236 C++
user32.dll!__InternalCallWinProc at 20
() Unknown
user32.dll!_UserCallWinProcCheckWow at 36
() Unknown
user32.dll!_DispatchMessageWorker at 8
() Unknown
user32.dll!_DispatchMessageW at 4
() Unknown
Qt5Core.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 634 C++
Qt5Core.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 211 C++
Qt5Core.dll!QThread::exec() Line 515 C++
QtCore.pyd!6543a023() Unknown
kernel32.dll!@BaseThreadInitThunk at 12
() Unknown
ntdll.dll!__RtlUserThreadStart() Unknown
ntdll.dll!__RtlUserThreadStart at 8
() Unknown
As far as I understand this stacktrace, something is trying to get GIL at a QObject destruction, so I'm guessing that something that was supposed to release the GIL didn't.
We're going to keep trying to isolate the problem into a standalone test case, but any pointers would be much appreciated.
Thanks
Milorad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170830/ee3966e2/attachment.html>
More information about the PyQt
mailing list