几个NSURLD下载挂起(超时)

时间:2015-01-04 10:30:21

标签: multithreading cocoa networking nsurlconnection nsurldownload

我使用简单的HTTP NSURLDownload启动了一些NSURLRequest(例如,每个线程中有3个或5个下载的3个线程)。线程运行如下:

- (void)threadSelector:(id)obj
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    while (![downloaderThread isCancelled])
    {
        NSDate * sec = [NSDate dateWithTimeIntervalSinceNow:1];
        [[NSRunLoop currentRunLoop] runMode:NSRunLoopCommonModes beforeDate:sec];
        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:sec];
        [NSThread sleepUntilDate:sec];
    }
    [pool drain];
}

带有频繁Ajax请求的WebKit UI(主线程)。

在某些时候,网络无响应:所有请求都返回错误-1001"请求超时。"在那之后,即使是主线程中的简单NSURLConnection超时。

这种情况只发生在Yosemite上(在4台优胜美地机器和几台旧操作系统的Mac机上测试过)。

此外,它消耗了150-170%的CPU(dtrace顶级消费者:psynch_mutexwait,psynch_mutexdrop,kevent64)。 NSURLConnectionLoader内的一些互斥锁。

不知道如何超过这里的帖子限制(30k字符)...这是我的连接加载器线程样本挂起时的一部分:

783 Thread_378163: com.apple.NSURLConnectionLoader
+ 782 thread_start  (in libsystem_pthread.dylib) + 13  [0x7fff948654b1]
+ ! 782 _pthread_start  (in libsystem_pthread.dylib) + 176  [0x7fff94867279]
+ !   782 _pthread_body  (in libsystem_pthread.dylib) + 131  [0x7fff948672fc]
+ !     782 __NSThread__main__  (in Foundation) + 1345  [0x7fff92df7b7a]
+ !       782 +[NSURLConnection(Loader) _resourceLoadLoop:]  (in CFNetwork) + 434  [0x7fff962c1d20]
+ !         782 CFRunLoopRunSpecific  (in CoreFoundation) + 296  [0x7fff9294e838]
+ !           782 __CFRunLoopRun  (in CoreFoundation) + 927  [0x7fff9294ee1f]
+ !             782 __CFRunLoopDoSources0  (in CoreFoundation) + 476  [0x7fff9294f8bc]
+ !               782 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__  (in CoreFoundation) + 17  [0x7fff9295d661]
+ !                 782 _cfstream_shared_signalEventSync  (in CoreFoundation) + 477  [0x7fff929da29d]
+ !                   782 _signalEventSync  (in CoreFoundation) + 180  [0x7fff9299cbb4]
+ !                     782 CFNetworkReadStream::_readStreamClientCallBackCallBack(__CFReadStream*, unsigned long, void*)  (in CFNetwork) + 53  [0x7fff96364f61]
+ !                       782 HTTPNetStreamInfo::_readStreamClientCallBack(__CFReadStream*, unsigned long)  (in CFNetwork) + 185  [0x7fff962d80fd]
+ !                         782 CFReadStreamRead  (in CoreFoundation) + 413  [0x7fff9298f60d]
+ !                           782 HTTPNetStreamInfo::_streamImpl_Read(__CFReadStream*, unsigned char*, long, CFStreamError*, unsigned char*)  (in CFNetwork) + 410  [0x7fff962d70be]
+ !                             782 CoreStreamBase::_streamInterface_Read(unsigned char*, long)  (in CFNetwork) + 157  [0x7fff9622cc27]
+ !                               782 HTTPReadFilter::_streamImpl_Read(unsigned char*, long, CFStreamError*, unsigned char*)  (in CFNetwork) + 478  [0x7fff9624dd3e]
+ !                                 782 HTTPReadFilter::doPlainRead(StreamReader*, unsigned char*, long, CFStreamError*, unsigned char*)  (in CFNetwork) + 281  [0x7fff9624dff3]
+ !                                   782 CFReadStreamRead  (in CoreFoundation) + 413  [0x7fff9298f60d]
+ !                                     564 SocketStream::read(__CFReadStream*, unsigned char*, long, CFStreamError*, unsigned char*)  (in CFNetwork) + 569  [0x7fff962e14d9]
+ !                                     : 541 CFRunLoopRunSpecific  (in CoreFoundation) + 296  [0x7fff9294e838]
+ !                                     : | 205 __CFRunLoopRun  (in CoreFoundation) + 1371  [0x7fff9294efdb]
+ !                                     : | + 199 __CFRunLoopServiceMachPort  (in CoreFoundation) + 212  [0x7fff9294fb14]
+ !                                     : | + ! 195 mach_msg  (in libsystem_kernel.dylib) + 55  [0x7fff9942769f]
+ !                                     : | + ! : 195 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x7fff9942852e]
+ !                                     : | + ! 4 mach_msg  (in libsystem_kernel.dylib) + 57,279  [0x7fff994276a1,0x7fff9942777f]
+ !                                     : | + 4 __CFRunLoopServiceMachPort  (in CoreFoundation) + 227  [0x7fff9294fb23]
+ !                                     : | + ! 3 voucher_mach_msg_revert  (in libsystem_kernel.dylib) + 0,7,...  [0x7fff99417bee,0x7fff99417bf5,...]
+ !                                     : | + ! 1 voucher_mach_msg_revert  (in libdispatch.dylib) + 1  [0x7fff90bcef86]
+ !                                     : | + 2 __CFRunLoopServiceMachPort  (in CoreFoundation) + 401,192  [0x7fff9294fbd1,0x7fff9294fb00]
+ !                                     : | 124 __CFRunLoopRun  (in CoreFoundation) + 927  [0x7fff9294ee1f]
+ !                                     : | + 90 __CFRunLoopDoSources0  (in CoreFoundation) + 269  [0x7fff9294f7ed]
+ !                                     : | + ! 90 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__  (in CoreFoundation) + 17  [0x7fff9295d661]
+ !                                     : | + !   88 __CFSocketPerformV0  (in CoreFoundation) + 768  [0x7fff9299c340]
+ !                                     : | + !   : 85 SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*)  (in CFNetwork) + 70  [0x7fff9622b2fa]
+ !                                     : | + !   : | 78 SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*)  (in CFNetwork) + 211  [0x7fff9622b409]
+ !                                     : | + !   : | + 77 SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*)  (in CFNetwork) + 44  [0x7fff9622ba12]
+ !                                     : | + !   : | + ! 59 CFRunLoopWakeUp  (in CoreFoundation) + 75  [0x7fff9293b1ab]
+ !                                     : | + !   : | + ! : 58 __psynch_mutexwait  (in libsystem_kernel.dylib) + 10  [0x7fff9942d162]
+ !                                     : | + !   : | + ! : 1 _pthread_mutex_lock  (in libsystem_pthread.dylib) + 484  [0x7fff94865822]
+ !                                     : | + !   : | + ! 12 CFRunLoopWakeUp  (in CoreFoundation) + 171  [0x7fff9293b20b]
+ !                                     : | + !   : | + ! : 11 mach_msg  (in libsystem_kernel.dylib) + 55  [0x7fff9942769f]
+ !                                     : | + !   : | + ! : | 11 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x7fff9942852e]
+ !                                     : | + !   : | + ! : 1 mach_msg  (in libsystem_kernel.dylib) + 0  [0x7fff99427668]
+ !                                     : | + !   : | + ! 6 CFRunLoopWakeUp  (in CoreFoundation) + 193  [0x7fff9293b221]
+ !                                     : | + !   : | + !   4 mach_msg_destroy  (in libsystem_kernel.dylib) + 34  [0x7fff9942796c]
+ !                                     : | + !   : | + !   | 4 mach_msg_destroy_port  (in libsystem_kernel.dylib) + 155  [0x7fff99427b03]
+ !                                     : | + !   : | + !   |   4 mach_port_deallocate  (in libsystem_kernel.dylib) + 17  [0x7fff9942bdec]
+ !                                     : | + !   : | + !   |     4 _kernelrpc_mach_port_deallocate_trap  (in libsystem_kernel.dylib) + 10  [0x7fff9942849e]
+ !                                     : | + !   : | + !   1 mach_msg_destroy  (in libsystem_kernel.dylib) + 51  [0x7fff9942797d]
+ !                                     : | + !   : | + !   | 1 mach_msg_destroy_port  (in libsystem_kernel.dylib) + 0  [0x7fff99427a68]
+ !                                     : | + !   : | + !   1 mach_msg_destroy  (in libsystem_kernel.dylib) + 38  [0x7fff99427970]
+ !                                     : | + !   : | + 1 SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*)  (in CFNetwork) + 35  [0x7fff9622ba09]
+ !                                     : | + !   : | +   1 CFRunLoopSourceSignal  (in CoreFoundation) + 0  [0x7fff929575a0]
+ !                                     : | + !   : | 2 SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*)  (in CFNetwork) + 92  [0x7fff9622b392]
+ !                                     : | + !   : | + 1 OSAtomicCompareAndSwapPtrBarrier$VARIANT$mp  (in libsystem_platform.dylib) + 8  [0x7fff9766f348]
+ !                                     : | + !   : | + 1 pthread_mutex_lock  (in libsystem_pthread.dylib) + 0  [0x7fff94865637]
+ !                                     : | + !   : | 2 SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*)  (in CFNetwork) + 195  [0x7fff9622b3f9]
+ !                                     : | + !   : | + 1 SocketStream::prepareSignalFromSocketCallbackLocked(SocketStreamSignalHolder*)  (in CFNetwork) + 281  [0x7fff9622b8f9]
+ !                                     : | + !   : | + ! 1 CFRunLoopSourceGetContext  (in CoreFoundation) + 1  [0x7fff9293dfe1]
+ !                                     : | + !   : | + 1 SocketStream::prepareSignalFromSocketCallbackLocked(SocketStreamSignalHolder*)  (in CFNetwork) + 297  [0x7fff9622b909]
+ !                                     : | + !   : | +   1 OSAtomicCompareAndSwapPtrBarrier$VARIANT$mp  (in libsystem_platform.dylib) + 8  [0x7fff9766f348]
+ !                                     : | + !   : | 2 SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*)  (in CFNetwork) + 203  [0x7fff9622b401]
+ !                                     : | + !   : | + 2 pthread_mutex_unlock  (in libsystem_pthread.dylib) + 63  [0x7fff94865be2]
+ !                                     : | + !   : | +   2 OSAtomicCompareAndSwapPtrBarrier$VARIANT$mp  (in libsystem_platform.dylib) + 8  [0x7fff9766f348]
+ !                                     : | + !   : | 1 SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*)  (in CFNetwork) + 148  [0x7fff9622b3ca]
+ !                                     : | + !   : |   1 SocketStream::socketCallbackReadLocked(SocketStreamSignalHolder*)  (in CFNetwork) + 49  [0x7fff9622c227]
+ !                                     : | + !   : 1 OSAtomicCompareAndSwapPtrBarrier$VARIANT$mp  (in libsystem_platform.dylib) + 8  [0x7fff9766f348]
+ !                                     : | + !   : 1 SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*)  (in CFNetwork) + 53  [0x7fff9622b2e9]
+ !                                     : | + !   : | 1 CFRetain  (in CoreFoundation) + 27  [0x7fff928e309b]
+ !                                     : | + !   : 1 SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*)  (in CFNetwork) + 1  [0x7fff9622b2b5]
+ !                                     : | + !   1 __CFSocketPerformV0  (in CoreFoundation) + 33  [0x7fff9299c061]
+ !                                     : | + !   : 1 __psynch_mutexwait  (in libsystem_kernel.dylib) + 10  [0x7fff9942d162]
+ !                                     : | + !   1 __CFSocketPerformV0  (in CoreFoundation) + 471  [0x7fff9299c217]
+ !                                     : | + !     1 __psynch_mutexdrop  (in libsystem_kernel.dylib) + 10  [0x7fff9942d14a]
+ !                                     : | + 21 __CFRunLoopDoSources0  (in CoreFoundation) + 143  [0x7fff9294f76f]
+ !                                     : | + ! 21 __psynch_mutexdrop  (in libsystem_kernel.dylib) + 10  [0x7fff9942d14a]
+ !                                     : | + 9 __CFRunLoopDoSources0  (in CoreFoundation) + 108  [0x7fff9294f74c]
+ !                                     : | + ! 9 CFSetApplyFunction  (in CoreFoundation) + 186  [0x7fff9293c1da]
+ !                                     : | + !   5 CFBasicHashApply  (in CoreFoundation) + 128  [0x7fff92920c30]
+ !                                     : | + !   : 4 __CFSetApplyFunction_block_invoke  (in CoreFoundation) + 18  [0x7fff9293c232]
+ !                                     : | + !   : | 4 __CFRunLoopCollectSources0  (in CoreFoundation) + 22,1  [0x7fff9294f986,0x7fff9294f971]
+ !                                     : | + !   : 1 __CFSetApplyFunction_block_invoke  (in CoreFoundation) + 1  [0x7fff9293c221]
+ !                                     : | + !   3 CFBasicHashApply  (in CoreFoundation) + 79  [0x7fff92920bff]
+ !                                     : | + !   : 3 CFBasicHashGetBucket  (in CoreFoundation) + 8,323,...  [0x7fff9290abb8,0x7fff9290acf3,...]
+ !                                     : | + !   1 CFBasicHashApply  (in CoreFoundation) + 84  [0x7fff92920c04]
+ !                                     : | + 2 __CFRunLoopDoSources0  (in CoreFoundation) + 591  [0x7fff9294f92f]
+ !                                     : | + ! 2 _pthread_mutex_lock  (in libsystem_pthread.dylib) + 20,729  [0x7fff94865652,0x7fff94865917]
+ !                                     : | + 1 DYLD-STUB$$pthread_mutex_unlock  (in CoreFoundation) + 0  [0x7fff92aa44a6]
+ !                                     : | + 1 __CFRunLoopDoSources0  (in CoreFoundation) + 203  [0x7fff9294f7ab]
+ !                                     : | +   1 pthread_mutex_lock  (in libsystem_pthread.dylib) + 0  [0x7fff94865637]
+ !                                     : | 81 __CFRunLoopRun  (in CoreFoundation) + 1492  [0x7fff9294f054]
+ !                                     : | + 80 __psynch_mutexwait  (in libsystem_kernel.dylib) + 10  [0x7fff9942d162]
+ !                                     : | + 1 _pthread_mutex_lock  (in libsystem_pthread.dylib) + 218  [0x7fff94865718]
+ !                                     : | 32 __CFRunLoopRun  (in CoreFoundation) + 1234  [0x7fff9294ef52]
+ !                                     : | + 30 __psynch_mutexdrop  (in libsystem_kernel.dylib) + 10  [0x7fff9942d14a]
+ !                                     : | + 1 pthread_mutex_unlock  (in libsystem_pthread.dylib) + 63  [0x7fff94865be2]
+ !                                     : | + ! 1 OSAtomicCompareAndSwapPtrBarrier$VARIANT$mp  (in libsystem_platform.dylib) + 8  [0x7fff9766f348]
+ !                                     : | + 1 pthread_mutex_unlock  (in libsystem_pthread.dylib) + 133  [0x7fff94865c28]
+ !                                     : | 30 __CFRunLoopRun  (in CoreFoundation) + 2549  [0x7fff9294f475]
+ !                                     : | + 28 dispatch_source_cancel  (in libdispatch.dylib) + 54  [0x7fff90bbae63]
+ !                                     : | + ! 26 _dispatch_queue_wakeup_with_qos_slow  (in libdispatch.dylib) + 563  [0x7fff90bc15f8]
+ !                                     : | + ! : 25 _dispatch_queue_wakeup_global_slow  (in libdispatch.dylib) + 60  [0x7fff90bb2eac]
+ !                                     : | + ! : | 22 __workq_kernreturn  (in libsystem_kernel.dylib) + 10  [0x7fff9942d946]
+ !                                     : | + ! : | 3 _pthread_workqueue_addthreads  (in libsystem_pthread.dylib) + 55,1  [0x7fff94869674,0x7fff9486963e]
+ !                                     : | + ! : 1 _dispatch_queue_wakeup_global_slow  (in libdispatch.dylib) + 4  [0x7fff90bb2e74]
+ !                                     : | + ! 2 _dispatch_queue_wakeup_with_qos_slow  (in libdispatch.dylib) + 1,0  [0x7fff90bc13c6,0x7fff90bc13c5]
+ !                                     : | + 2 dispatch_source_cancel  (in libdispatch.dylib) + 57,46  [0x7fff90bbae66,0x7fff90bbae5b]
+ !                                     : | 18 __CFRunLoopRun  (in CoreFoundation) + 660  [0x7fff9294ed14]
+ !                                     : | + 18 _dispatch_resume_slow  (in libdispatch.dylib) + 14  [0x7fff90bb2a8e]
+ !                                     : | +   18 _dispatch_queue_wakeup_with_qos_slow  (in libdispatch.dylib) + 563  [0x7fff90bc15f8]
+ !                                     : | +     18 _dispatch_queue_wakeup_with_qos_slow  (in libdispatch.dylib) + 30  [0x7fff90bc13e3]
+ !                                     : | +       18 _dispatch_mgr_wakeup  (in libdispatch.dylib) + 34  [0x7fff90bb2ba3]
+ !                                     : | +         17 kevent64  (in libsystem_kernel.dylib) + 10  [0x7fff9942e22e]
+ !                                     : | +         1 _dispatch_kq_update  (in libdispatch.dylib) + 208  [0x7fff90bb2c77]
+ !                                     : | +           1 kevent64  (in libsystem_kernel.dylib) + 20  [0x7fff9942e238]
+ !                                     : | 16 __CFRunLoopRun  (in CoreFoundation) + 1605  [0x7fff9294f0c5]
+ !                                     : | + 14 CFAbsoluteTimeGetCurrent  (in CoreFoundation) + 19  [0x7fff92932903]
+ !                                     : | + 2 CFAbsoluteTimeGetCurrent  (in CoreFoundation) + 19  [0x7fff92932903]
+ !                                     : | +   2 gettimeofday  (in libsystem_c.dylib) + 1  [0x7fff9a6b10ee]
+ !                                     : | 7 __CFRunLoopRun  (in CoreFoundation) + 439  [0x7fff9294ec37]
+ !                                     : | + 4 dispatch_source_create  (in libdispatch.dylib) + 467  [0x7fff90bb2337]
+ !                                     : | + ! 3 _dispatch_barrier_async_f_slow  (in libdispatch.dylib) + 34  [0x7fff90bb2654]
+ !                                     : | + ! : 3 _dispatch_alloc_continuation_alloc  (in libdispatch.dylib) + 1,28,...  [0x7fff90bbe075,0x7fff90bbe090,...]
+ !                                     : | + ! 1 dispatch_set_target_queue  (in libdispatch.dylib) + 153  [0x7fff90bb240b]
+ !                                     : | + 2 dispatch_source_create  (in libdispatch.dylib) + 156  [0x7fff90bb2200]
+ !                                     : | + ! 2 _os_object_alloc_realized  (in libdispatch.dylib) + 38  [0x7fff90bb0921]
+ !                                     : | + !   2 class_createInstance  (in libobjc.A.dylib) + 133  [0x7fff8fc52719]
+ !                                     : | + !     2 calloc  (in libsystem_malloc.dylib) + 49  [0x7fff94b71231]
+ !                                     : | + !       2 malloc_zone_calloc  (in libsystem_malloc.dylib) + 78  [0x7fff94b6bacb]
+ !                                     : | + !         1 szone_malloc_should_clear  (in libsystem_malloc.dylib) + 317  [0x7fff94b69f50]
+ !                                     : | + !         : 1 tiny_malloc_from_free_list  (in libsystem_malloc.dylib) + 152  [0x7fff94b6b02c]
+ !                                     : | + !         1 szone_malloc_should_clear  (in libsystem_malloc.dylib) + 161  [0x7fff94b69eb4]
+ !                                     : | + 1 dispatch_source_create  (in libdispatch.dylib) + 251  [0x7fff90bb225f]
+ !                                     : | +   1 _dispatch_calloc  (in libdispatch.dylib) + 31  [0x7fff90bb2368]
+ !                                     : | +     1 calloc  (in libsystem_malloc.dylib) + 0  [0x7fff94b71200]
+ !                                     : | 4 __CFRunLoopRun  (in CoreFoundation) + 493  [0x7fff9294ec6d]
+ !                                     : | + 4 __CFTimeIntervalToTSR  (in CoreFoundation) + 1,48  [0x7fff92956521,0x7fff92956550]
+ !                                     : | 3 __CFRunLoopRun  (in CoreFoundation) + 2473  [0x7fff9294f429]
+ !                                     : | + 2 __CFRunLoopModeIsEmpty  (in CoreFoundation) + 32,42  [0x7fff9294e910,0x7fff9294e91a]
+ !                                     : | + 1 __CFRunLoopModeIsEmpty  (in CoreFoundation) + 66  [0x7fff9294e932]
+ !                                     : | +   1 pthread_main_np  (in libsystem_pthread.dylib) + 9  [0x7fff94866e34]
+ !                                     : | 2 __CFRunLoopRun  (in CoreFoundation) + 1222  [0x7fff9294ef46]
+ !                                     : | + 2 pthread_mutex_unlock  (in libsystem_pthread.dylib) + 63  [0x7fff94865be2]
+ !                                     : | +   1 OSAtomicCompareAndSwapPtrBarrier$VARIANT$mp  (in libsystem_platform.dylib) + 8  [0x7fff9766f348]
+ !                                     : | +   1 __mtx_droplock  (in libsystem_pthread.dylib) + 1  [0x7fff94865c9b]
+ !                                     : | 2 __CFRunLoopRun  (in CoreFoundation) + 1504  [0x7fff9294f060]
+ !                                     : | + 2 _pthread_mutex_lock  (in libsystem_pthread.dylib) + 191,6  [0x7fff948656fd,0x7fff94865644]
+ !                                     : | 2 __CFRunLoopRun  (in CoreFoundation) + 2508  [0x7fff9294f44c]
+ !                                     : | + 1 voucher_mach_msg_revert  (in libdispatch.dylib) + 1  [0x7fff90bcef86]
+ !                                     : | + 1 voucher_mach_msg_revert  (in libsystem_kernel.dylib) + 16  [0x7fff99417bfe]
+ !                                     : | 1 DYLD-STUB$$dispatch_release  (in CoreFoundation) + 0  [0x7fff92aa40aa]
+ !                                     : | 1 DYLD-STUB$$dispatch_source_cancel  (in CoreFoundation) + 0  [0x7fff92aa40d4]
+ !                                     : | 1 DYLD-STUB$$dispatch_source_set_event_handler_f  (in CoreFoundation) + 0  [0x7fff92aa40f2]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 290  [0x7fff9294eba2]
+ !                                     : | + 1 _dispatch_runloop_root_queue_get_port_4CF  (in libdispatch.dylib) + 0  [0x7fff90bc12a8]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 314  [0x7fff9294ebba]
+ !                                     : | + 1 malloc  (in libsystem_malloc.dylib) + 42  [0x7fff94b68395]
+ !                                     : | +   1 malloc_zone_malloc  (in libsystem_malloc.dylib) + 71  [0x7fff94b69877]
+ !                                     : | +     1 szone_malloc_should_clear  (in libsystem_malloc.dylib) + 317  [0x7fff94b69f50]
+ !                                     : | +       1 tiny_malloc_from_free_list  (in libsystem_malloc.dylib) + 149  [0x7fff94b6b029]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 420  [0x7fff9294ec24]
+ !                                     : | + 1 dispatch_get_global_queue  (in libdispatch.dylib) + 193  [0x7fff90bb2049]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 476  [0x7fff9294ec5c]
+ !                                     : | + 1 CFRetain  (in CoreFoundation) + 27  [0x7fff928e309b]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 530  [0x7fff9294ec92]
+ !                                     : | + 1 _dispatch_barrier_async_f_slow  (in libdispatch.dylib) + 34  [0x7fff90bb2654]
+ !                                     : | +   1 _dispatch_alloc_continuation_alloc  (in libdispatch.dylib) + 187  [0x7fff90bbe12f]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 545  [0x7fff9294eca1]
+ !                                     : | + 1 _dispatch_barrier_async_f_slow  (in libdispatch.dylib) + 355  [0x7fff90bb2795]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 557  [0x7fff9294ecad]
+ !                                     : | + 1 __CFTSRToTimeInterval  (in CoreFoundation) + 1  [0x7fff929998c1]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 652  [0x7fff9294ed0c]
+ !                                     : | + 1 dispatch_source_set_timer  (in libdispatch.dylib) + 111  [0x7fff90bb8d60]
+ !                                     : | +   1 _os_object_retain  (in libdispatch.dylib) + 23  [0x7fff90bb0968]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 910  [0x7fff9294ee0e]
+ !                                     : | + 1 __CFRunLoopDoBlocks  (in CoreFoundation) + 27  [0x7fff9294f51b]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 1141  [0x7fff9294eef5]
+ !                                     : | + 1 pthread_mutex_unlock  (in libsystem_pthread.dylib) + 13  [0x7fff94865bb0]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 1857  [0x7fff9294f1c1]
+ !                                     : | + 1 mach_absolute_time  (in libsystem_kernel.dylib) + 28  [0x7fff9942763a]
+ !                                     : | 1 __CFRunLoopRun  (in CoreFoundation) + 1141  [0x7fff9294eef5]
+ !                                     : 12 CFRunLoopRunSpecific  (in CoreFoundation) + 88  [0x7fff9294e768]
+ !                                     : | 11 __psynch_mutexwait  (in libsystem_kernel.dylib) + 10  [0x7fff9942d162]
+ !                                     : | 1 OSAtomicCompareAndSwapPtrBarrier$VARIANT$mp  (in libsystem_platform.dylib) + 8  [0x7fff9766f348]
+ !                                     : 4 CFRunLoopRunSpecific  (in CoreFoundation) + 101  [0x7fff9294e775]
+ !                                     : | 3 __CFRunLoopFindMode  (in CoreFoundation) + 197  [0x7fff9292bd95]
+ !                                     : | + 3 CFSetGetValue  (in CoreFoundation) + 125  [0x7fff92913b8d]
+ !                                     : | +   3 CFBasicHashFindBucket  (in CoreFoundation) + 1,320,...  [0x7fff928e6231,0x7fff928e6370,...]
+ !                                     : | 1 DYLD-STUB$$pthread_mutex_lock  (in CoreFoundation) + 0  [0x7fff92aa44a0]
+ !                                     : 4 CFRunLoopRunSpecific  (in CoreFoundation) + 361  [0x7fff9294e879]
+ !                                     : | 2 szone_free  (in libsystem_malloc.dylib) + 1214,507  [0x7fff94b7002a,0x7fff94b6fd67]
+ !                                     : | 1 malloc_zone_free  (in libsystem_malloc.dylib) + 20  [0x7fff94b6e698]
+ !                                     : | 1 szone_free  (in libsystem_malloc.dylib) + 645  [0x7fff94b6fdf1]
+ !                                     : |   1 _os_lock_spin_lock  (in libsystem_platform.dylib) + 5  [0x7fff97670cca]
+ !                                     : 2 CFRunLoopRunSpecific  (in CoreFoundation) + 394  [0x7fff9294e89a]
+ !                                     : | 2 pthread_mutex_unlock  (in libsystem_pthread.dylib) + 63  [0x7fff94865be2]
+ !                                     : |   2 __mtx_droplock  (in libsystem_pthread.dylib) + 291,94  [0x7fff94865dbd,0x7fff94865cf8]
+ !                                     : 1 CFRunLoopRunSpecific  (in CoreFoundation) + 343  [0x7fff9294e867]
+ !                                     :   1 pthread_mutex_unlock  (in libsystem_pthread.dylib) + 63  [0x7fff94865be2]
+ !                                     :     1 OSAtomicCompareAndSwapPtrBarrier$VARIANT$mp  (in libsystem_platform.dylib) + 0  [0x7fff9766f340]
+ !                                     48 SocketStream::read(__CFReadStream*, unsigned char*, long, CFStreamError*, unsigned char*)  (in CFNetwork) + 149  [0x7fff962e1335]
+ !                                     : 42 __sendto  (in libsystem_kernel.dylib) + 10,5  [0x7fff9942d4e6,0x7fff9942d4e1]
+ !                                     : 2 __CFSocketEnableCallBacks  (in CoreFoundation) + 826,157  [0x7fff9299bbca,0x7fff9299b92d]
+ !                                     : 1 CFSocketEnableCallBacks  (in CoreFoundation) + 1  [0x7fff9299b841]
+ !                                     : 1 __CFSocketEnableCallBacks  (in CoreFoundation) + 296  [0x7fff9299b9b8]
+ !                                     : | 1 OSAtomicCompareAndSwapPtrBarrier$VARIANT$mp  (in libsystem_platform.dylib) + 0  [0x7fff9766f340]
+ !                                     : 1 __CFSocketEnableCallBacks  (in CoreFoundation) + 592  [0x7fff9299bae0]
+ !                                     : | 1 CFArrayGetCount  (in CoreFoundation) + 28  [0x7fff928f4f6c]
+ !                                     : 1 __CFSocketEnableCallBacks  (in CoreFoundation) + 826  [0x7fff9299bbca]
+ !                                     :   1 send  (in libsystem_c.dylib) + 1  [0x7fff9a72006e]
+ !                                     36 SocketStream::read(__CFReadStream*, unsigned char*, long, CFStreamError*, unsigned char*)  (in CFNetwork) + 664  [0x7fff962e1538]
+ !                                     : 36 Schedulables::unschedule(__CFRunLoop*, __CFString const*)  (in CFNetwork) + 45  [0x7fff962297e3]
+ !                                     :   33 CFArrayApplyFunction  (in CoreFoundation) + 68  [0x7fff929291e4]
+ !                                     :   | 30 _CFTypeUnscheduleFromRunLoop  (in CFNetwork) + 175  [0x7fff9622c91b]
+ !                                     :   | + 23 CFRunLoopRemoveSource  (in CoreFoundation) + 510  [0x7fff9294fe0e]

其他SocketStream::read内有CFRunLoopAddSource s,CFRunLoopRemoveSourceCFRunLoopSourceDeallocate s。

我认为唯一的"不太好"事情(来自Apple的观点)是this one,但我在那里找不到任何罪行。

0 个答案:

没有答案