SIGSEGV crash in getaddrinfo system call

The following call to getaddrinfo makes ‘PacketTunnelProvider’ system extension SIGSEGV:

if (hostname != NULL) {
int ret = getaddrinfo(hostname, port, &hints, results);
if (ret != 0) {
   printf(“Failed to resolve host : %s by getaddrinfo, err : %d", hostname, ret);
   return false;
}
}

Most of the time getaddrinfo() is working fine. Can someone please help in understanding what could be causing this crash.

Can this caused due to stack corruption due to C++/C code switched to objective C?

Below is the crash details:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               com.mycompany.client.product-Client.ui.pkttunnel [29951]
Path:                  /Library/SystemExtensions/*/com.mycompany.client.product-Client.ui.pkttunnel
Identifier:            com.mycompany.client.product-Client.ui.pkttunnel
Version:               1.0 (1)
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               0

Date/Time:             2023-08-18 20:04:43.6346 +0530
OS Version:            macOS 13.5 (22G74)
Report Version:        12
Bridge OS Version:     7.6 (20P6072)
Anonymous UUID:        F235BB2F-C030-0A58-E5C1-C3FE9796F29C

Sleep/Wake UUID:       C73181BF-B3A9-4DED-9556-897ED8C2E0A1

Time Awake Since Boot: 65000 seconds
Time Since Wake:       37781 seconds

System Integrity Protection: enabled

Crashed Thread:        2

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000001e13dfa50
Exception Codes:       0x0000000000000001, 0x00000001e13dfa50

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [29951]

VM Region Info: 0x1e13dfa50 is not in any region.  Bytes after previous region: 3477011025  Bytes before following region: 105545042363824
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      shared memory               111fef000-111ff0000    [    4K] rw-/rw- SM=SHM  
--->  GAP OF 0x5ffeee010000 BYTES
      MALLOC_NANO              600000000000-600008000000 [128.0M] rw-/rwx SM=PRV  

Thread 0:
0   libsystem_kernel.dylib        	    0x7ff80ee222b2 __sigsuspend_nocancel + 10
1   libdispatch.dylib             	    0x7ff80eccbd2f _dispatch_sigsuspend + 36
2   libdispatch.dylib             	    0x7ff80eccbd0b _dispatch_sig_thread + 49

Thread 1:
********************
********************
********************
********************

Thread 2 Crashed:
0   libobjc.A.dylib               	    0x7ff80eac64a9 objc_msgSend + 41
1   libobjc.A.dylib               	    0x7ff80eae6582 objc_object::sidetable_release(bool, bool) + 270
2   Network                       	    0x7ff81553fa04 -[NWConcrete_nw_endpoint .cxx_destruct] + 52
3   libobjc.A.dylib               	    0x7ff80eacfa5b object_cxxDestructFromClass(objc_object*, objc_class*) + 83
4   libobjc.A.dylib               	    0x7ff80eac8e31 objc_destructInstance + 99
5   libobjc.A.dylib               	    0x7ff80eac8dbf _objc_rootDealloc + 62
6   Network                       	    0x7ff81553e05a -[NWConcrete_nw_endpoint dealloc] + 778
7   Network                       	    0x7ff815c30f1a -[NWOSAddressEndpoint dealloc] + 74
8   Network                       	    0x7ff815a175bf nw_array_dispose + 383
9   Network                       	    0x7ff815718ab1 -[OS_nw_array dealloc] + 17
10  Network                       	    0x7ff815bd2b3d -[NWConcrete_nw_path .cxx_destruct] + 93
11  libobjc.A.dylib               	    0x7ff80eacfa5b object_cxxDestructFromClass(objc_object*, objc_class*) + 83
12  libobjc.A.dylib               	    0x7ff80eac8e31 objc_destructInstance + 99
13  libobjc.A.dylib               	    0x7ff80eac8dbf _objc_rootDealloc + 62
14  Network                       	    0x7ff815bd29af -[NWConcrete_nw_path dealloc] + 127
15  Network                       	    0x7ff815bd045a -[NWConcrete_nw_path_evaluator .cxx_destruct] + 58
16  libobjc.A.dylib               	    0x7ff80eacfa5b object_cxxDestructFromClass(objc_object*, objc_class*) + 83
17  libobjc.A.dylib               	    0x7ff80eac8e31 objc_destructInstance + 99
18  libobjc.A.dylib               	    0x7ff80eac8dbf _objc_rootDealloc + 62
19  Network                       	    0x7ff815bd0377 -[NWConcrete_nw_path_evaluator dealloc] + 967
20  Network                       	    0x7ff815a606ca nw_nat64_get_interface_state_internal + 2634
21  Network                       	    0x7ff815a5f905 nw_nat64_copy_prefixes_internal + 101
22  Network                       	    0x7ff815a5f482 nw_nat64_copy_prefixes + 210
23  Network                       	    0x7ff815a62537 nw_nat64_synthesize + 215
24  libsystem_info.dylib          	    0x7ff80ee9447e _gai_nat64_synthesis + 309
25  libsystem_info.dylib          	    0x7ff80ee940c2 si_addrinfo + 886
26  libsystem_info.dylib          	    0x7ff80ee93caf getaddrinfo + 176
27  com.mycompany.client.product-Client.ui.pkttunnel	       0x10f3c2bb4 ******::resolvehostname(char const*, char const*, addrinfo, addrinfo**) + 32
28  com.mycompany.client.product-Client.ui.pkttunnel	       0x10f3c4e57 ******::udp_connect() + 323
29  com.mycompany.client.product-Client.ui.pkttunnel	       0x10f3c48c7 ******::ssl_create() + 129
30  com.mycompany.client.product-Client.ui.pkttunnel	       0x10f3c9014 ******::ssl_initiate_connect(fd_set&, fd_set&, int&) + 288
31  com.mycompany.client.product-Client.ui.pkttunnel	       0x10f3c3b3c ******::ssl_connect_thread(int) + 228
32  com.mycompany.client.product-Client.ui.pkttunnel	       0x10f3cc691 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(int), int>>(void*) + 39
33  libsystem_pthread.dylib       	    0x7ff80ee5b1d3 _pthread_start + 125
34  libsystem_pthread.dylib       	    0x7ff80ee56bd3 thread_start + 15



Can someone please help in understanding what could be causing this crash. Can this caused due to stack corruption due to C++/C code switched to objective C?

There's no concrete way to determine what happened here other than nw_path_evaluator was deallocated out from under (which may be normal behavior) you when using getaddrinfo. Do you happen to have any logs associated with this?

Matt wrote:

Do you happen to have any logs associated with this?

Specifically, can you post a full Apple crash report? See Posting a Crash Report for advice on how to do that.

You wrote:

Can this caused due to stack corruption due to C++/C code switched to Objective-C?

Well, anything’s possible but, in general, switching between Objective-C and other C-based languages is pretty seamless, so that’s not the first explanation I’d reach for.

Share and Enjoy

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

Thanks Matt and Eskimo for looking into this. I am attaching the full crash report. Please advice if you find anything usual in the report. Thanks.

Please change the file extension from '.log' to '.ips'. ie: com.mycompanyclient.MyCompany-Client.productui.Productpkttunnel-2023-08-18-200444_2 copy.log -> com.mycompanyclient.MyCompany-Client.productui.Productpkttunnel-2023-08-18-200444_2 copy.ips

{"app_name":"com.mycompany.client.mycompany-Client.productui.productpkttunnel","timestamp":"2023-08-18 20:04:44.00 +0530","app_version":"1.0","slice_uuid":"6e862aa0-d6b4-3dd2-a365-351c3d54aaa4","build_version":"1","platform":1,"bundleID":"com.mycompany.client.mycompany-Client.productui.productpkttunnel","share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 13.5 (22G74)","roots_installed":0,"name":"com.mycompany.client.mycompany-Client.productui.productpkttunnel","incident_id":"B1E162AF-7459-4D5A-AAB1-6EB7B121E3DA"}
{
  "uptime" : 65000,
  "procRole" : "Unspecified",
  "version" : 2,
  "userID" : 0,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro16,1",
  "coalitionID" : 7398,
  "osVersion" : {
    "train" : "macOS 13.5",
    "build" : "22G74",
    "releaseType" : "User"
  },
  "captureTime" : "2023-08-18 20:04:43.6346 +0530",
  "incident" : "B1E162AF-7459-4D5A-AAB1-6EB7B121E3DA",
  "pid" : 29951,
  "cpuType" : "X86-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-08-18 18:46:06.9825 +0530",
  "procStartAbsTime" : 60381716974519,
  "procExitAbsTime" : 65098252391514,
  "procName" : "com.mycompany.client.mycompany-Client.productui.productpkttunnel",
  "procPath" : "\/Library\/SystemExtensions\/*\/com.mycompany.client.mycompany-Client.productui.productpkttunnel",
  "bundleInfo" : {"CFBundleShortVersionString":"1.0","CFBundleVersion":"1","CFBundleIdentifier":"com.mycompany.client.mycompany-Client.productui.productpkttunnel"},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1",
  "crashReporterKey" : "F235BB2F-C030-0A58-E5C1-C3FE9796F29C",
  "throttleTimeout" : 10,
  "codeSigningID" : "com.mycompany.client.mycompany-Client.productui.productpkttunnel",
  "codeSigningTeamID" : "24W52P9M7W",
  "codeSigningFlags" : 570503953,
  "codeSigningValidationCategory" : 6,
  "codeSigningTrustLevel" : 0,
  "wakeTime" : 37781,
  "bridgeVersion" : {"build":"20P6072","train":"7.6"},
  "sleepWakeUUID" : "C73181BF-B3A9-4DED-9556-897ED8C2E0A1",
  "sip" : "enabled",
  "vmRegionInfo" : "0x1e13dfa50 is not in any region.  Bytes after previous region: 3477011025  Bytes before following region: 105545042363824\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      shared memory               111fef000-111ff0000    [    4K] rw-\/rw- SM=SHM  \n--->  GAP OF 0x5ffeee010000 BYTES\n      MALLOC_NANO              600000000000-600008000000 [128.0M] rw-\/rwx SM=PRV  ",
  "exception" : {"codes":"0x0000000000000001, 0x00000001e13dfa50","rawCodes":[1,8073902672],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x00000001e13dfa50"},
  "termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":29951},
  "vmregioninfo" : "0x1e13dfa50 is not in any region.  Bytes after previous region: 3477011025  Bytes before following region: 105545042363824\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      shared memory               111fef000-111ff0000    [    4K] rw-\/rw- SM=SHM  \n--->  GAP OF 0x5ffeee010000 BYTES\n      MALLOC_NANO              600000000000-600008000000 [128.0M] rw-\/rwx SM=PRV  ",
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 2,
  "threads" : [{"id":639503,"frames":[{"imageOffset":29362,"symbol":"__sigsuspend_nocancel","symbolLocation":10,"imageIndex":2},{"imageOffset":85295,"symbol":"_dispatch_sigsuspend","symbolLocation":36,"imageIndex":3},{"imageOffset":85259,"symbol":"_dispatch_sig_thread","symbolLocation":49,"imageIndex":3}]},{"id":639527,"frames":[{"imageOffset":11582,"symbol":"__ulock_wait","symbolLocation":10,"imageIndex":2},{"imageOffset":31161,"symbol":"_pthread_join","symbolLocation":348,"imageIndex":4},{"imageOffset":107750,"symbol":"std::__1::thread::join()","symbolLocation":24,"imageIndex":5},{"imageOffset":5262415,"symbol":"FromDevice::selected(int, int)","symbolLocation":231,"imageIndex":0},{"imageOffset":5270939,"symbol":"SelectSet::run_selects_select(RouterThread*)","symbolLocation":89,"imageIndex":0},{"imageOffset":5863065,"symbol":"RouterThread::driver()","symbolLocation":241,"imageIndex":0},{"imageOffset":5365236,"symbol":"CClickManager::run()","symbolLocation":114,"imageIndex":0},{"imageOffset":9262,"symbol":"void* std::__1::__thread_proxy>, productSvc::Run()::$_0>>(void*)","symbolLocation":159,"imageIndex":0},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":4},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":4}]},{"triggered":true,"id":639976,"instructionState":{"instructionStream":{"bytes":[73,139,67,8,72,131,248,0,116,3,76,49,208,195,235,0,49,192,195,102,102,102,102,102,102,46,15,31,132,0,0,0,0,0,102,102,102,102,102,102,46,15,31,132,0,0,0,0,0,102,15,31,68,0,0,72,133,255,46,116,114,64,246,199,1,46,117,118,73,186,248,255,255,255,255,127,0,0,76,35,23,73,137,243,69,35,90,24,73,193,227,4,77,3,90,16,73,59,51,117,10,77,139,91,8,77,49,211,65,255,227,73,131,59,1,118,19,73,131,195,16,73,59,51,117,241,77,139,91,8,77,49,211,65,255,227,114,112,77,139,91,8,235,10,73,131,59,1,118,19,73,131,195,16,73,59,51,117,241,77,139,91,8,77,49,211,65,255,227,235,79,15,31,64,0,49,192,49,210,15,87,192,15,87,201,195,65,137,251,65,131,227],"offset":96}},"threadState":{"r13":{"value":140704509801473,"symbolLocation":1,"symbol":"Trampolines"},"rax":{"value":140704448137816},"rflags":{"value":66054},"cpu":{"value":13},"r14":{"value":1},"rsi":{"value":140703898273451,"objc-selector":"dealloc"},"r8":{"value":4},"cr2":{"value":8073902672},"rdx":{"value":105553174250816},"r10":{"value":4553240984,"symbolLocation":16,"symbol":"vtable for OverlayKeepaliveProbe"},"r9":{"value":105553174200704},"r15":{"value":140704509803072,"symbolLocation":1536,"symbol":"(anonymous namespace)::SideTablesMap"},"rbx":{"value":123145513669392},"trap":{"value":14,"description":"(no mapping for user data read)"},"err":{"value":4},"r11":{"value":8073902672},"rip":{"value":140703374795945,"matchesCrashFrame":1},"rbp":{"value":123145513669472},"rsp":{"value":123145513669384},"r12":{"value":105553174200704},"rcx":{"value":140704448137816},"flavor":"x86_THREAD_STATE","rdi":{"value":105553174200704}},"frames":[{"imageOffset":29865,"symbol":"objc_msgSend","symbolLocation":41,"imageIndex":6},{"imageOffset":161154,"symbol":"objc_object::sidetable_release(bool, bool)","symbolLocation":270,"imageIndex":6},{"imageOffset":1333764,"symbol":"-[NWConcrete_nw_endpoint .cxx_destruct]","symbolLocation":52,"imageIndex":7},{"imageOffset":68187,"symbol":"object_cxxDestructFromClass(objc_object*, objc_class*)","symbolLocation":83,"imageIndex":6},{"imageOffset":40497,"symbol":"objc_destructInstance","symbolLocation":99,"imageIndex":6},{"imageOffset":40383,"symbol":"_objc_rootDealloc","symbolLocation":62,"imageIndex":6},{"imageOffset":1327194,"symbol":"-[NWConcrete_nw_endpoint dealloc]","symbolLocation":778,"imageIndex":7},{"imageOffset":8613658,"symbol":"-[NWOSAddressEndpoint dealloc]","symbolLocation":74,"imageIndex":7},{"imageOffset":6411711,"symbol":"nw_array_dispose","symbolLocation":383,"imageIndex":7},{"imageOffset":3271345,"symbol":"-[OS_nw_array dealloc]","symbolLocation":17,"imageIndex":7},{"imageOffset":8227645,"symbol":"-[NWConcrete_nw_path .cxx_destruct]","symbolLocation":93,"imageIndex":7},{"imageOffset":68187,"symbol":"object_cxxDestructFromClass(objc_object*, objc_class*)","symbolLocation":83,"imageIndex":6},{"imageOffset":40497,"symbol":"objc_destructInstance","symbolLocation":99,"imageIndex":6},{"imageOffset":40383,"symbol":"_objc_rootDealloc","symbolLocation":62,"imageIndex":6},{"imageOffset":8227247,"symbol":"-[NWConcrete_nw_path dealloc]","symbolLocation":127,"imageIndex":7},{"imageOffset":8217690,"symbol":"-[NWConcrete_nw_path_evaluator .cxx_destruct]","symbolLocation":58,"imageIndex":7},{"imageOffset":68187,"symbol":"object_cxxDestructFromClass(objc_object*, objc_class*)","symbolLocation":83,"imageIndex":6},{"imageOffset":40497,"symbol":"objc_destructInstance","symbolLocation":99,"imageIndex":6},{"imageOffset":40383,"symbol":"_objc_rootDealloc","symbolLocation":62,"imageIndex":6},{"imageOffset":8217463,"symbol":"-[NWConcrete_nw_path_evaluator dealloc]","symbolLocation":967,"imageIndex":7},{"imageOffset":6710986,"symbol":"nw_nat64_get_interface_state_internal","symbolLocation":2634,"imageIndex":7},{"imageOffset":6707461,"symbol":"nw_nat64_copy_prefixes_internal","symbolLocation":101,"imageIndex":7},{"imageOffset":6706306,"symbol":"nw_nat64_copy_prefixes","symbolLocation":210,"imageIndex":7},{"imageOffset":6718775,"symbol":"nw_nat64_synthesize","symbolLocation":215,"imageIndex":7},{"imageOffset":21630,"symbol":"_gai_nat64_synthesis","symbolLocation":309,"imageIndex":8},{"imageOffset":20674,"symbol":"si_addrinfo","symbolLocation":886,"imageIndex":8},{"imageOffset":19631,"symbol":"getaddrinfo","symbolLocation":176,"imageIndex":8},{"imageOffset":5278644,"symbol":"funcssl::resolvehostname(char const*, char const*, addrinfo, addrinfo**)","symbolLocation":32,"imageIndex":0},{"imageOffset":5287511,"symbol":"funcssl::udp_connect()","symbolLocation":323,"imageIndex":0},{"imageOffset":5286087,"symbol":"funcssl::ssl_create()","symbolLocation":129,"imageIndex":0},{"imageOffset":5304340,"symbol":"funcssl::ssl_initiate_connect(fd_set&, fd_set&, int&)","symbolLocation":288,"imageIndex":0},{"imageOffset":5282620,"symbol":"funcssl::ssl_connect_thread(int)","symbolLocation":228,"imageIndex":0},{"imageOffset":5318289,"symbol":"void* std::__1::__thread_proxy>, void (*)(int), int>>(void*)","symbolLocation":39,"imageIndex":0},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":4},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":4}]},{"id":639977,"frames":[{"imageOffset":41618,"symbol":"__select","symbolLocation":10,"imageIndex":2},{"imageOffset":5283771,"symbol":"funcssl::ssl_wait()","symbolLocation":919,"imageIndex":0},{"imageOffset":5318436,"symbol":"void* std::__1::__thread_proxy>, void (*)()>>(void*)","symbolLocation":36,"imageIndex":0},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":4},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":4}]},{"id":639978,"frames":[{"imageOffset":16334,"symbol":"__semwait_signal","symbolLocation":10,"imageIndex":2},{"imageOffset":62853,"symbol":"nanosleep","symbolLocation":196,"imageIndex":9},{"imageOffset":99582,"symbol":"sleep","symbolLocation":41,"imageIndex":9},{"imageOffset":5188511,"symbol":"InfiotOverlayMsg::statemsg_timer_callback()","symbolLocation":115,"imageIndex":0},{"imageOffset":5192610,"symbol":"void* std::__1::__thread_proxy>, void (*)()>>(void*)","symbolLocation":36,"imageIndex":0},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":4},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":4}]},{"id":639979,"frames":[{"imageOffset":41618,"symbol":"__select","symbolLocation":10,"imageIndex":2},{"imageOffset":2375157,"symbol":"CNSCom2::startServerMessagePump()","symbolLocation":739,"imageIndex":0},{"imageOffset":2379725,"symbol":"CNSCom2::serverThread()","symbolLocation":849,"imageIndex":0},{"imageOffset":314184,"symbol":"boost::(anonymous namespace)::thread_proxy(void*)","symbolLocation":136,"imageIndex":0},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":4},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":4}]},{"id":639981,"frames":[{"imageOffset":11890,"symbol":"__read_nocancel","symbolLocation":10,"imageIndex":2},{"imageOffset":56601,"symbol":"_sread","symbolLocation":16,"imageIndex":9},{"imageOffset":56520,"symbol":"__srefill1","symbolLocation":24,"imageIndex":9},{"imageOffset":136779,"symbol":"fgets","symbolLocation":98,"imageIndex":9},{"imageOffset":228681,"symbol":"productutil::exec(std::__1::basic_string, std::__1::allocator> const&, std::__1::basic_string, std::__1::allocator>&)","symbolLocation":117,"imageIndex":0},{"imageOffset":5460086,"symbol":"setproductConfigsToVirtualInterface()","symbolLocation":92,"imageIndex":0},{"imageOffset":5263982,"symbol":"FromDevice::selected(int, int)::$_1::operator()() const","symbolLocation":440,"imageIndex":0},{"imageOffset":5263542,"symbol":"decltype(static_cast(fp)()) std::__1::__invoke(FromDevice::selected(int, int)::$_1&&)","symbolLocation":9,"imageIndex":0},{"imageOffset":5263494,"symbol":"void* std::__1::__thread_proxy>, FromDevice::selected(int, int)::$_1>>(void*)","symbolLocation":42,"imageIndex":0},{"imageOffset":25043,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":4},{"imageOffset":7123,"symbol":"thread_start","symbolLocation":15,"imageIndex":4}]},{"id":672726,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]},{"id":675383,"frames":[{"imageOffset":7088,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4545290240,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.mycompany.client.mycompany-Client.productui.productpkttunnel",
    "size" : 7553024,
    "uuid" : "6e862aa0-d6b4-3dd2-a365-351c3d54aaa4",
    "path" : "\/Library\/SystemExtensions\/*\/com.mycompany.client.mycompany-Client.productui.productpkttunnel",
    "name" : "com.mycompany.client.mycompany-Client.productui.productpkttunnel",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4591390720,
    "CFBundleShortVersionString" : "3.0",
    "CFBundleIdentifier" : "com.apple.security.csparser",
    "size" : 98304,
    "uuid" : "0e1b6c05-c1cd-3eaf-9857-4787d790f22a",
    "path" : "\/System\/Library\/Frameworks\/Security.framework\/Versions\/A\/PlugIns\/csparser.bundle\/Contents\/MacOS\/csparser",
    "name" : "csparser",
    "CFBundleVersion" : "60420.140.26"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703378288640,
    "size" : 237568,
    "uuid" : "642737ce-21cf-3d87-a7b6-7eea2c080a7e",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703376830464,
    "size" : 294900,
    "uuid" : "677ae7f7-158f-328b-85e2-8a960327856d",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703378526208,
    "size" : 49152,
    "uuid" : "3a3fa85c-f1fe-336c-bf68-924fc947ade3",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703377694720,
    "size" : 507896,
    "uuid" : "8b258faf-4392-3385-a019-d80f49c5af31",
    "path" : "\/usr\/lib\/libc++.1.dylib",
    "name" : "libc++.1.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64h",
    "base" : 140703374766080,
    "size" : 245753,
    "uuid" : "461f6347-d5e0-306d-b68d-5ea48625c01e",
    "path" : "\/usr\/lib\/libobjc.A.dylib",
    "name" : "libobjc.A.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703485108224,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.Network",
    "size" : 12804084,
    "uuid" : "21955249-15fc-3bd3-913b-fe9f78ab645d",
    "path" : "\/System\/Library\/Frameworks\/Network.framework\/Versions\/A\/Network",
    "name" : "Network",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703378763776,
    "size" : 176120,
    "uuid" : "16694afc-0a11-3bee-b3b6-84c718dbd550",
    "path" : "\/usr\/lib\/system\/libsystem_info.dylib",
    "name" : "libsystem_info.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703377137664,
    "size" : 557048,
    "uuid" : "d5b303ad-54f4-323b-bbe2-2d0f34c45649",
    "path" : "\/usr\/lib\/system\/libsystem_c.dylib",
    "name" : "libsystem_c.dylib"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }
],
  "sharedCache" : {
  "base" : 140703374389248,
  "size" : 21474836480,
  "uuid" : "97012334-1dad-3407-9a6d-bf5805273339"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=368.0M resident=0K(0%) swapped_out_or_unallocated=368.0M(100%)\nWritable regions: Total=723.8M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=723.8M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nActivity Tracing                   256K        1 \nKernel Alloc Once                    8K        1 \nMALLOC                           331.9M      186 \nMALLOC guard page                   16K        4 \nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                         36K        9 \nStack                             4688K       10 \nStack Guard                       64.0M        2 \nVM_ALLOCATE                          8K        2 \n__DATA                            11.4M      235 \n__DATA_CONST                      9794K      157 \n__DATA_DIRTY                       442K       89 \n__FONT_DATA                        2352        1 \n__LINKEDIT                       177.0M        4 \n__OBJC_RO                         66.3M        1 \n__OBJC_RW                         2013K        2 \n__TEXT                           191.1M      250 \ndyld private memory                260K        2 \nmapped file                       31.2M        6 \nshared memory                     3492K       10 \n===========                     =======  ======= \nTOTAL                              1.2G      973 \nTOTAL, minus reserved VM space   893.3M      973 \n",
  "legacyInfo" : {
  "threadTriggered" : {

  }
},
  "logWritingSignature" : "21c70371f28997fbb99b7391fdace400b8549cfe"
}

Thank you for posting the crash log. I dug in a bit further and it's still unclear the exact place where this is going wrong. When this happens, do you see any extra logs that appear in the system log from com.apple.network? For example an error or fault log? Also, does this happen on with v6 addresses or does it also happen with v4 addresses too?

Hi @meaton,

I was able to to capture below system log from one of the system where this crash was observed. But the same logs were not coming on other setups. Can you please check if you can conculde anything from this?


2023-09-08 15:53:45.945148+0530 0x5c2c55   Fault       0x803806             74546  14   com.mycompany.client.mycompany-Client.productui.productpkttunnel: (Network) [com.apple.network:] nw_hash_table_release_all_objects called with invalid hash table
2023-09-08 15:53:45.945152+0530 0x5c2c55   Activity    0x803806             74546  0    com.mycompany.client.mycompany-Client.productui.productpkttunnel: (libsystem_trace.dylib) Activity for state dumps
2023-09-08 15:53:45.952315+0530 0xe99      Error       0x0                  410    0    com.apple.ifdreader: [com.apple.CryptoTokenKit:ccid] Failed to find AppleUSBAlternateServiceRegistryID.
2023-09-08 15:53:45.953383+0530 0xe99      Error       0x0                  410    0    com.apple.ifdreader: [com.apple.CryptoTokenKit:ccid] Failed to find AppleUSBAlternateServiceRegistryID.
2023-09-08 15:53:45.954154+0530 0x5cd11f   Default     0x0                  0      0    kernel: arm64e_plugin_host: running binary "bash" in keys-off mode due to identity: com.apple.bash
2023-09-08 15:53:45.960683+0530 0x5c2c55   Error       0x0                  74546  0    com.mycompany.client.mycompany-Client.productui.productpkttunnel: (Network) [com.apple.network:] nw_hash_table_release_all_objects called with invalid hash table, dumping backtrace:
        [arm64] libnetcore-3100.140.3
    0   Network                             0x00000001a2a83564 __nw_create_backtrace_string + 192
    1   Network                             0x00000001a2c78b84 nw_hash_table_release_all_objects + 1164
    2   Network                             0x00000001a261f8a0 -[NWConcrete_nw_endpoint dealloc] + 500
    3   Network                             0x00000001a2d546e4 -[NWOSAddressEndpoint dealloc] + 76
    4   Network                             0x00000001a2b22688 nw_array_dispose + 440
    5   Network                             0x00000001a280d12c -[OS_nw_array dealloc] + 28
    6   Network                             0x00000001a2ceeb7c -[NWConcrete_nw_path .cxx_destruct] + 92
    7   libobjc.A.dylib                     0x000000019bcc840c _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 116
    8   libobjc.A.dylib                     0x000000019bcbfe88 objc_destructInstance + 80
    9   libobjc.A.dylib         <…>                

2023-09-08 15:53:45.932668+0530 0x5cd052   Default     0x0                  75906  0    mDNSResponder: [com.apple.mDNSResponder:Default] [R246->Q57272] GenerateNegativeResponse: Generating negative response for question  (AAAA)
2023-09-08 15:53:45.932676+0530 0x5cd052   Default     0x0                  75906  0    mDNSResponder: [com.apple.mDNSResponder:Default] [R246->Q57272] DNSServiceQueryRecord(, AAAA) RESULT ADD interface 0: (mortal, DNSSEC Indeterminate)
2023-09-08 15:53:45.945148+0530 0x5c2c55   Fault       0x803806             74546  14   com.mycompany.client.mycompany-Client.productui.productpkttunnel: (Network) [com.apple.network:] nw_hash_table_release_all_objects called with invalid hash table
2023-09-08 15:53:45.945152+0530 0x5c2c55   Activity    0x803806             74546  0    com.mycompany.client.mycompany-Client.productui.productpkttunnel: (libsystem_trace.dylib) Activity for state dumps
2023-09-08 15:53:45.952315+0530 0xe99      Error       0x0                  410    0    com.apple.ifdreader: [com.apple.CryptoTokenKit:ccid] Failed to find AppleUSBAlternateServiceRegistryID.
2023-09-08 15:53:45.953383+0530 0xe99      Error       0x0                  410    0    com.apple.ifdreader: [com.apple.CryptoTokenKit:ccid] Failed to find AppleUSBAlternateServiceRegistryID.
2023-09-08 15:53:45.954154+0530 0x5cd11f   Default     0x0                  0      0    kernel: arm64e_plugin_host: running binary "bash" in keys-off mode due to identity: com.apple.bash
2023-09-08 15:53:45.960683+0530 0x5c2c55   Error       0x0                  74546  0    com.mycompany.client.mycompany-Client.productui.productpkttunnel: (Network) [com.apple.network:] nw_hash_table_release_all_objects called with invalid hash table, dumping backtrace:
        [arm64] libnetcore-3100.140.3
    0   Network                             0x00000001a2a83564 __nw_create_backtrace_string + 192
    1   Network                             0x00000001a2c78b84 nw_hash_table_release_all_objects + 1164
    2   Network                             0x00000001a261f8a0 -[NWConcrete_nw_endpoint dealloc] + 500
    3   Network                             0x00000001a2d546e4 -[NWOSAddressEndpoint dealloc] + 76
    4   Network                             0x00000001a2b22688 nw_array_dispose + 440
    5   Network                             0x00000001a280d12c -[OS_nw_array dealloc] + 28
    6   Network                             0x00000001a2ceeb7c -[NWConcrete_nw_path .cxx_destruct] + 92
    7   libobjc.A.dylib                     0x000000019bcc840c _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 116
    8   libobjc.A.dylib                     0x000000019bcbfe88 objc_destructInstance + 80
    9   libobjc.A.dylib         <…>                
2023-09-08 15:53:45.960747+0530 0x5c2c55   Default     0x0                  0      0    kernel: com.mycompany.client.mycompany-Cli[74546] Corpse allowed 1 of 5
2023-09-08 15:53:45.961030+0530 0x5cca70   Default     0x0                  460    0    nesessionmanager: (NetworkExtension) [com.apple.networkextension:] Scheduing timer for extension failure/exit for (null)
2023-09-08 15:53:45.961368+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [74546]:] exited due to SIGSEGV | sent by exc handler[74546]
2023-09-08 15:53:45.961391+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [74546]:] process exited in a dirty state
2023-09-08 15:53:45.961395+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [74546]:] service has crashed 1 times in a row
2023-09-08 15:53:45.961399+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [74546]:] service state: exited 
2023-09-08 15:53:45.961408+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [74546]:] internal event: EXITED, code = 0
2023-09-08 15:53:45.961415+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system:] service inactive: NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1
2023-09-08 15:53:45.961731+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [74546]:] service state: not running
2023-09-08 15:53:45.961739+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1:] internal event: WILL_SPAWN, code = 0
2023-09-08 15:53:45.961743+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1:] service state: spawn scheduled
2023-09-08 15:53:45.961746+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1:] service state: spawning
2023-09-08 15:53:45.961768+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1:] launching: incomplete work
2023-09-08 15:53:45.963763+0530 0x1df0     Error       0x0                  901    0    Finder: (DesktopServicesPriv) [com.apple.DesktopServices:FPProvider] Failed to get domain ID for data separated iCloud Drive account
2023-09-08 15:53:45.963768+0530 0x1df0     Error       0x0                  901    0    Finder: (DesktopServicesPriv) [com.apple.DesktopServices:FPProvider] Failed to get domain ID for primary iCloud Drive account
2023-09-08 15:53:45.963951+0530 0x5cc95f   Default     0x0                  0      0    kernel: memorystatus_update(enter): pid 75924, priority 210, dirty=0x0, Active(-1MB NF), Inactive(-1MB, NF)
2023-09-08 15:53:45.963971+0530 0x5cc95f   Default     0x0                  0      0    kernel: memorystatus_update: init: limit on pid 75924 (-1MB F ) targeting priority(210) dirty?=0x0
2023-09-08 15:53:45.964477+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [75924]:] xpcproxy spawned with pid 75924
2023-09-08 15:53:45.964499+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [75924]:] internal event: SPAWNED, code = 0
2023-09-08 15:53:45.964504+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [75924]:] service state: xpcproxy
2023-09-08 15:53:45.964528+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [75924]:] internal event: SOURCE_ATTACH, code = 0
2023-09-08 15:53:45.966414+0530 0x1df0     Error       0x0                  901    0    Finder: (DesktopServicesPriv) [com.apple.DesktopServices:FPProvider] Failed to get domain ID for data separated iCloud Drive account
2023-09-08 15:53:45.966418+0530 0x1df0     Error       0x0                  901    0    Finder: (DesktopServicesPriv) [com.apple.DesktopServices:FPProvider] Failed to get domain ID for primary iCloud Drive account
2023-09-08 15:53:45.966440+0530 0x1df0     Error       0x0                  901    0    Finder: (DesktopServicesPriv) [com.apple.DesktopServices:FPProvider] Failed to get domain ID for data separated iCloud Drive account
2023-09-08 15:53:45.966441+0530 0x1df0     Error       0x0                  901    0    Finder: (DesktopServicesPriv) [com.apple.DesktopServices:FPProvider] Failed to get domain ID for primary iCloud Drive account
2023-09-08 15:53:45.970083+0530 0x1df0     Error       0x0                  901    0    Finder: (DesktopServicesPriv) [com.apple.DesktopServices:FPProvider] Failed to get domain ID for data separated iCloud Drive account
2023-09-08 15:53:45.970086+0530 0x1df0     Error       0x0                  901    0    Finder: (DesktopServicesPriv) [com.apple.DesktopServices:FPProvider] Failed to get domain ID for primary iCloud Drive account
2023-09-08 15:53:45.970099+0530 0x1df0     Error       0x0                  901    0    Finder: (DesktopServicesPriv) [com.apple.DesktopServices:FPProvider] Failed to get domain ID for data separated iCloud Drive account
2023-09-08 15:53:45.970101+0530 0x1df0     Error       0x0                  901    0    Finder: (DesktopServicesPriv) [com.apple.DesktopServices:FPProvider] Failed to get domain ID for primary iCloud Drive account
2023-09-08 15:53:45.970794+0530 0x5ccc59   Default     0x0                  1      0    launchd: Last log repeated 4 times
2023-09-08 15:53:45.971293+0530 0x5cd124   Default     0x0                  0      0    kernel: memorystatus_update(enter): pid 75924, priority 40, dirty=0x0, Active(-1MB NF), Inactive(-1MB, NF)
2023-09-08 15:53:45.971300+0530 0x5cd124   Default     0x0                  0      0    kernel: memorystatus_update: init: limit on pid 75924 (-1MB F ) targeting priority(40) dirty?=0x0
2023-09-08 15:53:45.971690+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [75924]:] service state: running
2023-09-08 15:53:45.971706+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [75924]:] internal event: INIT, code = 0
2023-09-08 15:53:45.971760+0530 0x5cc95f   Default     0x0                  1      0    launchd: [system/NetworkExtension.com.mycompany.client.mycompany-Client.productui.productpkttunnel.1.0.1 [75924]:] Successfully spawned com.mycompany.client.mycompany-Client.productui.productpkttunnel[75924] because incomplete work

Thanks Vishal

SIGSEGV crash in getaddrinfo system call
 
 
Q