[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Deadlock in 5.9.1
From: Milorad Pop-Tosic <pop () hiri ! com>
Date: 2017-08-30 13:29:04
Message-ID: DB4PR06MB0782E9C8E1924B08C3C6285DC09C0 () DB4PR06MB0782 ! eurprd06 ! prod ! outlook ! com
[Download RAW message or body]
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@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@20() Unknown \
user32.dll!_UserCallWinProcCheckWow@36() Unknown \
user32.dll!_DispatchMessageWorker@8() Unknown user32.dll!_DispatchMessageW@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@12() Unknown
ntdll.dll!__RtlUserThreadStart() Unknown
ntdll.dll!__RtlUserThreadStart@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
[Attachment #3 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} \
--></style> </head>
<body dir="ltr">
<div id="divtagdefaultwrapper" \
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" \
dir="ltr"> <p><span style="font-size: 12pt;">We're seeing a deadlock after upgrading \
from PyQt5.8.2 to 5.9.1.</span><span style="font-size: 12pt;"> </span><span \
style="font-size: 12pt;">Since our application is complex, it's difficult to pinpoint \
to what's causing this</span><span style="font-size: 12pt;">. The problem is \
intermittent, but it can be reproduced by </span>repeatedly<span style="font-size: \
12pt;"> clicking on an action.</span><span style="font-size: \
12pt;"> </span><span style="font-size: 12pt;">I managed to get this \
stacktrace with VisualStudio:</span><br> </p>
<p><br>
</p>
<p></p>
<div> <span style="white-space:pre"> \
</span>ntdll.dll!_NtWaitForSingleObject@12()<span style="white-space:pre"> \
</span>Unknown</div> <div> <span style="white-space:pre"> \
</span>KernelBase.dll!WaitForSingleObjectEx()<span style="white-space:pre"> \
</span>Unknown</div> <div> <span style="white-space:pre"> \
</span>python35.dll!take_gil(_ts * tstate=0x1f194160) Line 224<span \
style="white-space:pre"> </span>C</div>
<div> <span style="white-space:pre"> \
</span>python35.dll!PyEval_RestoreThread(_ts * tstate=0x1f194160) Line 452<span \
style="white-space:pre"> </span>C</div>
<div> <span style="white-space:pre"> </span>python35.dll!PyGILState_Ensure() \
Line 821<span style="white-space:pre"> </span>C</div>
<div> <span style="white-space:pre"> </span>sip.pyd!689b3355()<span \
style="white-space:pre"> </span>Unknown</div>
<div> <span style="white-space:pre"> </span>[Frames below may be incorrect \
and/or missing, no symbols loaded for sip.pyd]<span style="white-space:pre"> \
</span></div> <div> <span style="white-space:pre"> \
</span>QtCore.pyd!654b68a4()<span style="white-space:pre"> </span>Unknown</div>
<div>><span style="white-space:pre"> </span>Qt5Core.dll!QObject::~QObject() Line \
986<span style="white-space:pre"> </span>C++</div>
<div> <span style="white-space:pre"> </span>QtCore.pyd!654b4744()<span \
style="white-space:pre"> </span>Unknown</div>
<div> <span style="white-space:pre"> </span>Qt5Core.dll!QObject::event(QEvent * \
e=0x1e632358) Line 1273<span style="white-space:pre"> </span>C++</div>
<div> <span style="white-space:pre"> </span>QtCore.pyd!654b73a7()<span \
style="white-space:pre"> </span>Unknown</div>
<div> <span style="white-space:pre"> \
</span>Qt5Widgets.dll!QApplicationPrivate::notify_helper(QObject * \
receiver=0x1e632358, QEvent * e) Line 3717<span style="white-space:pre"> \
</span>C++</div> <div> <span style="white-space:pre"> \
</span>Qt5Widgets.dll!QApplication::notify(QObject * receiver=0x1e632438, QEvent * \
e=0x19a6a948) Line 3680<span style="white-space:pre"> </span>C++</div>
<div> <span style="white-space:pre"> </span>QtWidgets.pyd!648bd38b()<span \
style="white-space:pre"> </span>Unknown</div>
<div> <span style="white-space:pre"> \
</span>Qt5Core.dll!QCoreApplication::notifyInternal2(QObject * receiver, QEvent * \
event) Line 1018<span style="white-space:pre"> </span>C++</div>
<div> <span style="white-space:pre"> \
</span>Qt5Core.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * \
receiver=0x00000000, int event_type, QThreadData * data=0x1e632438) Line 1678<span \
style="white-space:pre"> </span>C++</div>
<div> <span style="white-space:pre"> \
</span>Qt5Core.dll!QEventDispatcherWin32::sendPostedEvents() Line 1062<span \
style="white-space:pre"> </span>C++</div>
<div> <span style="white-space:pre"> </span>Qt5Core.dll!qt_internal_proc(HWND__ \
* hwnd=0x00460908, unsigned int message=0x00000401, unsigned int wp=0x00000000, long \
lp=0x00000000) Line 236<span style="white-space:pre"> </span>C++</div>
<div> <span style="white-space:pre"> \
</span>user32.dll!__InternalCallWinProc@20()<span style="white-space:pre"> \
</span>Unknown</div> <div> <span style="white-space:pre"> \
</span>user32.dll!_UserCallWinProcCheckWow@36()<span style="white-space:pre"> \
</span>Unknown</div> <div> <span style="white-space:pre"> \
</span>user32.dll!_DispatchMessageWorker@8()<span style="white-space:pre"> \
</span>Unknown</div> <div> <span style="white-space:pre"> \
</span>user32.dll!_DispatchMessageW@4()<span style="white-space:pre"> \
</span>Unknown</div> <div> <span style="white-space:pre"> \
</span>Qt5Core.dll!QEventDispatcherWin32::processEvents(QFlags<enum \
QEventLoop::ProcessEventsFlag> flags={...}) Line 634<span style="white-space:pre"> \
</span>C++</div> <div> <span style="white-space:pre"> \
</span>Qt5Core.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> \
flags={...}) Line 211<span style="white-space:pre"> </span>C++</div>
<div> <span style="white-space:pre"> </span>Qt5Core.dll!QThread::exec() Line \
515<span style="white-space:pre"> </span>C++</div>
<div> <span style="white-space:pre"> </span>QtCore.pyd!6543a023()<span \
style="white-space:pre"> </span>Unknown</div>
<div> <span style="white-space:pre"> \
</span>kernel32.dll!@BaseThreadInitThunk@12()<span style="white-space:pre"> \
</span>Unknown</div> <div> <span style="white-space:pre"> \
</span>ntdll.dll!__RtlUserThreadStart()<span style="white-space:pre"> \
</span>Unknown</div> <div> <span style="white-space:pre"> \
</span>ntdll.dll!__RtlUserThreadStart@8()<span style="white-space:pre"> \
</span>Unknown</div> <div><br>
</div>
<div>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. </div> <div><br>
</div>
<div>We're going to keep trying to isolate the problem into a \
standalone test case, but <span style="font-size: 12pt;">any pointers \
would be much appreciated.</span></div> <div><br>
</div>
<p></p>
<p>Thanks</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); \
background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, \
sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", \
NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", \
EmojiSymbols;"> <p>Milorad</p>
<p></p>
</div>
</div>
</div>
</body>
</html>
[Attachment #4 (unknown)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic