Part 1:
Thank you for your reply. I have attached the log file. I apologize for the inconvenience, but please take a look.
So, starting with the log, the first thing that jumps out at me is that it's ascribing the crash to this stack in thread 0:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread:
0 libsystem_kernel.dylib 0x24a42ccd4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x24a43030c mach_msg2_internal + 76
2 libsystem_kernel.dylib 0x24a43022c mach_msg2 + 4 [inlined]
3 libsystem_kernel.dylib 0x24a43022c mach_msg_overwrite + 424
4 libsystem_kernel.dylib 0x24a430078 mach_msg + 24
5 CoreFoundation 0x19b9dfea4 __CFRunLoopServiceMachPort + 160
6 CoreFoundation 0x19b9a9f94 __CFRunLoopRun + 1188
7 CoreFoundation 0x19b9a91d0 _CFRunLoopRunSpecificWithOptions + 532
8 GraphicsServices 0x240eb7498 GSEventRunModal + 120
9 UIKitCore 0x1a166d2cc -[UIApplication _run] + 796
10 UIKitCore 0x1a15d8158 UIApplicationMain + 332
11 UnityFramework 0x11cbfbb08
12 sekai 0x1020bbbb8
13 dyld 0x1985bdc1c start + 6928
That's basically "wrong", or at least deeply misleading. mach_msg2_trap is one of a number of functions that operate as final entry points into the kernel. As such, they aren't really something your app is "running" as much as they are places where your app is waiting to hear "back" from the kernel. Similarly, functions like this are SO heavily used [1] by the entire system that essentially ANY bug/failure in their basic implementation is basically catastrophic.
[1] The "mach_msg2*" stack above is a VERY strong contender for THE most frequently called function in the entire system. On a typical machine, I'd guess that its call rate is EASILY in the "billions/day", if not "trillions/day”.
Because of that, in practice, you'll either:
- Crash in one of the earlier functions leading "into" them (because something was "wrong" with your input).
OR
- Crash in one of the earlier functions returning "from" them (because your app didn't like whatever the kernel returned to you).
...but you'll basically "never" crash inside them. Looking at your other thread, the rest of them (with one exception) are all blocked in functions I'd put in a similar category:
0 libsystem_kernel.dylib 0x24a42cc50 semaphore_wait_trap + 8
...
0 libsystem_kernel.dylib 0x24a4325e8 __psynch_cvwait + 8
...
0 libsystem_kernel.dylib 0x24a432808 __semwait_signal + 8
...
0 libsystem_kernel.dylib 0x24a434370 __select + 8
If we ignore all those threads, that leaves only one thread, edited down for clarity:
Thread 59 Dispatch queue: com.apple.network.connections:
0 libsystem_c.dylib 0x1a7493cc8 strcspn + 32
1 libsystem_trace.dylib 0x1c1269f00 os_log_fmt_compose + 140
2 libsystem_trace.dylib 0x1c1262a74 _os_log_impl_flatten_and_send + 8972
3 libsystem_trace.dylib 0x1c1265f5c _os_log_send_and_compose_impl + 236
4 Network 0x19a0166e8 nw_mem_buffer_allocate + 232
5 libboringssl.dylib 0x1c2af0b28 nw_protocol_boringssl_read_one_record + 160 [inlined]
...
19 Network 0x19a0017ac invocation function for block in nw_channel_create(nw_context*, unsigned char*, unsigned int, void*, unsigned int, bool, bool, bool*) + 76
20 libdispatch.dylib 0x1d5bd41e4 _dispatch_client_callout + 16
...
34 libdispatch.dylib 0x1d5bcd6ac _dispatch_workloop_worker_thread + 720
35 libsystem_pthread.dylib 0x1fa7bc3b0 _pthread_wqthread + 292
36 libsystem_pthread.dylib 0x1fa7bb8c0 start_wqthread + 8
What's critical here is that you're in a memory allocation function ("nw_mem_buffer_allocate") that's choosing to log (by calling os_log). That's an immediate red flag— by definition, memory functions are performance sensitive, so they tend to only resort to logging when "something" has gone so wrong that they can't really do anything else. In addition, you’re not inside the allocator itself (like "malloc"), which means this had to be reacting to a valid return value, not something direct like memory corruption. malloc can really only fail in one way; most likely, the answer here is that malloc returned NULL.
That's actually supported by this as well:
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 11, Segmentation fault: 11
The "Code" there is the mach exception code, with "11" being EXC_RESOURCE.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware