Hi Meaton,
This error looks to me like the flow's nw_paramater_t value is not being set correct when trustd is trying to access it.
I would like to update you that its not only happening with trustd
, its also happening with other process too. Here are couple of process log that we collected from console streaming:
error 10:34:17.607954+0530 com.apple.WebKit.Networking __nwlog_err_simulate_crash simulate crash already simulated "nw_path_copy_flow_registration called with null context"
error 10:34:17.608175+0530 com.apple.WebKit.Networking nw_path_copy_flow_registration called with null context, dumping backtrace:
[arm64] libnetcore-2750.120.19.0.1
0 libnetwork.dylib 0x000000019b292f94 __nw_create_backtrace_string + 192
1 libnetwork.dylib 0x000000019aad9c84 nw_path_copy_flow_registration + 484
2 libnetwork.dylib 0x000000019b1b4644 nw_protocol_ipv4_connected + 108
3 libnetwork.dylib 0x000000019af1dde8 nw_channel_connect + 128
4 libusrtcp.dylib 0x00000001a3935a18 nw_protocol_tcp_connect + 208
5 libnetworkextension.dylib 0x00000001a7751bbc ne_filter_protocol_connect + 156
6 libnetworkextension.dylib 0x00000001a77537d0 ne_filter_process_verdict + 1632
7 libnetworkextension.dylib 0x00000001a775a1bc __ne_filter_data_protocol_send_new_flow_block_invoke.72 + 160
8 libdispatch.dylib 0x000000019664a5f0 _dispatch_call_block_and_release + 32
9 libdispatch.dylib <…>
error 10:34:17.615360+0530 nsurlsessiond nw_parameters_copy_context called with null parameters, dumping backtrace:
[arm64] libnetcore-2750.120.19.0.1
0 libnetwork.dylib 0x000000019b292f94 __nw_create_backtrace_string + 192
1 libnetwork.dylib 0x000000019a9ef808 nw_parameters_copy_context + 340
2 libnetwork.dylib 0x000000019b1b4638 nw_protocol_ipv4_connected + 96
3 libnetwork.dylib 0x000000019af1dde8 nw_channel_connect + 128
4 libusrtcp.dylib 0x00000001a3935a18 nw_protocol_tcp_connect + 208
5 libnetworkextension.dylib 0x00000001a7751bbc ne_filter_protocol_connect + 156
6 libnetworkextension.dylib 0x00000001a77537d0 ne_filter_process_verdict + 1632
7 libnetworkextension.dylib 0x00000001a775a1bc __ne_filter_data_protocol_send_new_flow_block_invoke.72 + 160
8 libdispatch.dylib 0x000000019664a5f0 _dispatch_call_block_and_release + 32
9 libdispatch.dylib 0x0000<…>
fault 10:34:17.615843+0530 nsurlsessiond nw_path_copy_flow_registration called with null context
error 10:47:42.210335+0530 Sourcetree __nwlog_err_simulate_crash simulate crash already simulated "nw_parameters_copy_context called with null parameters"
error 10:47:42.210628+0530 Sourcetree nw_parameters_copy_context called with null parameters, dumping backtrace:
[arm64] libnetcore-2750.120.19.0.1
0 libnetwork.dylib 0x000000019b292f94 __nw_create_backtrace_string + 192
1 libnetwork.dylib 0x000000019a9ef808 nw_parameters_copy_context + 340
2 libnetwork.dylib 0x000000019b1b4638 nw_protocol_ipv4_connected + 96
3 libnetwork.dylib 0x000000019af1dde8 nw_channel_connect + 128
4 libusrtcp.dylib 0x00000001a3935a18 nw_protocol_tcp_connect + 208
5 libnetworkextension.dylib 0x00000001a7751bbc ne_filter_protocol_connect + 156
6 libnetworkextension.dylib 0x00000001a77537d0 ne_filter_process_verdict + 1632
7 libnetworkextension.dylib 0x00000001a775a1bc __ne_filter_data_protocol_send_new_flow_block_invoke.72 + 160
8 libdispatch.dylib 0x000000019664a5f0 _dispatch_call_block_and_release + 32
9 libdispatch.dylib 0x0000<…>
error 10:47:42.210757+0530 Sourcetree __nwlog_err_simulate_crash simulate crash already simulated "nw_path_copy_flow_registration called with null context"
error 10:47:42.210993+0530 Sourcetree nw_path_copy_flow_registration called with null context, dumping backtrace:
[arm64] libnetcore-2750.120.19.0.1
0 libnetwork.dylib 0x000000019b292f94 __nw_create_backtrace_string + 192
1 libnetwork.dylib 0x000000019aad9c84 nw_path_copy_flow_registration + 484
2 libnetwork.dylib 0x000000019b1b4644 nw_protocol_ipv4_connected + 108
3 libnetwork.dylib 0x000000019af1dde8 nw_channel_connect + 128
4 libusrtcp.dylib 0x00000001a3935a18 nw_protocol_tcp_connect + 208
5 libnetworkextension.dylib 0x00000001a7751bbc ne_filter_protocol_connect + 156
6 libnetworkextension.dylib 0x00000001a77537d0 ne_filter_process_verdict + 1632
7 libnetworkextension.dylib 0x00000001a775a1bc __ne_filter_data_protocol_send_new_flow_block_invoke.72 + 160
8 libdispatch.dylib 0x000000019664a5f0 _dispatch_call_block_and_release + 32
9 libdispatch.dylib <…>
Is this flow being altered in any way for a particular path?
No, we are not altering flow, we just check whether flow needs to be allowed or block and based on that we call resumeFlow
with verdicts.
Could you please help us to know if there is any way or API to check whether flow is valid before calling resumeFlow
.
Another question we have is that, is there any way we can check the state of flow, whether it's in pause state or not.
Thanks & Regards,
Mohmad Vasim