Simulator crashes during test in CI only

574 views Asked by At

Almost very frequently, I'm getting crashes on my CI builds that run unit and UI tests of my application with following crashlog:

Process:               trustd [9695]
Path:                  /Applications/Xcode-<CI redacted>0.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/trustd
Identifier:            trustd
Version:               58286.252.<CI redacted>
Code Type:             X86-64 (Native)
Parent Process:        launchd_sim [9623]
Responsible:           trustd [9695]
User ID:               50<CI redacted>

Date/Time:             20<CI redacted>9-04-25 11:22:25.903 -0700
OS Version:            Mac OS X <CI redacted>0.14.4 (18E226)
Report Version:        <CI redacted>2
Anonymous UUID:        E9BB8D2<CI redacted>-3445-8FCA-693D-F07E58EF8057


Time Awake Since Boot: <CI redacted>900 seconds

System Integrity Protection: disabled

Crashed Thread:        6  Dispatch queue: com.apple.MobileAsset.client.asyncmessage

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x000000<CI redacted>000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: <CI redacted>1
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [9695]

VM Regions Near 0x<CI redacted>000000000:
    SQLite page cache      0000000<CI redacted>14575000-0000000114585000 [   64K] rw-/rwx SM=PRV  
--> 
    STACK GUARD            000070000b933000-000070000b934000 [    4K] ---/rwx SM=NUL  stack guard for thread 0

Application Specific Information:
CoreSimulator 587.35 - Device: Clone 2 of iPhone Xs Max (AD46929A-F753-4DDE-9F37-AFB36EC23052) - Runtime: iOS <CI redacted>2.2 (16E226) - DeviceType: iPhone Xs Max

Thread 0:
0   libsystem_pthread.dylib         0x0000000<CI redacted>109ba3f0 start_wqthread + 0

Thread <CI redacted>:: Dispatch queue: com.apple.root.default-qos.overcommit
0   libsystem_kernel.dylib          0x0000000<CI redacted>10968126 __sigsuspend_nocancel + 10
<CI redacted>   libdispatch.dylib               0x00000001105e9854 _dispatch_sigsuspend + 21
2   libdispatch.dylib               0x0000000<CI redacted>105e983f _dispatch_sig_thread + 55

Thread 2:: Dispatch queue: com.apple.root.default-qos.overcommit
0   libsystem_kernel.dylib          0x0000000<CI redacted>1096422a mach_msg_trap + 10
<CI redacted>   libsystem_kernel.dylib          0x000000011096476c mach_msg + 60
2   libsystem_notify.dylib          0x0000000<CI redacted>108a0dc4 notify_check + 263
3   libsystem_c.dylib               0x0000000<CI redacted>107246da notify_check_tz + 44
4   libsystem_c.dylib               0x0000000<CI redacted>107242e3 tzsetwall_basic + 45
5   libsystem_c.dylib               0x0000000<CI redacted>10726262 localtime_r + 41
6   com.apple.CoreFoundation        0x0000000<CI redacted>0dacc74b _populateBanner + 91
7   com.apple.CoreFoundation        0x0000000<CI redacted>0daca1c7 _CFLogvEx2Predicate + 391
8   com.apple.CoreFoundation        0x0000000<CI redacted>0daca411 _CFLogvEx3 + 369
9   com.apple.Foundation            0x0000000<CI redacted>0dfb81aa _NSLogv + 104
<CI redacted>0  com.apple.Foundation            0x000000010dfb8242 NSLog + 132
<CI redacted>1  com.apple.MobileAssets          0x000000010cfb3ace __setClientConnectionHandler_block_invoke + 162
<CI redacted>2  libxpc.dylib                    0x0000000110906a90 _xpc_connection_call_event_handler + 56
<CI redacted>3  libxpc.dylib                    0x0000000110906c57 _xpc_connection_mach_event + 446
<CI redacted>4  libdispatch.dylib               0x00000001105d8da2 _dispatch_client_callout4 + 9
<CI redacted>5  libdispatch.dylib               0x00000001105f243a _dispatch_mach_cancel_invoke + 65
<CI redacted>6  libdispatch.dylib               0x00000001105ef903 _dispatch_mach_invoke + 1086
<CI redacted>7  libdispatch.dylib               0x00000001105e8fcb _dispatch_workloop_worker_thread + 645
<CI redacted>8  libsystem_pthread.dylib         0x00000001109ba611 _pthread_wqthread + 421
<CI redacted>9  libsystem_pthread.dylib         0x00000001109ba3fd start_wqthread + 13

Thread 3:: Dispatch queue: /Library/Keychains/crls/valid.sqlite3
0   libsystem_platform.dylib        0x0000000<CI redacted>109aa530 _platform_bzero$VARIANT$Ivybridge + 48
<CI redacted>   libsqlite3.dylib                0x000000010d90e021 purgeableCacheFetch + 1073
2   libsqlite3.dylib                0x0000000<CI redacted>0d8510b6 getPageNormal + 54
3   libsqlite3.dylib                0x0000000<CI redacted>0d813fd4 sqlite3BtreeBeginTrans + 884
4   libsqlite3.dylib                0x0000000<CI redacted>0d979125 sqlite3InitOne + 805
5   libsqlite3.dylib                0x0000000<CI redacted>0d8b7647 sqlite3Pragma + 3351
6   libsqlite3.dylib                0x0000000<CI redacted>0d88c065 yy_reduce + 9893
7   libsqlite3.dylib                0x0000000<CI redacted>0d8220e5 sqlite3RunParser + 533
8   libsqlite3.dylib                0x0000000<CI redacted>0d81fd34 sqlite3LockAndPrepare + 900
9   libsqlite3.dylib                0x0000000<CI redacted>0d810b0b sqlite3_prepare_v2 + 43
<CI redacted>0  trustd                          0x000000010ceb86b3 _SecDbOpenV2 + 171
<CI redacted>1  trustd                          0x000000010ceb8431 __SecDbOpenHandle_block_invoke + 69
<CI redacted>2  trustd                          0x000000010ceb835c SecDbOpenHandle + 166
<CI redacted>3  trustd                          0x000000010ceb96d6 __SecDbConnectionAcquireRefMigrationSafe_block_invoke.47 + 366
<CI redacted>4  libdispatch.dylib               0x00000001105d8d02 _dispatch_client_callout + 8
<CI redacted>5  libdispatch.dylib               0x00000001105e55fd _dispatch_lane_barrier_sync_invoke_and_complete + 94
<CI redacted>6  trustd                          0x000000010ceb93bc SecDbConnectionAcquireRefMigrationSafe + 391
<CI redacted>7  trustd                          0x000000010ceba018 SecDbPerformRead + 44
<CI redacted>8  trustd                          0x000000010cedadb8 SecRevocationDbPerformRead + 152
<CI redacted>9  trustd                          0x000000010cee0c5b __SecRevocationDbCopyUpdateSource_block_invoke + 73
20  trustd                          0x0000000<CI redacted>0ceda1c9 SecRevocationDbCopyUpdateSource + 95
2<CI redacted>  trustd                          0x000000010cee1eed __SecRevocationDbCheckNextUpdate_block_invoke_2 + 775
22  trustd                          0x0000000<CI redacted>0cebc7e9 _sec_action_event + 21
23  libdispatch.dylib               0x0000000<CI redacted>105d8d02 _dispatch_client_callout + 8
24  libdispatch.dylib               0x0000000<CI redacted>105db6be _dispatch_continuation_pop + 440
25  libdispatch.dylib               0x0000000<CI redacted>105eb997 _dispatch_source_invoke + 2072
26  libdispatch.dylib               0x0000000<CI redacted>105df58d _dispatch_lane_serial_drain + 302
27  libdispatch.dylib               0x0000000<CI redacted>105e0297 _dispatch_lane_invoke + 452
28  libdispatch.dylib               0x0000000<CI redacted>105e8fcb _dispatch_workloop_worker_thread + 645
29  libsystem_pthread.dylib         0x0000000<CI redacted>109ba611 _pthread_wqthread + 421
30  libsystem_pthread.dylib         0x0000000<CI redacted>109ba3fd start_wqthread + 13

Thread 4:
0   libsystem_pthread.dylib         0x0000000<CI redacted>109ba3f0 start_wqthread + 0

Thread 5:
0   libsystem_pthread.dylib         0x0000000<CI redacted>109ba3f0 start_wqthread + 0

Thread 6 Crashed:: Dispatch queue: com.apple.MobileAsset.client.asyncmessage
0   libsystem_malloc.dylib          0x0000000<CI redacted>1088269a tiny_malloc_from_free_list + 340
<CI redacted>   libsystem_malloc.dylib          0x0000000110880bb8 tiny_malloc_should_clear + 229
2   libsystem_malloc.dylib          0x0000000<CI redacted>10866c08 szone_malloc_should_clear + 66
3   libsystem_malloc.dylib          0x0000000<CI redacted>10871da8 malloc_zone_malloc + 103
4   libsystem_malloc.dylib          0x0000000<CI redacted>10872558 malloc + 24
5   libxpc.dylib                    0x0000000<CI redacted>10915f6d _xpc_malloc + 47
6   libxpc.dylib                    0x0000000<CI redacted>109099f4 _xpc_dictionary_insert + 346
7   libxpc.dylib                    0x0000000<CI redacted>1090a080 xpc_dictionary_set_int64 + 41
8   libsystem_trace.dylib           0x0000000<CI redacted>108cc3b9 _os_activity_stream_reflect + 569
9   libsystem_trace.dylib           0x0000000<CI redacted>108d8ed1 _os_log_impl_stream + 583
<CI redacted>0  libsystem_trace.dylib           0x00000001108d8554 _os_log_impl_flatten_and_send + 5670
<CI redacted>1  libsystem_trace.dylib           0x00000001108d9d80 _os_log_with_args_impl + 491
<CI redacted>2  com.apple.CoreFoundation        0x000000010daca4d9 _CFLog_os_log_shim + 89
<CI redacted>3  com.apple.CoreFoundation        0x000000010daca343 _CFLogvEx3 + 163
<CI redacted>4  com.apple.Foundation            0x000000010dfb81aa _NSLogv + 104
<CI redacted>5  com.apple.Foundation            0x000000010dfb8242 NSLog + 132
<CI redacted>6  com.apple.MobileAssets          0x000000010cfb4096 __sendAsync_block_invoke + 304
<CI redacted>7  libxpc.dylib                    0x000000011091186e _xpc_connection_reply_callout + 36
<CI redacted>8  libxpc.dylib                    0x00000001109065a8 _xpc_connection_call_reply_async + 86
<CI redacted>9  libdispatch.dylib               0x00000001105d8d6c _dispatch_client_callout3 + 8
20  libdispatch.dylib               0x0000000<CI redacted>105f0468 _dispatch_mach_msg_async_reply_invoke + 332
2<CI redacted>  libdispatch.dylib               0x00000001105df58d _dispatch_lane_serial_drain + 302
22  libdispatch.dylib               0x0000000<CI redacted>105e0261 _dispatch_lane_invoke + 398
23  libdispatch.dylib               0x0000000<CI redacted>105e8fcb _dispatch_workloop_worker_thread + 645
24  libsystem_pthread.dylib         0x0000000<CI redacted>109ba611 _pthread_wqthread + 421
25  libsystem_pthread.dylib         0x0000000<CI redacted>109ba3fd start_wqthread + 13

Thread 6 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000000  rcx: 0x00000000000000<CI redacted>9  rdx: 0x0000000100000000
  rdi: 0x0000000<CI redacted>127ee080  rsi: 0x00000000a9fbc5ba  rbp: 0x000070000bcc3920  rsp: 0x000070000bcc38f0
   r8: 0x0000000000000000   r9: 0x000000<CI redacted>000000000  r10: 0x00007fefeae00000  r11: 0x00007feeda524aff
  r<CI redacted>2: 0x0000000000000004  r13: 0x00007fefeae02930  r14: 0x0000000000000004  r15: 0x00000001127f0a00
  rip: 0x0000000<CI redacted>1088269a  rfl: 0x0000000000010206  cr2: 0x000070000bc3c168

Logical CPU:     0
Error Code:      0x02000<CI redacted>70
Trap Number:     <CI redacted>33


Binary Images:
 ...

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 28925
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=82.2M resident=0K(0%) swapped_out_or_unallocated=82.2M(<CI redacted>00%)
Writable regions: Total=42.6M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=42.6M(<CI redacted>00%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        <CI redacted> 
Dispatch continuations            <CI redacted>024K        1 
Kernel Alloc Once                    8K        <CI redacted> 
MALLOC                            37.0M       <CI redacted>5 
MALLOC guard page                   <CI redacted>6K        4 
SQLite page cache                  256K        4 
STACK GUARD                         28K        7 
Stack                             3652K        9 
Stack Guard                       64.0M        2 
__DATA                            6948K      <CI redacted>15 
__DATA_DIRTY                        <CI redacted>6K        3 
__LINKEDIT                        <CI redacted>6.8M       91 
__TEXT                            65.4M       9<CI redacted> 
__UNICODE                          564K        <CI redacted> 
mapped file                       26.7M        7 
shared memory                       24K        3 
===========                     =======  ======= 
TOTAL                            222.4M      355 

Not sure what's causing it or even where I should start for debugging for it. Any hints is highly appreciated. It doesn't happen when I run the tests locally.

0

There are 0 answers