Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.9.2, 5.12.4
-
None
Description
From time to time i observe Qt test cases hanging indefinitely. When attaching with a debugger i get the following stack trace:
"QMutex: destroying locked mutex", ap=ap@entry=0x98f970 "\001") at global\qlogging.cpp:373
[New Thread 17076.0x543c] [New Thread 17076.0x361c] (gdb) bt #0 0x00007ffb692b3081 in ntdll!DbgBreakPoint () from C:\WINDOWS\SYSTEM32\ntdll.dll #1 0x00007ffb692def5b in ntdll!DbgUiRemoteBreakin () from C:\WINDOWS\SYSTEM32\ntdll.dll #2 0x00007ffb68177974 in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll #3 0x00007ffb6927a271 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll #4 0x0000000000000000 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) info thread Id Target Id Frame 1 Thread 17076.0x543c 0x00007ffb692b01e4 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll * 2 Thread 17076.0x361c 0x00007ffb692b3081 in ntdll!DbgBreakPoint () from C:\WINDOWS\SYSTEM32\ntdll.dll (gdb) thread 1 [Switching to thread 1 (Thread 17076.0x543c)] #0 0x00007ffb692b01e4 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll (gdb) bt #0 0x00007ffb692b01e4 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll #1 0x00007ffb65f6c7ce in WaitForMultipleObjectsEx () from C:\WINDOWS\System32\KernelBase.dll #2 0x00007ffb65f6c6be in WaitForMultipleObjects () from C:\WINDOWS\System32\KernelBase.dll #3 0x0000000064941ecd in pthread_cond_init () from <path>\build\CMake\Debug\build\bin\libwinpthread-1.dll #4 0x00000000649421c0 in pthread_cond_init () from <path>\build\CMake\Debug\build\bin\libwinpthread-1.dll #5 0x0000000064942741 in pthread_cond_wait () from <path>\build\CMake\Debug\build\bin\libwinpthread-1.dll #6 0x000000006fd565a9 in libstdc++-6!.cxa_guard_acquire () from <path>\build\CMake\Debug\build\bin\libstdc++-6.dll #7 0x00000000038b83f4 in (anonymous namespace)::Q_QGS_qtDefaultCategory::innerFunction () at io\qloggingcategory.cpp:47 #8 QGlobalStatic<QLoggingCategory, (anonymous namespace)::Q_QGS_qtDefaultCategory::innerFunction, (anonymous namespace)::Q_QGS_qtDefaultCategory::guard>::operator() ( this=<optimized out>) at C:/QtTemp/qt/src/qtbase/src/corelib/global/qglobalstatic.h:135 #9 QLoggingCategory::defaultCategory () at io\qloggingcategory.cpp:388 #10 0x000000000374314a in qt_message_print (msgType=msgType@entry=QtWarningMsg, context=..., message=...) at global\qlogging.cpp:1819 #11 0x0000000003743532 in qt_message (msgType=msgType@entry=QtWarningMsg, context=..., msg=msg@entry=0x3b57240 <qt_adopted_thread_watcher_function(void*)::__PRETTY_FUNCTION__+640> "QMutex: destroying locked mutex", ap=ap@entry=0x98f970 "\001") at global\qlogging.cpp:373 #12 0x0000000003743b69 in QMessageLogger::warning (this=this@entry=0x98f9f0, msg=msg@entry=0x3b57240 <qt_adopted_thread_watcher_function(void*)::__PRETTY_FUNCTION__+640> "QMutex: destroying locked mutex") at global\qlogging.cpp:651 #13 0x000000000374f57d in QMutex::~QMutex (this=0x3dabc60 <(anonymous namespace)::Q_QGS_qtLoggingRegistry::innerFunction()::holder>, __in_chrg=<optimized out>) at thread\qmutex.cpp:203 #14 0x00000000038b8c97 in QLoggingRegistry::~QLoggingRegistry (this=0x3dabc60 <(anonymous namespace)::Q_QGS_qtLoggingRegistry::innerFunction()::holder>, __in_chrg=<optimized out>) at io/qloggingregistry_p.h:111 #15 (anonymous namespace)::Q_QGS_qtLoggingRegistry::Holder::~Holder (this=0x3dabc60 <(anonymous namespace)::Q_QGS_qtLoggingRegistry::innerFunction()::holder>, __in_chrg=<optimized out>) at io\qloggingregistry.cpp:62 #16 __tcf_0 () at io\qloggingregistry.cpp:62 #17 0x0000000003aa6c04 in _execute_onexit_table () from <path>\build\CMake\Debug\build\bin\Qt5Cored.dll #18 0x0000000003731171 in _CRT_INIT () from <path>\build\CMake\Debug\build\bin\Qt5Cored.dll #19 0x0000000003731258 in __DllMainCRTStartup () from <path>\build\CMake\Debug\build\bin\Qt5Cored.dll #20 0x00007ffb69258f07 in ntdll!RtlAnsiStringToUnicodeString () from C:\WINDOWS\SYSTEM32\ntdll.dll #21 0x00007ffb692535bc in ntdll!LdrShutdownProcess () from C:\WINDOWS\SYSTEM32\ntdll.dll #22 0x00007ffb69276dcd in ntdll!RtlExitUserProcess () from C:\WINDOWS\SYSTEM32\ntdll.dll #23 0x00007ffb6817d62a in KERNEL32!FatalExit () from C:\WINDOWS\System32\kernel32.dll #24 0x00007ffb667da2b5 in msvcrt!_exit () from C:\WINDOWS\System32\msvcrt.dll #25 0x00007ffb667da925 in msvcrt!_initterm_e () from C:\WINDOWS\System32\msvcrt.dll #26 0x00000000004014d5 in __tmainCRTStartup () #27 0x000000000040152b in mainCRTStartup () (gdb)
To reproduce, run some qtest application in a loop and wait until it hangs.