Open aep opened 2 years ago
I'm seeign the same problem. I have UTM running my VM, I come back to it some hours later, wake up my Mac, unlock the screen, and the crash window is sitting right there.
SIGSEGV with a bad address of 0x20 (in my experience on other things) means something got a null pointer, treated it like a pointer to a valid structure, and tried to access something 32 bytes from the top of the struct. We're all seeing that same bad pointer.
My log shows thread 13 as the crashed thread. It seems to be part of Apple's Metal GPU framework ("Dispatch queue: com.Metal.CompletionQueueDispatch"). Not sure where to go from there.
Crash report: crash.txt
Display settings from config.plist:
<key>Display</key>
<dict>
<key>ConsoleBackgroundColor</key>
<string>#000000</string>
<key>ConsoleFont</key>
<string>Menlo-Regular</string>
<key>ConsoleFontSize</key>
<integer>12</integer>
<key>ConsoleOnly</key>
<false/>
<key>ConsoleTextColor</key>
<string>#ffffff</string>
<key>ConsoleTheme</key>
<string>Default</string>
<key>DisplayCard</key>
<string>virtio-ramfb-gl</string>
<key>DisplayDownscaler</key>
<string>linear</string>
<key>DisplayFitScreen</key>
<true/>
<key>DisplayUpscaler</key>
<string>nearest</string>
</dict>
Does any of that look wrong?
In case anyone finds this like I did, this seems to be a workaround:
For "Display Card", choose virtio-ramfb
instead of virtio-ramfb-gl
.
It used to die within a couple of days. With the change, it's been running for a week so far without trouble.
Surprisingly, rendering speed seems faster as well.
I'm also experiencing this. I tried virtio-ramfb
, but performance was unacceptably slow.
I'm experiencing a persistent crash on macOS 13 / UTM 4.0.9 / M1 (MacBook Air) with a trace similar to the original report (com.Metal.CompletionQueueDispatch
: [MTLResourceList releaseAllObjectsAndReset]
), so I assume it could be related:
Path: /Applications/UTM.app/Contents/MacOS/UTM
Identifier: com.utmapp.UTM
Version: 4.0.9 (68)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2022-12-06 05:44:49.8647 +0200
OS Version: macOS 13.0 (22A379)
Report Version: 12
Anonymous UUID: EB2C41C4-E9B7-77A3-770A-18CE4A5B045E
Sleep/Wake UUID: F6037CB4-1AF4-4019-B681-6FC4FB6B906B
Time Awake Since Boot: 1000000 seconds
Time Since Wake: 44777 seconds
System Integrity Protection: enabled
Crashed Thread: 10 Dispatch queue: com.Metal.CompletionQueueDispatch
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020
Exception Codes: 0x0000000000000001, 0x0000000000000020
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [62975]
VM Region Info: 0x20 is not in any region. Bytes before following region: 105553518919648
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
MALLOC_NANO (reserved) 600018000000-600020000000 [128.0M] rw-/rwx SM=NUL ...(unallocated)
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x1af39edf0 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1af3b08d8 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x1af3a7638 mach_msg_overwrite + 540
3 libsystem_kernel.dylib 0x1af39f16c mach_msg + 24
4 CoreFoundation 0x1af4bdbdc __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x1af4bc4c8 __CFRunLoopRun + 1232
6 CoreFoundation 0x1af4bb8a4 CFRunLoopRunSpecific + 612
7 HIToolbox 0x1b8b2f3bc RunCurrentEventLoopInMode + 292
8 HIToolbox 0x1b8b2f200 ReceiveNextEventCommon + 672
9 HIToolbox 0x1b8b2ef48 _BlockUntilNextEventMatchingListInModeWithFilter + 72
10 AppKit 0x1b2714630 _DPSNextEvent + 632
11 AppKit 0x1b27137c0 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
12 AppKit 0x1b2707bf0 -[NSApplication run] + 464
13 AppKit 0x1b26df058 NSApplicationMain + 880
14 SwiftUI 0x1d5e57e54 0x1d5da7000 + 724564
15 SwiftUI 0x1d70411a4 0x1d5da7000 + 19505572
16 SwiftUI 0x1d688037c 0x1d5da7000 + 11375484
17 UTM 0x104ee825c 0x104e74000 + 475740
18 dyld 0x1af0b3e50 start + 2544
Thread 1:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x1af39edf0 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1af3b08d8 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x1af3a7638 mach_msg_overwrite + 540
3 libsystem_kernel.dylib 0x1af39f16c mach_msg + 24
4 CoreFoundation 0x1af4bdbdc __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x1af4bc4c8 __CFRunLoopRun + 1232
6 CoreFoundation 0x1af4bb8a4 CFRunLoopRunSpecific + 612
7 AppKit 0x1b283e248 _NSEventThread + 172
8 libsystem_pthread.dylib 0x1af3de06c _pthread_start + 148
9 libsystem_pthread.dylib 0x1af3d8e2c thread_start + 8
Thread 2:: CVDisplayLink
0 libsystem_kernel.dylib 0x1af3a25e4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1af3de664 _pthread_cond_wait + 1276
2 CoreVideo 0x1b72b19bc CVDisplayLink::waitUntil(unsigned long long) + 324
3 CoreVideo 0x1b72b0a8c CVDisplayLink::runIOThread() + 504
4 libsystem_pthread.dylib 0x1af3de06c _pthread_start + 148
5 libsystem_pthread.dylib 0x1af3d8e2c thread_start + 8
Thread 3:: SPICE Main Loop
0 AGXMetal13_3 0x1fdbb8af4 0x1fdb95000 + 146164
1 AGXMetal13_3 0x1fdf4b8cc 0x1fdb95000 + 3893452
2 AGXMetal13_3 0x1fdf04900 0x1fdb95000 + 3602688
3 AGXMetal13_3 0x1fdeeedb8 0x1fdb95000 + 3513784
4 AGXMetal13_3 0x1fdeee9b4 0x1fdb95000 + 3512756
5 IOGPU 0x1cab9ea38 -[IOGPUMetalTexture replaceRegion:mipmapLevel:withBytes:bytesPerRow:] + 56
6 UTM 0x1051e0bb4 0x104e74000 + 3591092
7 UTM 0x1051e0894 0x104e74000 + 3590292
8 UTM 0x1051e013c 0x104e74000 + 3588412
9 gobject-2.0.0 0x105d33594 g_cclosure_marshal_VOID__PARAM + 248
10 gobject-2.0.0 0x105d2d9f4 g_closure_invoke + 640
11 gobject-2.0.0 0x105d4d680 signal_emit_unlocked_R + 1480
12 gobject-2.0.0 0x105d4ea78 g_signal_emit_valist + 3516
13 gobject-2.0.0 0x105d4f094 g_signal_emit + 56
14 gobject-2.0.0 0x105d3cd9c g_object_dispatch_properties_changed + 124
15 gobject-2.0.0 0x105d36ca0 g_object_notify_by_spec_internal + 132
16 gobject-2.0.0 0x105d36c00 g_object_notify + 320
17 spice-client-glib-2.0.8 0x106b848cc notify_main_context + 44
18 glib-2.0.0 0x1071862f0 g_idle_dispatch + 80
19 glib-2.0.0 0x10718ba84 g_main_dispatch + 464
20 glib-2.0.0 0x10718b89c g_main_context_dispatch + 56
21 glib-2.0.0 0x10718be20 g_main_context_iterate + 464
22 glib-2.0.0 0x10718c3e8 g_main_loop_run + 700
23 UTM 0x1051e1fd8 0x104e74000 + 3596248
24 libsystem_pthread.dylib 0x1af3de06c _pthread_start + 148
25 libsystem_pthread.dylib 0x1af3d8e2c thread_start + 8
Thread 4:: org.libusb.device-hotplug
0 libsystem_kernel.dylib 0x1af39edf0 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1af3b08d8 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x1af3a7638 mach_msg_overwrite + 540
3 libsystem_kernel.dylib 0x1af39f16c mach_msg + 24
4 CoreFoundation 0x1af4bdbdc __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x1af4bc4c8 __CFRunLoopRun + 1232
6 CoreFoundation 0x1af4bb8a4 CFRunLoopRunSpecific + 612
7 CoreFoundation 0x1af542818 CFRunLoopRun + 64
8 usb-1.0.0 0x105671ee8 darwin_event_thread_main + 660
9 libsystem_pthread.dylib 0x1af3de06c _pthread_start + 148
10 libsystem_pthread.dylib 0x1af3d8e2c thread_start + 8
Thread 5:: usb_ev_thread
0 libsystem_kernel.dylib 0x1af3a7334 poll + 8
1 usb-1.0.0 0x10566f7f0 usbi_wait_for_events + 128
2 usb-1.0.0 0x10566d498 handle_events + 356
3 usb-1.0.0 0x10566d0f0 libusb_handle_events_timeout_completed + 244
4 usb-1.0.0 0x10566d5f0 libusb_handle_events + 44
5 spice-client-glib-2.0.8 0x106b90068 handle_libusb_events + 156
6 glib-2.0.0 0x1071c8094 g_thread_proxy + 176
7 libsystem_pthread.dylib 0x1af3de06c _pthread_start + 148
8 libsystem_pthread.dylib 0x1af3d8e2c thread_start + 8
Thread 6:: pool-spawner
0 libsystem_kernel.dylib 0x1af3a25e4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1af3de638 _pthread_cond_wait + 1232
2 glib-2.0.0 0x107204294 g_cond_wait + 52
3 glib-2.0.0 0x10713f95c g_async_queue_pop_intern_unlocked + 128
4 glib-2.0.0 0x10713fa74 g_async_queue_pop_unlocked + 92
5 glib-2.0.0 0x1071c88b8 g_thread_pool_spawn_thread + 128
6 glib-2.0.0 0x1071c8094 g_thread_proxy + 176
7 libsystem_pthread.dylib 0x1af3de06c _pthread_start + 148
8 libsystem_pthread.dylib 0x1af3d8e2c thread_start + 8
Thread 7:: gmain
0 libsystem_kernel.dylib 0x1af3a7334 poll + 8
1 glib-2.0.0 0x1071a1b78 g_poll + 40
2 glib-2.0.0 0x10718e604 g_main_context_poll + 104
3 glib-2.0.0 0x10718bdf4 g_main_context_iterate + 420
4 glib-2.0.0 0x10718beac g_main_context_iteration + 92
5 glib-2.0.0 0x10718de4c glib_worker_main + 36
6 glib-2.0.0 0x1071c8094 g_thread_proxy + 176
7 libsystem_pthread.dylib 0x1af3de06c _pthread_start + 148
8 libsystem_pthread.dylib 0x1af3d8e2c thread_start + 8
Thread 8:: caulk.messenger.shared:17
0 libsystem_kernel.dylib 0x1af39ed6c semaphore_wait_trap + 8
1 caulk 0x1b8856cfc caulk::mach::semaphore::wait_or_error() + 28
2 caulk 0x1b8839634 caulk::concurrent::details::worker_thread::run() + 56
3 caulk 0x1b8839278 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 96
4 libsystem_pthread.dylib 0x1af3de06c _pthread_start + 148
5 libsystem_pthread.dylib 0x1af3d8e2c thread_start + 8
Thread 9:
0 libsystem_pthread.dylib 0x1af3d8e18 start_wqthread + 0
Thread 10 Crashed:: Dispatch queue: com.Metal.CompletionQueueDispatch
0 libobjc.A.dylib 0x1af070278 objc_release + 16
1 Metal 0x1b8774654 MTLResourceListChunkFreeEntries(MTLResourceListChunk*) + 64
2 Metal 0x1b868a354 -[MTLResourceList releaseAllObjectsAndReset] + 72
3 IOGPU 0x1cab8f5a4 IOGPUMetalCommandBufferStorageReset + 36
4 IOGPU 0x1cab8f4d8 IOGPUMetalCommandBufferStorageDealloc + 92
5 IOGPU 0x1cab8dd28 -[IOGPUMetalCommandBuffer didCompleteWithStartTime:endTime:error:] + 240
6 Metal 0x1b8689d68 -[_MTLCommandQueue commandBufferDidComplete:startTime:completionTime:error:] + 108
7 IOGPU 0x1cab8eff4 __62-[IOGPUMetalCommandBuffer fillCommandBufferArgs:commandQueue:]_block_invoke.44 + 144
8 IOGPU 0x1cab97378 IOGPUNotificationQueueDispatchAvailableCompletionNotifications + 128
9 IOGPU 0x1cab97484 __IOGPUNotificationQueueSetDispatchQueue_block_invoke + 64
10 libdispatch.dylib 0x1af2575c4 _dispatch_client_callout4 + 20
11 libdispatch.dylib 0x1af273fe8 _dispatch_mach_msg_invoke + 468
12 libdispatch.dylib 0x1af25ea94 _dispatch_lane_serial_drain + 376
13 libdispatch.dylib 0x1af274d04 _dispatch_mach_invoke + 448
14 libdispatch.dylib 0x1af25ea94 _dispatch_lane_serial_drain + 376
15 libdispatch.dylib 0x1af25f73c _dispatch_lane_invoke + 436
16 libdispatch.dylib 0x1af25ea94 _dispatch_lane_serial_drain + 376
17 libdispatch.dylib 0x1af25f708 _dispatch_lane_invoke + 384
18 libdispatch.dylib 0x1af26a34c _dispatch_workloop_worker_thread + 652
19 libsystem_pthread.dylib 0x1af3da100 _pthread_wqthread + 288
20 libsystem_pthread.dylib 0x1af3d8e20 start_wqthread + 8
Thread 11:
0 libsystem_pthread.dylib 0x1af3d8e18 start_wqthread + 0
Thread 12:
0 libsystem_pthread.dylib 0x1af3d8e18 start_wqthread + 0
Thread 10 crashed with ARM Thread State (64-bit):
x0: 0x0000000157653bc0 x1: 0x020000020b934e91 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000000000000000 x5: 0x0000000000000003 x6: 0x0000000004210123 x7: 0x0000000000000001
x8: 0x00000001579cc218 x9: 0x00000001579cc2d8 x10: 0x00006003f400afe0 x11: 0x0000000000000001
x12: 0x0000000000000000 x13: 0x0000600000b1cbd0 x14: 0x010000020b03f2d9 x15: 0x000000020b03f2d8
x16: 0x0000000000000000 x17: 0x000000020f93f358 x18: 0x0000000000000000 x19: 0x0000000138500028
x20: 0x0000000000000018 x21: 0x0000000000000003 x22: 0x00001794e63b576b x23: 0x0000000157a68000
x24: 0x0000000157a68000 x25: 0x000000016b2430e0 x26: 0x000000016b242690 x27: 0x0000600001014f68
x28: 0x0000600003f6c240 fp: 0x000000016b2423d0 lr: 0x00000001b8774654
sp: 0x000000016b2423b0 pc: 0x00000001af070278 cpsr: 0x00001000
far: 0x0000000000000020 esr: 0x92000006 (Data Abort) byte read Translation fault
Binary Images:
0x1af39e000 - 0x1af3d6ffb libsystem_kernel.dylib (*) <6d6644d3-3db3-34c4-b1e3-c675ec5360f0> /usr/lib/system/libsystem_kernel.dylib
0x1af43c000 - 0x1af913fff com.apple.CoreFoundation (6.9) <f4ff83fc-e62c-30b4-b3a9-876c8a1fd595> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x1b8afd000 - 0x1b8e30fff com.apple.HIToolbox (2.1.1) <02b9797f-c47d-30b7-b7b0-802d0d26f31c> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x1b26db000 - 0x1b35e2fff com.apple.AppKit (6.9) <af9f6891-70ad-3c26-af08-b747344892d2> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x1d5da7000 - 0x1d7616fff com.apple.SwiftUI (4.1.17.407) <39c2a5bc-812b-3639-adac-bf6c30ffca96> /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI
0x104e74000 - 0x1054a3fff com.utmapp.UTM (4.0.9) <edca7c4b-3c5b-341a-afb6-059b66c58f66> /Applications/UTM.app/Contents/MacOS/UTM
0x1af0ae000 - 0x1af1384af dyld (*) <1f56ab4e-f398-3a9c-bfba-fbbd17808963> /usr/lib/dyld
0x1af3d7000 - 0x1af3e3ffb libsystem_pthread.dylib (*) <886caca0-5762-3640-8db2-3fa3b911c062> /usr/lib/system/libsystem_pthread.dylib
0x1b72ae000 - 0x1b730ffff com.apple.CoreVideo (1.8) <fb6c73bd-5e1f-3e88-b952-caaaed8960c9> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x1fdb95000 - 0x1fe168fff com.apple.AGXMetal13-3 (227.2.40) <1a5bba4b-a85a-3356-8fb7-da5c3d8e0113> /System/Library/Extensions/AGXMetal13_3.bundle/Contents/MacOS/AGXMetal13_3
0x1cab8b000 - 0x1cabc3fff com.apple.IOGPU (65.0.22) <0d46c99a-45fb-3932-80fc-5b072b30d43c> /System/Library/PrivateFrameworks/IOGPU.framework/Versions/A/IOGPU
0x105d20000 - 0x105d6ffff com.utmapp.gobject-2.0.0 (1.0) <2345c319-b9b4-3d28-94a9-8df5ff8542d9> /Applications/UTM.app/Contents/Frameworks/gobject-2.0.0.framework/Versions/A/gobject-2.0.0
0x106b30000 - 0x106c83fff com.utmapp.spice-client-glib-2.0.8 (1.0) <6f1d45bc-93be-3a0d-8324-53e808bd2ee2> /Applications/UTM.app/Contents/Frameworks/spice-client-glib-2.0.8.framework/Versions/A/spice-client-glib-2.0.8
0x107134000 - 0x1072c3fff com.utmapp.glib-2.0.0 (1.0) <e3aa8006-121b-3d00-88aa-102d8ad83110> /Applications/UTM.app/Contents/Frameworks/glib-2.0.0.framework/Versions/A/glib-2.0.0
0x105660000 - 0x10567bfff com.utmapp.usb-1.0.0 (1.0) <806ce50c-4c0c-3092-b64a-dc47aa3f2897> /Applications/UTM.app/Contents/Frameworks/usb-1.0.0.framework/Versions/A/usb-1.0.0
0x1b8837000 - 0x1b8860fff com.apple.audio.caulk (1.0) <445d1341-52c5-3468-ba85-f01410317744> /System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk
0x1af068000 - 0x1af0add9f libobjc.A.dylib (*) <e20fe24e-bbda-3944-9cfc-8e43a463400b> /usr/lib/libobjc.A.dylib
0x1b866b000 - 0x1b8836fff com.apple.Metal (306.2.4) <1aff9909-e8a3-32d2-9b31-1a894680f867> /System/Library/Frameworks/Metal.framework/Versions/A/Metal
0x1af253000 - 0x1af29afff libdispatch.dylib (*) <40c9c98c-00d6-3e8e-9ad3-2ed6cf0d0cfe> /usr/lib/system/libdispatch.dylib
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
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: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=1.4G resident=0K(0%) swapped_out_or_unallocated=1.4G(100%)
Writable regions: Total=1.8G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.8G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 128K 1
Activity Tracing 256K 1
CG backing stores 2176K 4
CG image 1536K 14
CG raster data 864K 7
ColorSync 592K 27
CoreAnimation 4736K 105
CoreGraphics 32K 2
CoreUI image data 2448K 20
Foundation 48K 2
Image IO 4880K 11
Kernel Alloc Once 32K 1
MALLOC 377.3M 100
MALLOC guard page 192K 10
MALLOC_MEDIUM (reserved) 952.0M 8 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 56.2M 13
Stack 14.4M 13
VM_ALLOCATE 147.2M 24
__AUTH 2222K 386
__AUTH_CONST 25.9M 623
__CTF 756 1
__DATA 14.6M 658
__DATA_CONST 29.4M 667
__DATA_DIRTY 2034K 233
__FONT_DATA 2352 1
__LINKEDIT 767.7M 44
__OBJC_CONST 4674K 346
__OBJC_RO 65.1M 1
__OBJC_RW 1981K 1
__TEXT 649.8M 691
dyld private memory 256K 1
mapped file 193.4M 45
shared memory 3008K 23
=========== ======= =======
TOTAL 3.6G 4085
TOTAL, minus reserved VM space 2.3G 4085
i think this happened after wakeup. the VM does heavy network io, maybe this is related.
crash.zip
unfortunately this corrupted the disk on the host, which qemu can now no longer read (block io error)