Open ghmrs356 opened 11 years ago
Looks like a deadlock in CFSocket between threads 1 and 6. I'm surprised to see the MYNetwork code running on the CFSocket thread — apparently the CFSocket was holding the last reference to a MYDNSConnection object so when it released it during teardown it ended up invoking my object's dealloc method. I'll have to see how to get the dealloc to happen on the main thread.
OK, great. Let me know if you want me to try out a fix (in case you can't recreate it).
It just happened on the Mac as well, though I can't recreate it easily. I wasn't debugging it so I took a sample.
Sampling process 31286 for 3 seconds with 1 millisecond of run time between samples Sampling completed, processing symbols... Analysis of sampling rubiTrack 3 (pid 31286) every 1 millisecond Process: rubiTrack 3 [31286] Path: /Users/markus/Projects/rubiTrack/DerivedData/rubiTrack/Build/Products/Debug/rubiTrack 3.app/Contents/MacOS/rubiTrack 3 Load Address: 0x1057eb000 Identifier: com.shiftoption.rubitrack Version: 3.2 (1640) Code Type: X86-64 (Native) Parent Process: launchd [154]
Date/Time: 2013-06-13 08:58:15.255 +0200 OS Version: Mac OS X 10.8.4 (12E55) Report Version: 7
Call graph: 2265 Thread_1072487 DispatchQueue_1: com.apple.main-thread (serial)
Total number in stack (recursive counted multiple, when >=5):
Sort by top of stack, same collapsed (when >= 5): _spin_lock$VARIANT$mp (in libsystem_c.dylib) 6795 workq_kernreturn (in libsystem_kernel.dylib) 2280 psynch_cvwait (in libsystem_kernel.dylib) 2265 kevent (in libsystem_kernel.dylib) 2265
Binary Images:
0x1057eb000 - 0x105c1bff7 +com.shiftoption.rubitrack (3.2 - 1640) <316E7C13-0567-30C7-A3BE-EB87BE03A97D> /Users/markus/Projects/rubiTrack/DerivedData/rubiTrack/Build/Products/Debug/rubiTrack 3.app/Contents/MacOS/rubiTrack 3
0x105f85000 - 0x105fa3ff7 +org.andymatuschak.Sparkle (1.5 Beta [git] - 8c9005e) <35E58E70-3CE9-3668-93CF-3436F9F7E21E> /Users/markus/Projects/rubiTrack/DerivedData/rubiTrack/Build/Products/Debug/rubiTrack 3.app/Contents/Frameworks/Sparkle.framework/Versions/A/Sparkle
0x10a7a9000 - 0x10a7aaffb +cl_kernels (??? - ???) <3C3D6D55-266F-40A3-9552-33D387BC909C> cl_kernels
0x10a947000 - 0x10a954fff libGPUSupport.dylib (??? - ???) <0D32763C-7F3D-3FDB-9EDB-760BB7AFFA04> /System/Library/PrivateFrameworks/GPUSupport.framework/Versions/A/Libraries/libGPUSupport.dylib
0x10a95b000 - 0x10a960fff com.apple.IOAccelerator (74.5.1 - 74.5.1) <574EC60B-E292-3FEA-8A66-B12DB2C1CEC5> /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
0x10ab68000 - 0x10ab68ffb +cl_kernels (??? - ???) <5B4C41B5-0672-4215-A342-1405D93AF40C> cl_kernels
0x10ab96000 - 0x10aba2fff libGPUSupportMercury.dylib (??? - ???) <971EDFC6-3E6A-375C-9133-F50DFDDCEBDD> /System/Library/PrivateFrameworks/GPUSupport.framework/Versions/A/Libraries/libGPUSupportMercury.dylib
0x10abaa000 - 0x10abb3fe7 libcldcpuengine.dylib (2.2.16 - compatibility 1.0.0)
When I'm lauching a listener, shut it down and launch it again, the call to [listener open] never returns. It seems deadlocked with thread 6.
Complete backtraces of all threads below
Code to startup and shutdown