Crash on Network ( com.apple.root.default-qos.overcommit EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000036)

Hi

Getting a crash mainly on iOS 16 and later with the Apple network thread. From our logs seems like in many locations in the app. Anyone any advice on how to debug it.

This crash hasn't happened before ios16 in our app

This problem does not occur to all users.

I have tried several methods (such as using different versions of xcode build App), but still not solved...

Apple crash log below:

Crashed: com.apple.root.default-qos.overcommit
0  libxpc.dylib                   0x16020 _xpc_dictionary_insert + 96
1  Network                        0x908504 nw_path_snapshot_agents + 292
2  Network                        0x907960 nw_path_snapshot_path + 192
3  Network                        0x90711c nw_path_evaluator_evaluate + 3428
4  Network                        0x905c48 nw_path_create_evaluator_for_endpoint + 104
5  Network                        0x74af64 nw_nat64_v4_address_requires_synthesis + 252
6  libsystem_info.dylib           0x48e8 si_addrinfo + 2348
7  libsystem_info.dylib           0x140d4 __si_async_call_block_invoke + 100
8  libdispatch.dylib              0x24b4 _dispatch_call_block_and_release + 32
9  libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
10 libdispatch.dylib              0x15b8c _dispatch_root_queue_drain + 684
11 libdispatch.dylib              0x16284 _dispatch_worker_thread2 + 164
12 libsystem_pthread.dylib        0xdbc _pthread_wqthread + 228
13 libsystem_pthread.dylib        0xb98 start_wqthread + 8

here is many apple crash report:

Answered by lijackh in 741713022

In addition, we found that the same stack crashed different threads:

已崩溃:com.apple.network.connections EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000036

0  libxpc.dylib                   0x15bfc _xpc_dictionary_insert + 96
1  libxpc.dylib                   0x177a8 _xpc_dictionary_copy_apply + 76
2  libxpc.dylib                   0x15248 _xpc_dictionary_apply_node_f + 156
3  libxpc.dylib                   0x144c4 _xpc_dictionary_copy + 88
4  Network                        0x27e174 -[NWConcrete_nw_protocol_options initWithOptions:] + 184
5  Network                        0x323240 __nw_protocol_stack_copy_block_invoke_2 + 64
6  Network                        0x7065c4 nw_array_apply + 124
7  Network                        0x322dcc nw_protocol_stack_copy + 308
8  Network                        0x32a310 -[NWConcrete_nw_parameters initWithParameters:stripConnected:shallowCopy:] + 592
9  Network                        0x47993c nw_endpoint_resolver_create_child_parameters + 116
10 Network                        0x4784e8 nw_endpoint_resolver_update + 5920
11 Network                        0x481f68 __52-[NWConcrete_nw_endpoint_resolver startWithHandler:]_block_invoke_2 + 84
12 Network                        0x144e08 __nw_resolver_update_client_block_invoke + 88
13 libdispatch.dylib              0x24b4 _dispatch_call_block_and_release + 32
14 libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
15 libdispatch.dylib              0xd620 _dispatch_workloop_invoke + 2076
16 libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread + 652
17 libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
18 libsystem_pthread.dylib        0xb98 start_wqthread + 8

已崩溃:com.apple.CFNetwork.Connection EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000036

0  libxpc.dylib                   0x15bfc _xpc_dictionary_insert + 96
1  libxpc.dylib                   0x177a8 _xpc_dictionary_copy_apply + 76
2  libxpc.dylib                   0x15248 _xpc_dictionary_apply_node_f + 156
3  libxpc.dylib                   0x144c4 _xpc_dictionary_copy + 88
4  Network                        0x27e174 -[NWConcrete_nw_protocol_options initWithOptions:] + 184
5  Network                        0x323240 __nw_protocol_stack_copy_block_invoke_2 + 64
6  Network                        0x7065c4 nw_array_apply + 124
7  Network                        0x322dcc nw_protocol_stack_copy + 308
8  Network                        0x32a310 -[NWConcrete_nw_parameters initWithParameters:stripConnected:shallowCopy:] + 592
9  Network                        0x3e2e00 nw_connection_create_with_id + 128
10 Network                        0x3d4df4 nw_connection_create + 96
11 CFNetwork                      0xffadc CFURLDownloadCancel + 74236
12 CFNetwork                      0x17fd4 CFURLRequestSetURL + 9928
13 CFNetwork                      0x10f2c CFURLCacheSetMemoryCapacity + 10964
14 CFNetwork                      0xf7a8 CFURLCacheSetMemoryCapacity + 4944
15 CFNetwork                      0x2bf48 CFURLRequestSetHTTPRequestMethod + 18576
16 CFNetwork                      0x16ef34 _CFNetworkErrorGetLocalizedDescription + 336932
17 libdispatch.dylib              0x24b4 _dispatch_call_block_and_release + 32
18 libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
19 libdispatch.dylib              0xb694 _dispatch_lane_serial_drain + 672
20 libdispatch.dylib              0xc214 _dispatch_lane_invoke + 436
21 libdispatch.dylib              0xd4f8 _dispatch_workloop_invoke + 1780
22 libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread + 652
23 libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
24 libsystem_pthread.dylib        0xb98 start_wqthread + 8

@ Developer Technical Support @ Apple

This is most likely a known bug in Network framework (r. 100305490). Looking through your crash reports they all seem to come from iOS 16.x, x < 2. Have you seen this on iOS 16.2 or later?

Share and Enjoy

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

YES, this crash also occurs in system 16.2.0 too.We've had a lot of these  Network framework crashes in our app since ios16 came out and more and more.Please help ,as users upgrade iOS16 more and more, these network crashes are increasing. These crashs had been bothering us for 2 months now, mainly crash can't be repeated. @ Developer Technical Support @ Apple

We also found similar crashes in  Network framework as follows:

0  libxpc.dylib                   0x14f80 _xpc_dictionary_dispose + 40
1  libxpc.dylib                   0x2a588 -[OS_xpc_object dealloc] + 28
2  Network                        0x72a4fc -[NWConcrete_nw_resolver_config .cxx_destruct] + 92
3  libobjc.A.dylib                0x14a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116
4  libobjc.A.dylib                0x6298 objc_destructInstance + 80
5  libobjc.A.dylib                0xf994 _objc_rootDealloc + 80
6  Network                        0x72d1c0 -[NWConcrete_nw_resolver_config dealloc] + 44
7  Network                        0x6ff554 nw_array_dispose + 548
8  Network                        0x38bdac -[OS_nw_array dealloc] + 28
9  Network                        0x8fc9e8 -[NWConcrete_nw_path .cxx_destruct] + 104
10 libobjc.A.dylib                0x14a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116
11 libobjc.A.dylib                0x6298 objc_destructInstance + 80
12 libobjc.A.dylib                0xf994 _objc_rootDealloc + 80
13 Network                        0x902e14 -[NWConcrete_nw_path dealloc] + 100
14 Network                        0x124d10 -[NWConcrete_nw_resolver .cxx_destruct] + 56
15 libobjc.A.dylib                0x14a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116
16 libobjc.A.dylib                0x6298 objc_destructInstance + 80
17 libobjc.A.dylib                0xf994 _objc_rootDealloc + 80
18 Network                        0x1258a8 -[NWConcrete_nw_resolver dealloc] + 2788
19 Network                        0x47cc84 -[NWConcrete_nw_endpoint_resolver cancelWithHandler:forced:] + 232
20 Network                        0x488dc4 nw_endpoint_handler_cancel + 1052
21 Network                        0x9c91bc __61-[NWConcrete_nw_endpoint_transform cancelWithHandler:forced:]_block_invoke + 28
22 Network                        0x7018b4 nw_array_apply + 124
23 Network                        0x9c8b5c -[NWConcrete_nw_endpoint_transform cancelWithHandler:forced:] + 184
24 Network                        0x488dc4 nw_endpoint_handler_cancel + 1052
25 Network                        0x3d43f4 __nw_connection_cancel_inner_block_invoke + 1236
26 Network                        0x3d3c20 nw_connection_cancel_inner + 320
27 Network                        0x3d37e0 nw_connection_cancel + 120
28 CFNetwork                      0x381cc CFURLRequestSetShouldStartSynchronously + 8556
29 CFNetwork                      0x236268 __CFNetworkAgentMessageProcessorMain + 91728
30 CFNetwork                      0x1df964 _CFNetworkHTTPConnectionCacheGetLimit + 55300
31 CFNetwork                      0x191ab8 _CFNetworkErrorGetLocalizedDescription + 482316
32 CFNetwork                      0x190dc8 _CFNetworkErrorGetLocalizedDescription + 479004
33 CFNetwork                      0x194748 _CFNetworkErrorGetLocalizedDescription + 493724
34 CFNetwork                      0x31794 _CFNetworkErrorCopyLocalizedDescriptionWithHostname + 19616
35 CFNetwork                      0x3b8c8 CFURLRequestSetShouldStartSynchronously + 22632
36 libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
37 libdispatch.dylib              0x746c _dispatch_continuation_pop + 504
38 libdispatch.dylib              0x1aa58 _dispatch_source_invoke + 1588
39 libdispatch.dylib              0xb56c _dispatch_lane_serial_drain + 376
40 libdispatch.dylib              0xc214 _dispatch_lane_invoke + 436
41 libdispatch.dylib              0xd4f8 _dispatch_workloop_invoke + 1780
42 libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread + 652
43 libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
44 libsystem_pthread.dylib        0xb98 start_wqthread + 8

this crash also occurs in system 16.2.0 too.

OK, then please post a crash report from that system. See Posting a Crash Report for advice on how best to do that.

Share and Enjoy

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

This is same crash report from that iOS16.2 as follows:

Hmmm, weird. That definitely looks like the bug we thought we fixed. My advice is that you file your own bug about this. Make sure to reference the bug above and call out that you’re seeing it on 16.2.

Please post your bug number, just for the record.

Share and Enjoy

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

Accepted Answer

In addition, we found that the same stack crashed different threads:

已崩溃:com.apple.network.connections EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000036

0  libxpc.dylib                   0x15bfc _xpc_dictionary_insert + 96
1  libxpc.dylib                   0x177a8 _xpc_dictionary_copy_apply + 76
2  libxpc.dylib                   0x15248 _xpc_dictionary_apply_node_f + 156
3  libxpc.dylib                   0x144c4 _xpc_dictionary_copy + 88
4  Network                        0x27e174 -[NWConcrete_nw_protocol_options initWithOptions:] + 184
5  Network                        0x323240 __nw_protocol_stack_copy_block_invoke_2 + 64
6  Network                        0x7065c4 nw_array_apply + 124
7  Network                        0x322dcc nw_protocol_stack_copy + 308
8  Network                        0x32a310 -[NWConcrete_nw_parameters initWithParameters:stripConnected:shallowCopy:] + 592
9  Network                        0x47993c nw_endpoint_resolver_create_child_parameters + 116
10 Network                        0x4784e8 nw_endpoint_resolver_update + 5920
11 Network                        0x481f68 __52-[NWConcrete_nw_endpoint_resolver startWithHandler:]_block_invoke_2 + 84
12 Network                        0x144e08 __nw_resolver_update_client_block_invoke + 88
13 libdispatch.dylib              0x24b4 _dispatch_call_block_and_release + 32
14 libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
15 libdispatch.dylib              0xd620 _dispatch_workloop_invoke + 2076
16 libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread + 652
17 libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
18 libsystem_pthread.dylib        0xb98 start_wqthread + 8

已崩溃:com.apple.CFNetwork.Connection EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000036

0  libxpc.dylib                   0x15bfc _xpc_dictionary_insert + 96
1  libxpc.dylib                   0x177a8 _xpc_dictionary_copy_apply + 76
2  libxpc.dylib                   0x15248 _xpc_dictionary_apply_node_f + 156
3  libxpc.dylib                   0x144c4 _xpc_dictionary_copy + 88
4  Network                        0x27e174 -[NWConcrete_nw_protocol_options initWithOptions:] + 184
5  Network                        0x323240 __nw_protocol_stack_copy_block_invoke_2 + 64
6  Network                        0x7065c4 nw_array_apply + 124
7  Network                        0x322dcc nw_protocol_stack_copy + 308
8  Network                        0x32a310 -[NWConcrete_nw_parameters initWithParameters:stripConnected:shallowCopy:] + 592
9  Network                        0x3e2e00 nw_connection_create_with_id + 128
10 Network                        0x3d4df4 nw_connection_create + 96
11 CFNetwork                      0xffadc CFURLDownloadCancel + 74236
12 CFNetwork                      0x17fd4 CFURLRequestSetURL + 9928
13 CFNetwork                      0x10f2c CFURLCacheSetMemoryCapacity + 10964
14 CFNetwork                      0xf7a8 CFURLCacheSetMemoryCapacity + 4944
15 CFNetwork                      0x2bf48 CFURLRequestSetHTTPRequestMethod + 18576
16 CFNetwork                      0x16ef34 _CFNetworkErrorGetLocalizedDescription + 336932
17 libdispatch.dylib              0x24b4 _dispatch_call_block_and_release + 32
18 libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
19 libdispatch.dylib              0xb694 _dispatch_lane_serial_drain + 672
20 libdispatch.dylib              0xc214 _dispatch_lane_invoke + 436
21 libdispatch.dylib              0xd4f8 _dispatch_workloop_invoke + 1780
22 libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread + 652
23 libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
24 libsystem_pthread.dylib        0xb98 start_wqthread + 8

@ Developer Technical Support @ Apple

In addition, we found that the same stack crashed different threads:

thread is "com.apple.network.connections"

Crashed: com.apple.network.connections
0  libxpc.dylib                   0x15bfc _xpc_dictionary_insert + 96
1  Network                        0x913d00 nw_path_snapshot_agents + 292
2  Network                        0x91315c nw_path_snapshot_path + 192
3  Network                        0x930fc4 nw_path_necp_update_evaluator + 756
4  Network                        0x9302b0 nw_path_necp_check_for_updates + 1268
5  libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
6  libdispatch.dylib              0x746c _dispatch_continuation_pop + 504
7  libdispatch.dylib              0x1aa58 _dispatch_source_invoke + 1588
8  libdispatch.dylib              0xd4f8 _dispatch_workloop_invoke + 1780
9  libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread + 652
10 libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
11 libsystem_pthread.dylib        0xb98 start_wqthread + 8

@lijackh we found the same crash on our App, and it still goes up, do you have any process about this?

@lijackh 在我们的App中也遇到了同样的Crash,而且它还一直在往上涨,你这边目前有啥进展嘛?

Have you made any progress? 16.3 also appears all the time.

For those reading along at home, lijackh has created 4 different threads that all cover roughly the same issue. I’m going to focus my replies on their main thread.

Share and Enjoy

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

Crash on Network ( com.apple.root.default-qos.overcommit EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000036)
 
 
Q