显然死锁

时间:2015-09-02 13:57:25

标签: ios xcode debugging deadlock

我正忙着在我正在开发的应用中追逐功能。这些症状类似于死锁(操作只是在测试过程中停止,最终测试超时会触发)。我在解决这个问题时遇到了很大麻烦,尤其是因为我无法触发错误;它有时会发生。

我现在已经抓住了这个行为,但我不确定如何继续。我已经停止了测试,并采取了我的队列状态的screendump。我在线程/队列/死锁调试方面都不是专家,但这里的任何内容对我来说都不同寻常。还有其他人在这里看到了什么吗?

enter image description here enter image description here

对于它的价值,我还试图在这个状态下对该过程进行抽样(使用活动监视器)。对我来说,它看起来与Xcode向我展示的相似并不令人惊讶:

Call graph:
2663 Thread_680518   DispatchQueue_1: com.apple.main-thread  (serial)
+ 2663 start  (in libdyld.dylib) + 1  [0x10acd5145]
+   2663 main  (in QReport) + 111  [0x10593b8df]  main.m:16
+     2663 UIApplicationMain  (in UIKit) + 1282  [0x1076198c0]
+       2663 GSEventRunModal  (in GraphicsServices) + 161  [0x10a0bba3e]
+         2663 CFRunLoopRunSpecific  (in CoreFoundation) + 470  [0x108f31366]
+           2663 __CFRunLoopRun  (in CoreFoundation) + 1901  [0x108f31d3d]
+             2663 __CFRunLoopDoTimer  (in CoreFoundation) + 1045  [0x108f6fd35]
+               2663 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__  (in CoreFoundation) + 20  [0x108f70174]
+                 2663 __NSFireDelayedPerform  (in Foundation) + 387  [0x10689d1e5]
+                   2663 +[XCTestProbe runTests:]  (in XCTest) + 182  [0x1133acb20]
+                     2663 -[XCTestDriver _checkForTestManager]  (in XCTest) + 234  [0x11339ca8d]
+                       2663 -[XCTestDriver _runSuite]  (in XCTest) + 269  [0x11339c060]
+                         2663 -[XCTestObservationCenter _observeTestExecutionForBlock:]  (in XCTest) + 162  [0x1133a6edd]
+                           2663 __25-[XCTestDriver _runSuite]_block_invoke  (in XCTest) + 56  [0x11339c129]
+                             2663 -[XCTest run]  (in XCTest) + 260  [0x1133a9c35]
+                               2663 -[XCTestSuite performTest:]  (in XCTest) + 379  [0x11339f08b]
+                                 2663 -[XCTest run]  (in XCTest) + 260  [0x1133a9c35]
+                                   2663 -[XCTestSuite performTest:]  (in XCTest) + 379  [0x11339f08b]
+                                     2663 -[XCTest run]  (in XCTest) + 260  [0x1133a9c35]
+                                       2663 -[XCTestSuite performTest:]  (in XCTest) + 379  [0x11339f08b]
+                                         2663 -[XCTest run]  (in XCTest) + 260  [0x1133a9c35]
+                                           2663 -[XCTestCase performTest:]  (in XCTest) + 150  [0x1133a0379]
+                                             2663 -[XCTestCase invokeTest]  (in XCTest) + 253  [0x1133a017a]
+                                               2663 -[NSInvocation invoke]  (in CoreFoundation) + 290  [0x108efec42]
+                                                 2663 __invoking___  (in CoreFoundation) + 140  [0x108efedec]
+                                                   2663 -[SynchronizationTests testCreateInspectionAndSyncAndUpdateInspectionAndSync]  (in QReport Tests) + 510  [0x1132309de]  SynchronizationTests.m:249
+                                                     2663 -[QReportTestCase waitForExpectations]  (in QReport Tests) + 67  [0x113250fc3]  QReportTestCase.m:250
+                                                       2663 -[XCTestCase(AsynchronousTesting) waitForExpectationsWithTimeout:handler:]  (in XCTest) + 942  [0x1133ae767]
+                                                         2663 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]  (in Foundation) + 275  [0x1068a0f92]
+                                                           2663 CFRunLoopRunSpecific  (in CoreFoundation) + 470  [0x108f31366]
+                                                             2663 __CFRunLoopRun  (in CoreFoundation) + 1287  [0x108f31ad7]
+                                                               2663 __CFRunLoopServiceMachPort  (in CoreFoundation) + 212  [0x108f32624]
+                                                                 2663 mach_msg  (in libsystem_kernel.dylib) + 55  [0x10afd764f]
+                                                                   2663 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x10afd84de]
2663 Thread_680544   DispatchQueue_2: com.apple.libdispatch-manager  (serial)
+ 2663 _dispatch_mgr_thread  (in libdispatch.dylib) + 54  [0x10ac95d94]
+   2663 kevent64  (in libsystem_kernel.dylib) + 10  [0x10afde232]
2663 Thread_680545   DispatchQueue_118: parsing queue  (serial)
+ 2663 start_wqthread  (in libsystem_pthread.dylib) + 13  [0x10b00c3dd]
+   2663 _pthread_wqthread  (in libsystem_pthread.dylib) + 729  [0x10b00ea9d]
+     2663 _dispatch_worker_thread3  (in libdispatch.dylib) + 98  [0x10ac92d59]
+       2663 _dispatch_root_queue_drain  (in libdispatch.dylib) + 534  [0x10ac91c85]
+         2663 _dispatch_queue_invoke  (in libdispatch.dylib) + 217  [0x10ac8f9a3]
+           2663 _dispatch_queue_drain  (in libdispatch.dylib) + 435  [0x10ac8fcb4]
+             2663 _dispatch_client_callout  (in libdispatch.dylib) + 8  [0x10aca5964]
+               2663 _dispatch_call_block_and_release  (in libdispatch.dylib) + 12  [0x10ac8af16]
+                 2663 __43-[DTXMessageParser initWithMessageHandler:]_block_invoke  (in DTXConnectionServices) + 35  [0x1166a55a6]
+                   2663 -[DTXMessageParser parseMessage]  (in DTXConnectionServices) + 50  [0x1166a57e8]
+                     2663 -[DTXMessageParser waitForMoreData:incrementalBuffer:]  (in DTXConnectionServices) + 87  [0x1166a5bba]
+                       2663 _dispatch_semaphore_wait_slow  (in libdispatch.dylib) + 213  [0x10ac93144]
+                         2663 semaphore_wait_trap  (in libsystem_kernel.dylib) + 10  [0x10afd851a]
2663 Thread_680564: com.apple.NSURLConnectionLoader
+ 2663 thread_start  (in libsystem_pthread.dylib) + 13  [0x10b00c3ed]
+   2663 _pthread_start  (in libsystem_pthread.dylib) + 176  [0x10b00efd7]
+     2663 _pthread_body  (in libsystem_pthread.dylib) + 131  [0x10b00f05a]
+       2663 __NSThread__main__  (in Foundation) + 1194  [0x10689f09d]
+         2663 +[NSURLConnection(Loader) _resourceLoadLoop:]  (in CFNetwork) + 434  [0x10a712e8d]
+           2663 CFRunLoopRunSpecific  (in CoreFoundation) + 470  [0x108f31366]
+             2663 __CFRunLoopRun  (in CoreFoundation) + 1287  [0x108f31ad7]
+               2663 __CFRunLoopServiceMachPort  (in CoreFoundation) + 212  [0x108f32624]
+                 2663 mach_msg  (in libsystem_kernel.dylib) + 55  [0x10afd764f]
+                   2663 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x10afd84de]
2663 Thread_680568: com.apple.CFSocket.private
  2663 thread_start  (in libsystem_pthread.dylib) + 13  [0x10b00c3ed]
    2663 _pthread_start  (in libsystem_pthread.dylib) + 176  [0x10b00efd7]
      2663 _pthread_body  (in libsystem_pthread.dylib) + 131  [0x10b00f05a]
        2663 __select  (in libsystem_kernel.dylib) + 10  [0x10afdd3fa]

任何提示都将不胜感激。

0 个答案:

没有答案