CFNetwork crash

This thread has been locked by a moderator; it no longer accepts new replies.

Hi,



We are getting background crash in CFNetwork with tubemanager internal class. I have provided crashed thread and full log below. Could you please suggest solution to this crash.


Thread 2 name:

Thread 2 Crashed:

0 CFNetwork 0x00000001825119e0 CFAllocatedReferenceCountedObject::_retainable_hash(void const*) + 0 (CFObject.cpp:204)

1 CoreFoundation 0x0000000181d26fb8 CFBasicHashFindBucket + 164 (CFBasicHash.c:426)

2 CoreFoundation 0x0000000181d26ec0 CFDictionaryGetValue + 160 (CFDictionary.c:416)

3 CFNetwork 0x000000018253f3dc TubeManager::_onqueue_enqueueRequestForProtocol(MetaConnectionCacheClient*, HTTPRequestMessage const*, MetaConnectionOptions, BaseAwaitingTube*) + 80 (CFObject.h:712)

4 CFNetwork 0x00000001825402f4 TubeManager::_onqueue_reenqueueAwaitingTube(BaseAwaitingTube*) + 112 (TubeManager.cpp:447)

5 CFNetwork 0x0000000182540378 ___ZN11TubeManager21_onqueue_newTubeReadyEP4Tube13CFStreamError_block_invoke + 28 (TubeManager.cpp:662)

6 libdispatch.dylib 0x0000000180cdd1c0 _dispatch_client_callout + 16 (object.m:455)

7 libdispatch.dylib 0x0000000180ce8b24 _dispatch_block_invoke_direct + 376 (queue.c:2872)

8 CFNetwork 0x000000018266ee98 RunloopBlockContext::_invoke_block(void const*, void*) + 36 (CoreSchedulingSet.mm:361)

9 CoreFoundation 0x0000000181d2d9a8 CFArrayApplyFunction + 68 (CFArray.c:650)

10 CFNetwork 0x000000018266ed7c RunloopBlockContext::perform() + 136 (CoreSchedulingSet.mm:315)

11 CFNetwork 0x00000001826700a4 MultiplexerSource::perform() + 312 (CFNRunLoopMultiplexer.c:282)

12 CFNetwork 0x000000018266fe10 MultiplexerSource::_perform(void*) + 64 (CFNRunLoopMultiplexer.c:47)

13 CoreFoundation 0x0000000181e02278 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1943)

14 CoreFoundation 0x0000000181e01bc0 __CFRunLoopDoSources0 + 524 (CFRunLoop.c:1989)

15 CoreFoundation 0x0000000181dff7c0 __CFRunLoopRun + 804 (CFRunLoop.c:2821)

16 CoreFoundation 0x0000000181d2e048 CFRunLoopRunSpecific + 444 (CFRunLoop.c:3113)

17 CFNetwork 0x000000018251bcec +[NSURLConnection(Loader) _resourceLoadLoop:] + 336 (NSURLConnection.mm:364)

18 Foundation 0x000000018293a50c __NSThread__start__ + 1024 (NSThread.m:1163)

19 libsystem_pthread.dylib 0x0000000180ee7860 _pthread_body + 240 (pthread.c:697)

20 libsystem_pthread.dylib 0x0000000180ee7770 _pthread_start + 284 (pthread.c:744)

21 libsystem_pthread.dylib 0x0000000180ee4dbc thread_start + 4



https://mcafee.box.com/s/tdyjymvudfakt7k1nzszf7lpy9o6tr74

Answered by DTS Engineer in 715692022

Abhayam, and anyone else with a weird crash deep in CFNetwork, I’m happy to look at your crash report but please start a new thread for that. Make sure to:

Feel free to link back to this thread if you think there’s some specific detail that’s particularly relevant to your crash.

Beyond that, I’ve lock this thread because I don’t want it to become a collection point for every CFNetwork crash ever )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Boost

And here is another crash related to TubeManager frquently happens recently.


  1. Code Type: ARM-64
  2. Parent Process: ??? [1]
  3. Date/Time: 2018-01-27 02:24:08 +0000
  4. OS Version: iPhone OS 11.2.2 (15C202)
  5. Report Version: 104
  6. Exception Type: SIGSEGV
  7. Exception Codes: SEGV_ACCERR at 0x0
  8. Triggered by Thread: 6
  9. Thread 6 Crashed:
  10. 0 CFNetwork 0x0000000186384934 CFAllocatedReferenceCountedObject::_retainable_equal(void const*, void const*) :28 (in CFNetwork)
  11. 1 CoreFoundation 0x0000000185c1d2a0 _CFDictionaryGetValue :224 (in CoreFoundation)
  12. 2 CFNetwork 0x00000001863b5070 TubeManager::_onqueue_enqueueRequestForProtocol(MetaConnectionCacheClient*, HTTPRequestMessage const*, MetaConnectionOptions, BaseAwaitingTube*) :80 (in CFNetwork)
  13. 3 CFNetwork 0x00000001863b5fd8 TubeManager::_onqueue_reenqueueAwaitingTube(BaseAwaitingTube*) :112 (in CFNetwork)
  14. 4 CFNetwork 0x00000001863b6238 ___ZN11TubeManager21_onqueue_newTubeReadyEP4Tube13CFStreamError_block_invoke :28 (in CFNetwork)
  15. 5 CFNetwork 0x0000000186514904 ___ZNK18QCoreSchedulingSet12performAsyncEU13block_pointerFvvE_block_invoke :52 (in CFNetwork)
  16. 6 libdispatch.dylib 0x00000001856daa54 _dispatch_call_block_and_release :24 (in libdispatch.dylib)
  17. 7 libdispatch.dylib 0x00000001856daa14 _dispatch_client_callout :16 (in libdispatch.dylib)
  18. 8 libdispatch.dylib 0x00000001856e496c _dispatch_queue_serial_drain$VARIANT$mp :528 (in libdispatch.dylib)
  19. 9 libdispatch.dylib 0x00000001856e52fc _dispatch_queue_invoke$VARIANT$mp :340 (in libdispatch.dylib)
  20. 10 libdispatch.dylib 0x00000001856e4824 _dispatch_queue_serial_drain$VARIANT$mp :200 (in libdispatch.dylib)
  21. 11 libdispatch.dylib 0x00000001856e52fc _dispatch_queue_invoke$VARIANT$mp :340 (in libdispatch.dylib)
  22. 12 libdispatch.dylib 0x00000001856e5d20 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp :404 (in libdispatch.dylib)
  23. 13 libdispatch.dylib 0x00000001856ee03c _dispatch_workloop_worker_thread$VARIANT$mp :644 (in libdispatch.dylib)
  24. 14 libsystem_pthread.dylib 0x0000000185982f1c _pthread_wqthread :932 (in libsystem_pthread.dylib)
  25. 15 libsystem_pthread.dylib 0x0000000185982b6c _start_wqthread :4 (in libsystem_pthread.dylib)

Hi Eskimo,


We are not able to get any clue from our debugging about this crashes in development. For better understanding about this crash , we have added the following line in all the NSOperation


[[NSThread currentThread] setName:[NSString stringWithFormat:@"Operation %d",operationID]];


but it is not displaying thread information in appstore crash logs. Do you know why thread name is not displaying in crash logs with the above code?


We are simulating the crash in adhoc build and able to see thread information in our development device.



Thanks,

Sakthivel

Please open a new thread for this question. This thread is already clogged with lots of different reports of CFNetwork problems, so I’d rather not pile more on to it.

I recommend the Core OS > Concurrency topic area.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I have been received almost 3000+ crashes in last 90 days.

This crash is only happening on iOS 11 (starting from 11.0 onwards)


Any solution to resolve this.


Crashed: com.apple.CFNetwork.Connection
0  CFNetwork                      0x181b5e44c TubeManager::_onqueue_newTubeReady(Tube*, CFStreamError) + 992
1  CFNetwork                      0x181b5e44c TubeManager::_onqueue_newTubeReady(Tube*, CFStreamError) + 992
2  CFNetwork                      0x181b5de1c invocation function for block in TubeManager::requestNewTube(BaseAwaitingTube*, void (Tube*) block_pointer) + 36
3  CFNetwork                      0x181b8ecdc Tube::_onqueue_invokeCB(CFStreamError) + 168
4  CFNetwork                      0x181b8da34 Tube::_onqueue_errorHandler(CFStreamError) + 156
5  CFNetwork                      0x181b8f360 Tube::connectionEstablished(CFStreamError) + 416
6  libdispatch.dylib              0x180e86a54 _dispatch_call_block_and_release + 24
7  libdispatch.dylib              0x180e86a14 _dispatch_client_callout + 16
8  libdispatch.dylib              0x180e9096c _dispatch_queue_serial_drain$VARIANT$mp + 528
9  libdispatch.dylib              0x180e912fc _dispatch_queue_invoke$VARIANT$mp + 340
10 libdispatch.dylib              0x180e90824 _dispatch_queue_serial_drain$VARIANT$mp + 200
11 libdispatch.dylib              0x180e912fc _dispatch_queue_invoke$VARIANT$mp + 340
12 libdispatch.dylib              0x180e91d20 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 404
13 libdispatch.dylib              0x180e9a03c _dispatch_workloop_worker_thread$VARIANT$mp + 644
14 libsystem_pthread.dylib        0x18112ef1c _pthread_wqthread + 932
15 libsystem_pthread.dylib        0x18112eb6c start_wqthread + 4

Any solution ?

Same situation on my side

Any luck? CFNetwork crashes killing my app rating on appstore.

Apple Developer Relations, Developer Technical Support, Core OS/Hardware

0  CoreFoundation                 0x12ba48 __exceptionPreprocess
1  libobjc.A.dylib                0x5fa4 objc_exception_throw
2  CoreFoundation                 0x12b408 -[__NSSingleObjectEnumerator initWithObject:collection:]
3  CFNetwork                      0x1d2780 _CFHTTPServerResponseEnqueue
4  CFNetwork                      0x1d1fe8 _CFHTTPServerResponseEnqueue
5  CFNetwork                      0x1d4150 _CFHTTPServerResponseEnqueue
6  CFNetwork                      0x36244 _CFHTTPMessageSetResponseProxyURL
7  CFNetwork                      0x4dc4 (Missing UUID 59b74c73dcc33a999647189b124b265b)
8  CFNetwork                      0x9ce30 CFURLDownloadCancel
9  CFNetwork                      0x9b6d8 CFURLDownloadCancel
10 CFNetwork                      0x8f8c (Missing UUID 59b74c73dcc33a999647189b124b265b)
11 CFNetwork                      0x695c (Missing UUID 59b74c73dcc33a999647189b124b265b)
12 CFNetwork                      0x9e70c CFURLDownloadCancel
13 libdispatch.dylib              0x3f998 _dispatch_block_async_invoke2
14 libdispatch.dylib              0x5c184 _dispatch_client_callout
15 libdispatch.dylib              0x39710 _dispatch_lane_serial_drain$VARIANT$armv81
16 libdispatch.dylib              0x3a15c _dispatch_lane_invoke$VARIANT$armv81
17 libdispatch.dylib              0x4343c _dispatch_workloop_worker_thread
18 libsystem_pthread.dylib        0xbb88 _pthread_wqthread
19 libsystem_pthread.dylib        0xe760 start_wqthread

Abhayam, and anyone else with a weird crash deep in CFNetwork, I’m happy to look at your crash report but please start a new thread for that. Make sure to:

Feel free to link back to this thread if you think there’s some specific detail that’s particularly relevant to your crash.

Beyond that, I’ve lock this thread because I don’t want it to become a collection point for every CFNetwork crash ever )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

CFNetwork crash
 
 
Q