Albert Zeyer added the comment: Here is one. Others are in the issue report on GitHub.
In Thread 5, the PyObject_SetAttr is where some attribute containing a threading.local object is set to None. This threading.local object had a reference to a sqlite connection object (in some TLS contextes). This should also be the actual crashing thread. I use faulthandler which makes it look like Thread 0 crashed in the crash reporter. I had this crash about 5% of the time - but totally unpredictable. But it was always happening in exactly that line where the attribute was set to None. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff8a54e0fa __psynch_cvwait + 10 1 libsystem_c.dylib 0x00007fff85daaf89 _pthread_cond_wait + 869 2 org.python.python 0x000000010006f54e PyThread_acquire_lock + 96 3 org.python.python 0x000000010001d8e3 PyEval_RestoreThread + 61 4 org.python.python 0x0000000100075bf3 0x100009000 + 445427 5 org.python.python 0x0000000100020041 PyEval_EvalFrameEx + 7548 6 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 7 org.python.python 0x0000000100024661 0x100009000 + 112225 8 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 9 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 10 org.python.python 0x0000000100024661 0x100009000 + 112225 11 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 12 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 13 org.python.python 0x000000010005df78 0x100009000 + 348024 14 org.python.python 0x000000010001caba PyObject_Call + 97 15 _objc.so 0x0000000104615898 0x104600000 + 88216 16 libffi.dylib 0x00007fff8236e8a6 ffi_closure_unix64_inner + 508 17 libffi.dylib 0x00007fff8236df66 ffi_closure_unix64 + 70 18 com.apple.AppKit 0x00007fff84f63f3f -[NSApplication _docController:shouldTerminate:] + 75 19 com.apple.AppKit 0x00007fff84f63e4e __91-[NSDocumentController(NSInternal) _closeAllDocumentsWithDelegate:shouldTerminateSelector:]_block_invoke_0 + 159 20 com.apple.AppKit 0x00007fff84f63cea -[NSDocumentController(NSInternal) _closeAllDocumentsWithDelegate:shouldTerminateSelector:] + 1557 21 com.apple.AppKit 0x00007fff84f636ae -[NSDocumentController(NSInternal) __closeAllDocumentsWithDelegate:shouldTerminateSelector:] + 265 22 com.apple.AppKit 0x00007fff84f6357f -[NSApplication _shouldTerminate] + 772 23 com.apple.AppKit 0x00007fff84f9134f -[NSApplication(NSAppleEventHandling) _handleAEQuit] + 403 24 com.apple.AppKit 0x00007fff84d40261 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 660 25 com.apple.Foundation 0x00007fff867e112b -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 308 26 com.apple.Foundation 0x00007fff867e0f8d _NSAppleEventManagerGenericHandler + 106 27 com.apple.AE 0x00007fff832eeb48 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 307 28 com.apple.AE 0x00007fff832ee9a9 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 37 29 com.apple.AE 0x00007fff832ee869 aeProcessAppleEvent + 318 30 com.apple.HIToolbox 0x00007fff8e19f8e9 AEProcessAppleEvent + 100 31 com.apple.AppKit 0x00007fff84d3c916 _DPSNextEvent + 1456 32 com.apple.AppKit 0x00007fff84d3bed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 33 com.apple.AppKit 0x00007fff84d33283 -[NSApplication run] + 517 34 libffi.dylib 0x00007fff8236dde4 ffi_call_unix64 + 76 35 libffi.dylib 0x00007fff8236e619 ffi_call + 853 36 _objc.so 0x000000010461a663 PyObjCFFI_Caller + 1980 37 _objc.so 0x000000010462f43e 0x104600000 + 193598 38 org.python.python 0x000000010001caba PyObject_Call + 97 39 org.python.python 0x0000000100020225 PyEval_EvalFrameEx + 8032 40 org.python.python 0x00000001000245eb 0x100009000 + 112107 41 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 42 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 43 org.python.python 0x000000010001dad7 PyEval_EvalCode + 54 44 org.python.python 0x0000000100054933 0x100009000 + 309555 45 org.python.python 0x00000001000549ff PyRun_FileExFlags + 165 46 org.python.python 0x00000001000543e9 PyRun_SimpleFileExFlags + 410 47 albertzeyer.MusicPlayer 0x0000000100001f54 main + 682 (main.m:67) 48 albertzeyer.MusicPlayer 0x0000000100001c6d _start + 203 49 albertzeyer.MusicPlayer 0x0000000100001ba1 start + 33 Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff8a54ed16 kevent + 10 1 libdispatch.dylib 0x00007fff88230dea _dispatch_mgr_invoke + 883 2 libdispatch.dylib 0x00007fff882309ee _dispatch_mgr_thread + 54 Thread 2: 0 libsystem_kernel.dylib 0x00007fff8a54e0fa __psynch_cvwait + 10 1 libsystem_c.dylib 0x00007fff85daaf89 _pthread_cond_wait + 869 2 org.python.python 0x000000010006f54e PyThread_acquire_lock + 96 3 org.python.python 0x000000010001d8e3 PyEval_RestoreThread + 61 4 _sqlite3.so 0x000000010a4041f1 pysqlite_connection_dealloc + 76 5 org.python.python 0x00000001000729f3 0x100009000 + 432627 6 org.python.python 0x00000001000729f3 0x100009000 + 432627 7 org.python.python 0x0000000100052b55 PyThreadState_Clear + 136 8 org.python.python 0x000000010007610a 0x100009000 + 446730 9 libsystem_c.dylib 0x00007fff85da6742 _pthread_start + 327 10 libsystem_c.dylib 0x00007fff85d93181 thread_start + 13 Thread 3: 0 libsystem_kernel.dylib 0x00007fff8a54e0fa __psynch_cvwait + 10 1 libsystem_c.dylib 0x00007fff85daaf89 _pthread_cond_wait + 869 2 org.python.python 0x000000010006f54e PyThread_acquire_lock + 96 3 org.python.python 0x000000010001d8e3 PyEval_RestoreThread + 61 4 _objc.so 0x00000001046234a3 0x104600000 + 144547 5 org.python.python 0x00000001000a4194 0x100009000 + 635284 6 org.python.python 0x0000000100021a49 PyEval_EvalFrameEx + 14212 7 org.python.python 0x00000001000245eb 0x100009000 + 112107 8 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 9 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 10 org.python.python 0x000000010005df78 0x100009000 + 348024 11 org.python.python 0x000000010001caba PyObject_Call + 97 12 org.python.python 0x000000010001ec59 PyEval_EvalFrameEx + 2452 13 org.python.python 0x00000001000245eb 0x100009000 + 112107 14 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 15 org.python.python 0x00000001000245eb 0x100009000 + 112107 16 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 17 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 18 org.python.python 0x000000010005df78 0x100009000 + 348024 19 org.python.python 0x000000010001caba PyObject_Call + 97 20 org.python.python 0x000000010003719a 0x100009000 + 188826 21 org.python.python 0x000000010001caba PyObject_Call + 97 22 org.python.python 0x0000000100023dfc PyEval_CallObjectWithKeywords + 177 23 org.python.python 0x0000000100076010 0x100009000 + 446480 24 libsystem_c.dylib 0x00007fff85da6742 _pthread_start + 327 25 libsystem_c.dylib 0x00007fff85d93181 thread_start + 13 Thread 4: 0 libsystem_kernel.dylib 0x00007fff8a54e0fa __psynch_cvwait + 10 1 libsystem_c.dylib 0x00007fff85daaf89 _pthread_cond_wait + 869 2 org.python.python 0x000000010006f54e PyThread_acquire_lock + 96 3 org.python.python 0x000000010001d8e3 PyEval_RestoreThread + 61 4 org.python.python 0x0000000100053351 PyGILState_Ensure + 93 5 _objc.so 0x0000000104609b6e 0x104600000 + 39790 6 libobjc.A.dylib 0x00007fff880c6230 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 464 7 com.apple.CoreFoundation 0x00007fff8ec15342 _CFAutoreleasePoolPop + 34 8 com.apple.Foundation 0x00007fff867e003d -[NSAutoreleasePool release] + 154 9 com.apple.CoreFoundation 0x00007fff8ebed85a CFRelease + 170 10 _objc.so 0x000000010462349b 0x104600000 + 144539 11 org.python.python 0x00000001000a4194 0x100009000 + 635284 12 org.python.python 0x0000000100021a49 PyEval_EvalFrameEx + 14212 13 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 14 org.python.python 0x0000000100024661 0x100009000 + 112225 15 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 16 org.python.python 0x00000001000245eb 0x100009000 + 112107 17 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 18 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 19 org.python.python 0x000000010005df78 0x100009000 + 348024 20 org.python.python 0x000000010001caba PyObject_Call + 97 21 org.python.python 0x000000010001ec59 PyEval_EvalFrameEx + 2452 22 org.python.python 0x00000001000245eb 0x100009000 + 112107 23 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 24 org.python.python 0x00000001000245eb 0x100009000 + 112107 25 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 26 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 27 org.python.python 0x000000010005df78 0x100009000 + 348024 28 org.python.python 0x000000010001caba PyObject_Call + 97 29 org.python.python 0x000000010003719a 0x100009000 + 188826 30 org.python.python 0x000000010001caba PyObject_Call + 97 31 org.python.python 0x0000000100023dfc PyEval_CallObjectWithKeywords + 177 32 org.python.python 0x0000000100076010 0x100009000 + 446480 33 libsystem_c.dylib 0x00007fff85da6742 _pthread_start + 327 34 libsystem_c.dylib 0x00007fff85d93181 thread_start + 13 Thread 5: 0 org.python.python 0x000000010007575e 0x100009000 + 444254 1 org.python.python 0x0000000100071cbe 0x100009000 + 429246 2 org.python.python 0x0000000100071bcd PyDict_SetItem + 145 3 org.python.python 0x0000000100079a55 PyObject_GenericSetAttr + 327 4 org.python.python 0x0000000100079538 PyObject_SetAttr + 157 5 org.python.python 0x000000010001f303 PyEval_EvalFrameEx + 4158 6 org.python.python 0x00000001000245eb 0x100009000 + 112107 7 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 8 org.python.python 0x00000001000245eb 0x100009000 + 112107 9 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 10 org.python.python 0x00000001000245eb 0x100009000 + 112107 11 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 12 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 13 org.python.python 0x000000010005df78 0x100009000 + 348024 14 org.python.python 0x000000010001caba PyObject_Call + 97 15 org.python.python 0x000000010001ec59 PyEval_EvalFrameEx + 2452 16 org.python.python 0x00000001000245eb 0x100009000 + 112107 17 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 18 org.python.python 0x00000001000245eb 0x100009000 + 112107 19 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 20 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 21 org.python.python 0x000000010005df78 0x100009000 + 348024 22 org.python.python 0x000000010001caba PyObject_Call + 97 23 org.python.python 0x000000010003719a 0x100009000 + 188826 24 org.python.python 0x000000010001caba PyObject_Call + 97 25 org.python.python 0x0000000100023dfc PyEval_CallObjectWithKeywords + 177 26 org.python.python 0x0000000100076010 0x100009000 + 446480 27 libsystem_c.dylib 0x00007fff85da6742 _pthread_start + 327 28 libsystem_c.dylib 0x00007fff85d93181 thread_start + 13 Thread 6: 0 libsystem_kernel.dylib 0x00007fff8a54e386 __semwait_signal + 10 1 libsystem_c.dylib 0x00007fff85e30800 nanosleep + 163 2 libsystem_c.dylib 0x00007fff85e30717 usleep + 54 3 ffmpeg.so 0x000000010bd7609d PlayerObject::workerProc(PyMutex&, bool&) + 509 (ffmpeg_player_decoding.cpp:1087) 4 ffmpeg.so 0x000000010bd78ac2 boost::function2<void, PyMutex&, bool&>::operator()(PyMutex&, bool&) const + 28 (function_template.hpp:759) 5 ffmpeg.so 0x000000010bd78736 PyThread_thread(void*) + 25 (ffmpeg_utils.cpp:98) 6 libsystem_c.dylib 0x00007fff85da6742 _pthread_start + 327 7 libsystem_c.dylib 0x00007fff85d93181 thread_start + 13 Thread 7: 0 libsystem_kernel.dylib 0x00007fff8a54e322 __select + 10 1 time.so 0x00000001007f9d83 0x1007f9000 + 3459 2 org.python.python 0x0000000100020041 PyEval_EvalFrameEx + 7548 3 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 4 org.python.python 0x000000010005df78 0x100009000 + 348024 5 org.python.python 0x000000010001caba PyObject_Call + 97 6 org.python.python 0x000000010001ec59 PyEval_EvalFrameEx + 2452 7 org.python.python 0x00000001000245eb 0x100009000 + 112107 8 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 9 org.python.python 0x00000001000245eb 0x100009000 + 112107 10 org.python.python 0x00000001000200d2 PyEval_EvalFrameEx + 7693 11 org.python.python 0x000000010001e281 PyEval_EvalCodeEx + 1956 12 org.python.python 0x000000010005df78 0x100009000 + 348024 13 org.python.python 0x000000010001caba PyObject_Call + 97 14 org.python.python 0x000000010003719a 0x100009000 + 188826 15 org.python.python 0x000000010001caba PyObject_Call + 97 16 org.python.python 0x0000000100023dfc PyEval_CallObjectWithKeywords + 177 17 org.python.python 0x0000000100076010 0x100009000 + 446480 18 libsystem_c.dylib 0x00007fff85da6742 _pthread_start + 327 19 libsystem_c.dylib 0x00007fff85d93181 thread_start + 13 Thread 8:: com.apple.audio.IOThread.client 0 libsystem_kernel.dylib 0x00007fff8a54c686 mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff8a54bc42 mach_msg + 70 2 com.apple.audio.CoreAudio 0x00007fff825a117a HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned int, unsigned int, mach_msg_header_t*, bool, unsigned int) + 98 3 com.apple.audio.CoreAudio 0x00007fff825a1108 HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 42 4 com.apple.audio.CoreAudio 0x00007fff8259f8db HALC_ProxyIOContext::IOWorkLoop() + 1209 5 com.apple.audio.CoreAudio 0x00007fff8259f391 HALC_ProxyIOContext::IOThreadEntry(void*) + 83 6 com.apple.audio.CoreAudio 0x00007fff8259f24b HALB_IOThread::Entry(void*) + 75 7 libsystem_c.dylib 0x00007fff85da6742 _pthread_start + 327 8 libsystem_c.dylib 0x00007fff85d93181 thread_start + 13 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17263> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com