utmapp / utmapp/UTM

VMs stuck at "stopping", even when --kill is used

Open
#6,882 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
35.5k
Forks
1.8k
Avg merge
5d 5h
Merged PRs (30d)
7

Description

Since the new UTM version (not sure which one, stopping of VMs seems to have become unreliable)

Command:

```sh
utmctl stop --kill
```

We're using UTM together with gitlab-runner in a custom executor (we will open-source that eventually. It's just a couple files). Before the latest update of UTM, we didn't encounter any issues. Now it seems to get stuck at stopping VMs (macOS guest)

![image](https://github.com/user-attachments/assets/9cdb56fb-3765-4828-bd68-4a2ab58da454)
![Screenshot 2024-12-06 at 14 55 57](https://github.com/user-attachments/assets/9bd93c96-ea59-4d67-bad9-b75bb8d3129f)

Stopping from the UI also does not work:

![image](https://github.com/user-attachments/assets/f0a84445-6bf7-4621-a9dd-1fe45166cea0)

Also I saw this crash on the machine:

```sh
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process: utmctl [26169]
Path: /Applications/UTM.app/Contents/MacOS/utmctl
Identifier: utmctl
Version: 4.6.3 (1)
Code Type: ARM-64 (Native)
Parent Process: Exited process [26168]
User ID: 0

Date/Time: 2024-12-05 22:55:18.3404 +0100
OS Version: macOS 15.1.1 (24B91)
Report Version: 12
Anonymous UUID: 6E7909AC-0630-A7E1-9F29-3BD1B73236EF

Time Awake Since Boot: 110000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: utmctl [26169]

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x181bca600 __pthread_kill + 8
1 libsystem_pthread.dylib 0x181c02f70 pthread_kill + 288
2 libsystem_c.dylib 0x181b0f908 abort + 128
3 libc++abi.dylib 0x181bb944c abort_message + 132
4 libc++abi.dylib 0x181ba7a40 demangling_terminate_handler() + 348
5 libobjc.A.dylib 0x18184d3e4 _objc_terminate() + 156
6 libc++abi.dylib 0x181bb8710 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x181bbbcdc __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 88
8 libc++abi.dylib 0x181bbbc84 __cxa_throw + 92
9 libobjc.A.dylib 0x181842e40 objc_exception_throw + 448
10 CoreFoundation 0x181e11638 -[NSObject(NSObject) doesNotRecognizeSelector:] + 364
11 ScriptingBridge 0x1caca4030 -[SBObject forwardInvocation:] + 116
12 CoreFoundation 0x181cc8a64 ___forwarding___ + 964
13 CoreFoundation 0x181cc85e0 _CF_forwarding_prep_0 + 96
14 utmctl 0x100fff4f0 0x100ffc000 + 13552
15 utmctl 0x1010014d8 0x100ffc000 + 21720
16 utmctl 0x101008044 0x100ffc000 + 49220
17 dyld 0x181880274 start + 2840

Thread 1:
0 libsystem_pthread.dylib 0x181bfe0e8 start_wqthread + 0

Thread 2:
0 libsystem_pthread.dylib 0x181bfe0e8 start_wqthread + 0

Thread 3:
0 libsystem_pthread.dylib 0x181bfe0e8 start_wqthread + 0

Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000000181bbde1b x5: 0x000000016ee02270 x6: 0x000000000000006e x7: 0x0000000000000000
x8: 0x2cb5e0818ae5e3fc x9: 0x2cb5e0806c349bbc x10: 0x0000000000000051 x11: 0x000000000000000b
x12: 0x000000000000000b x13: 0x00000001820c7e9a x14: 0x00000000001ff800 x15: 0x00000000000007fb
x16: 0x0000000000000148 x17: 0x00000001eef75850 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000000103 x21: 0x00000001e6d17920 x22: 0x00000001e4be4000 x23: 0x0000000000000001
x24: 0x0000000000000001 x25: 0x0000000000000068 x26: 0x000000016ee03350 x27: 0x0000000000000000
x28: 0x0000000000000000 fp: 0x000000016ee021e0 lr: 0x0000000181c02f70
sp: 0x000000016ee021c0 pc: 0x0000000181bca600 cpsr: 0x40001000
far: 0x0000000000000000 esr: 0x56000080 Address size fault

Binary Images:
0x100ffc000 - 0x10109ffff utmctl (*) /Applications/UTM.app/Contents/MacOS/utmctl
0x181bc1000 - 0x181bfbff7 libsystem_kernel.dylib (*) <9fea25a4-e8ca-3f3d-901c-a53ff2bc7217> /usr/lib/system/libsystem_kernel.dylib
0x181bfc000 - 0x181c08fff libsystem_pthread.dylib (*) <3b8268be-4e02-3b4a-8b41-baed2bbaacff> /usr/lib/system/libsystem_pthread.dylib
0x181a96000 - 0x181b17ffb libsystem_c.dylib (*) <96556ba0-9c34-326a-89f4-d3835de617ae> /usr/lib/system/libsystem_c.dylib
0x181ba6000 - 0x181bc0fff libc++abi.dylib (*) <7de440df-bc7d-3ff3-905d-2e17a7629449> /usr/lib/libc++abi.dylib
0x181828000 - 0x181879ca3 libobjc.A.dylib (*) <219c0324-7a4f-338e-a395-3d023b289a7f> /usr/lib/libobjc.A.dylib
0x181c6c000 - 0x182160fff com.apple.CoreFoundation (6.9) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x1cac9e000 - 0x1cacb5fff com.apple.ScriptingBridge (1.4) <41379f4e-f1cc-3974-863c-9b43a004a9f2> /System/Library/Frameworks/ScriptingBridge.framework/Versions/A/ScriptingBridge
0x18187a000 - 0x1818fc7b3 dyld (*) <6beafde4-b011-3e47-8aae-4d7b6e4bb7e8> /usr/lib/dyld
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=859.8M resident=0K(0%) swapped_out_or_unallocated=859.8M(100%)
Writable regions: Total=819.6M written=337K(0%) resident=337K(0%) swapped_out=0K(0%) unallocated=819.3M(100%)

VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 1
ColorSync 16K 1
Kernel Alloc Once 32K 1
MALLOC 809.4M 34
MALLOC guard page 288K 18
STACK GUARD 56.1M 4
Stack 9808K 4
VM_ALLOCATE 16K 1
__AUTH 1079K 204
__AUTH_CONST 18.1M 356
__DATA 4472K 336
__DATA_CONST 13.0M 359
__DATA_DIRTY 692K 110
__FONT_DATA 2352 1
__LINKEDIT 584.4M 2
__OBJC_RW 2354K 1
__TEXT 275.3M 372
__TPRO_CONST 272K 2
mapped file 41.2M 7
owned unmapped memory 32K 1
page table in kernel 337K 1
shared memory 976K 12
=========== ======= =======
TOTAL 1.8G 1828

-----------
Full Report
-----------

{"app_name":"utmctl","timestamp":"2024-12-05 22:55:18.00 +0100","app_version":"4.6.3","slice_uuid":"c26ae13f-2d8c-3bea-8e82-3df288594add","build_version":"1","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 15.1.1 (24B91)","roots_installed":0,"incident_id":"531AB809-7BFB-4257-8179-94A1B255024A","name":"utmctl"}
{
"uptime" : 110000,
"procRole" : "Unspecified",
"version" : 2,
"userID" : 0,
"deployVersion" : 210,
"modelCode" : "Mac14,3",
"coalitionID" : 1809,
"osVersion" : {
"train" : "macOS 15.1.1",
"build" : "24B91",
"releaseType" : "User"
},
"captureTime" : "2024-12-05 22:55:18.3404 +0100",
"codeSigningMonitor" : 1,
"incident" : "531AB809-7BFB-4257-8179-94A1B255024A",
"pid" : 26169,
"translated" : false,
"cpuType" : "ARM-64",
"roots_installed" : 0,
"bug_type" : "309",
"procLaunch" : "2024-12-05 22:55:18.2674 +0100",
"procStartAbsTime" : 2734925366557,
"procExitAbsTime" : 2734927111061,
"procName" : "utmctl",
"procPath" : "\/Applications\/UTM.app\/Contents\/MacOS\/utmctl",
"bundleInfo" : {"CFBundleVersion":"1","CFBundleShortVersionString":"4.6.3"},
"parentProc" : "Exited process",
"parentPid" : 26168,
"coalitionName" : "com.openssh.sshd.75B7E82C-8185-426A-8B41-88D188489798",
"crashReporterKey" : "6E7909AC-0630-A7E1-9F29-3BD1B73236EF",
"responsiblePid" : 26131,
"codeSigningID" : "com.utmapp.utmctl",
"codeSigningTeamID" : "WDNLXAD4W8",
"codeSigningFlags" : 570503953,
"codeSigningValidationCategory" : 6,
"codeSigningTrustLevel" : 4294967295,
"instructionByteStream" : {"beforePC":"fyMD1f17v6n9AwCRcuD\/l78DAJH9e8Go\/w9f1sADX9YQKYDSARAA1A==","atPC":"AwEAVH8jA9X9e7+p\/QMAkWfg\/5e\/AwCR\/XvBqP8PX9bAA1\/WcAqA0g=="},
"bootSessionUUID" : "B9DBFDDB-255D-4520-B528-4C95CC3F9AE5",
"sip" : "enabled",
"exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
"termination" : {"flags":0,"code":6,"namespace":"SIGNAL","indicator":"Abort trap: 6","byProc":"utmctl","byPid":26169},
"asi" : {"libsystem_c.dylib":["abort() called"]},
"exceptionReason" : {"arguments":["SBApplication","%s","0x6000007905a0"],"format_string":"-[%s %s]: unrecognized selector sent to instance %p","name":"NSInvalidArgumentException","type":"objc-exception","composed_message":"-[SBApplication %s]: unrecognized selector sent to instance 0x6000007905a0","class":"NSException"},
"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},
"lastExceptionBacktrace" : [{"imageOffset":983796,"symbol":"__exceptionPreprocess","symbolLocation":164,"imageIndex":6},{"imageOffset":109784,"symbol":"objc_exception_throw","symbolLocation":88,"imageIndex":5},{"imageOffset":1726008,"symbol":"-[NSObject(NSObject) __retain_OA]","symbolLocation":0,"imageIndex":6},{"imageOffset":24624,"symbol":"-[SBObject forwardInvocation:]","symbolLocation":116,"imageIndex":7},{"imageOffset":379492,"symbol":"___forwarding___","symbolLocation":964,"imageIndex":6},{"imageOffset":378336,"symbol":"_CF_forwarding_prep_0","symbolLocation":96,"imageIndex":6},{"imageOffset":13552,"imageIndex":0},{"imageOffset":21720,"imageIndex":0},{"imageOffset":49220,"imageIndex":0},{"imageOffset":25204,"symbol":"start","symbolLocation":2840,"imageIndex":8}],
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":519743,"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":6471540251},{"value":6155149936},{"value":110},{"value":0},{"value":3221727955439182844},{"value":3221727950629280700},{"value":81},{"value":11},{"value":11},{"value":6476824218},{"value":2095104},{"value":2043},{"value":328},{"value":8304154704},{"value":0},{"value":6},{"value":259},{"value":8167455008,"symbolLocation":224,"symbol":"_main_thread"},{"value":8132640768,"symbolLocation":0,"symbol":"OBJC_IVAR_$_Object.isa"},{"value":1},{"value":1},{"value":104},{"value":6155154256},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6471823216},"cpsr":{"value":1073745920},"fp":{"value":6155149792},"sp":{"value":6155149760},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6471591424,"matchesCrashFrame":1},"far":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":38400,"symbol":"__pthread_kill","symbolLocation":8,"imageIndex":1},{"imageOffset":28528,"symbol":"pthread_kill","symbolLocation":288,"imageIndex":2},{"imageOffset":497928,"symbol":"abort","symbolLocation":128,"imageIndex":3},{"imageOffset":78924,"symbol":"abort_message","symbolLocation":132,"imageIndex":4},{"imageOffset":6720,"symbol":"demangling_terminate_handler()","symbolLocation":348,"imageIndex":4},{"imageOffset":152548,"symbol":"_objc_terminate()","symbolLocation":156,"imageIndex":5},{"imageOffset":75536,"symbol":"std::__terminate(void (*)())","symbolLocation":16,"imageIndex":4},{"imageOffset":89308,"symbol":"__cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*)","symbolLocation":88,"imageIndex":4},{"imageOffset":89220,"symbol":"__cxa_throw","symbolLocation":92,"imageIndex":4},{"imageOffset":110144,"symbol":"objc_exception_throw","symbolLocation":448,"imageIndex":5},{"imageOffset":1726008,"symbol":"-[NSObject(NSObject) doesNotRecognizeSelector:]","symbolLocation":364,"imageIndex":6},{"imageOffset":24624,"symbol":"-[SBObject forwardInvocation:]","symbolLocation":116,"imageIndex":7},{"imageOffset":379492,"symbol":"___forwarding___","symbolLocation":964,"imageIndex":6},{"imageOffset":378336,"symbol":"_CF_forwarding_prep_0","symbolLocation":96,"imageIndex":6},{"imageOffset":13552,"imageIndex":0},{"imageOffset":21720,"imageIndex":0},{"imageOffset":49220,"imageIndex":0},{"imageOffset":25204,"symbol":"start","symbolLocation":2840,"imageIndex":8}]},{"id":519748,"frames":[{"imageOffset":8424,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":2}],"threadState":{"x":[{"value":6155710464},{"value":4103},{"value":6155173888},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6155710464},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6471803112},"far":{"value":0}}},{"id":519749,"frames":[{"imageOffset":8424,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":2}],"threadState":{"x":[{"value":6156283904},{"value":9475},{"value":6155747328},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6156283904},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6471803112},"far":{"value":0}}},{"id":519773,"frames":[{"imageOffset":8424,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":2}],"threadState":{"x":[{"value":6156857344},{"value":0},{"value":6156320768},{"value":0},{"value":278532},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6156857344},"esr":{"value":0,"description":" Address size fault"},"pc":{"value":6471803112},"far":{"value":0}}}],
"usedImages" : [
{
"source" : "P",
"arch" : "arm64",
"base" : 4311728128,
"size" : 671744,
"uuid" : "c26ae13f-2d8c-3bea-8e82-3df288594add",
"path" : "\/Applications\/UTM.app\/Contents\/MacOS\/utmctl",
"name" : "utmctl"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6471553024,
"size" : 241656,
"uuid" : "9fea25a4-e8ca-3f3d-901c-a53ff2bc7217",
"path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
"name" : "libsystem_kernel.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6471794688,
"size" : 53248,
"uuid" : "3b8268be-4e02-3b4a-8b41-baed2bbaacff",
"path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6470328320,
"size" : 532476,
"uuid" : "96556ba0-9c34-326a-89f4-d3835de617ae",
"path" : "\/usr\/lib\/system\/libsystem_c.dylib",
"name" : "libsystem_c.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6471442432,
"size" : 110592,
"uuid" : "7de440df-bc7d-3ff3-905d-2e17a7629449",
"path" : "\/usr\/lib\/libc++abi.dylib",
"name" : "libc++abi.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6467780608,
"size" : 335012,
"uuid" : "219c0324-7a4f-338e-a395-3d023b289a7f",
"path" : "\/usr\/lib\/libobjc.A.dylib",
"name" : "libobjc.A.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6472253440,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.CoreFoundation",
"size" : 5197824,
"uuid" : "ae4610f8-7c5c-3484-858e-cae7457d206e",
"path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
"name" : "CoreFoundation",
"CFBundleVersion" : "3107"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7697195008,
"CFBundleShortVersionString" : "1.4",
"CFBundleIdentifier" : "com.apple.ScriptingBridge",
"size" : 98304,
"uuid" : "41379f4e-f1cc-3974-863c-9b43a004a9f2",
"path" : "\/System\/Library\/Frameworks\/ScriptingBridge.framework\/Versions\/A\/ScriptingBridge",
"name" : "ScriptingBridge",
"CFBundleVersion" : "87.4"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6468116480,
"size" : 534452,
"uuid" : "6beafde4-b011-3e47-8aae-4d7b6e4bb7e8",
"path" : "\/usr\/lib\/dyld",
"name" : "dyld"
},
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
}
],
"sharedCache" : {
"base" : 6467305472,
"size" : 4753735680,
"uuid" : "f66bac4e-1e78-38af-b867-c1cf5daa0302"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=859.8M resident=0K(0%) swapped_out_or_unallocated=859.8M(100%)\nWritable regions: Total=819.6M written=337K(0%) resident=337K(0%) swapped_out=0K(0%) unallocated=819.3M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nActivity Tracing 256K 1 \nColorSync 16K 1 \nKernel Alloc Once 32K 1 \nMALLOC 809.4M 34 \nMALLOC guard page 288K 18 \nSTACK GUARD 56.1M 4 \nStack 9808K 4 \nVM_ALLOCATE 16K 1 \n__AUTH 1079K 204 \n__AUTH_CONST 18.1M 356 \n__DATA 4472K 336 \n__DATA_CONST 13.0M 359 \n__DATA_DIRTY 692K 110 \n__FONT_DATA 2352 1 \n__LINKEDIT 584.4M 2 \n__OBJC_RW 2354K 1 \n__TEXT 275.3M 372 \n__TPRO_CONST 272K 2 \nmapped file 41.2M 7 \nowned unmapped memory 32K 1 \npage table in kernel 337K 1 \nshared memory 976K 12 \n=========== ======= ======= \nTOTAL 1.8G 1828 \n",
"legacyInfo" : {
"threadTriggered" : {
"queue" : "com.apple.main-thread"
}
},
"logWritingSignature" : "28c6314f29c58ff8a728103bab045f4ace56571c",
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "642da32dea3b2418c750f848",
"factorPackIds" : {
"VISUAL_INTELLIGENCE_VICTORIA" : "66d8b2f77cd4b62688efd2cf"
},
"deploymentId" : 240000004
},
{
"rolloutId" : "6246d6a916a70b047e454124",
"factorPackIds" : {

},
"deploymentId" : 240000010
}
],
"experiments" : [

]
}
}
```

Thanks for any help!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.