UTM icon indicating copy to clipboard operation
UTM copied to clipboard

macOS host crashes and reboots when launching Windows ARM VM.

Open ghost opened this issue 11 months ago • 33 comments

Describe the issue
macOS host occasionally crashes, the screen flickers purple and then a reboot of my entire device occurs when launching a Windows VM (24H2). The issue is not always reproducible. Will attach a debug log when the issue occurs again but I have a crash log. Maybe related to the latest fix regarding the GPU driver for Windows 24H2.

Configuration

  • UTM Version: 4.6.4
  • macOS Version: 15.2
  • Mac Chip (Intel, M1, ...): M2

Crash log
QEMULauncher.txt

ghost avatar Dec 23 '24 20:12 ghost

macOS didn't crash this time around but this error happened when I tried to launch a Windows VM:

QEMU error: QEMU exited from an error: Assertion failed: (isv), function hvf_vcpu_exec, file hvf.c, line 2065.

debug.log

ghost avatar Dec 23 '24 21:12 ghost

Can you attach your config.plist?

osy avatar Dec 23 '24 22:12 osy

config.txt

ghost avatar Dec 23 '24 22:12 ghost

The same to me. The image I am using is Windows 11 ARM64 .iso

ghostplant avatar Dec 28 '24 13:12 ghostplant

I've observed this as well (OS X 15.2, M2 Max) - Darwin 24.2.0 kernel panics and reboots. It seems to be related to the update to arm64-Windows 11 24H2.

drweasel avatar Dec 28 '24 18:12 drweasel

I prefer using Win10 22H2 Arm64, may I know if someone successfully installed that one?

ghostplant avatar Dec 29 '24 00:12 ghostplant

I've observed this as well (OS X 15.2, M2 Max) - Darwin 24.2.0 kernel panics and reboots. It seems to be related to the update to arm64-Windows 11 24H2.

Also on 15.2 and M2 Max and having the same issue as you with the new 24H2 ISO.

Would you be able to show your kernel panic logs? Just curious because when I looked up mine, I saw stuff about hardware issues. (Multi-hit Error on L1-iTLB-MainArray)

However, I wasn't able to trigger any instability with stress tests nor have I experienced any issues (other than this) with months of daily use, so I'm confused.

Edit: using the latest ISO from CrystalFetch instead of MS website results in QEMULauncher process crash instead of whole system kernel panic

brucekapp avatar Dec 29 '24 08:12 brucekapp

I've observed this as well (OS X 15.2, M2 Max) - Darwin 24.2.0 kernel panics and reboots. It seems to be related to the update to arm64-Windows 11 24H2.

Also on 15.2 and M2 Max and having the same issue as you with the new 24H2 ISO.

Would you be able to show your kernel panic logs? Just curious because when I looked up mine, I saw stuff about hardware issues. (Multi-hit Error on L1-iTLB-MainArray)

sure (it contains the same "Multi-hit Error ..."): panic-full-2024-12-24-132008.0002.panic.gz

drweasel avatar Dec 30 '24 11:12 drweasel

I got the same error message, but was able to resolve this by going into System and manually changing the core count from Default to 4 on an M1 Mac.

dyl421421 avatar Dec 31 '24 14:12 dyl421421

seeing this as well on M2, 13.4 host with Win 11.

kylematoba avatar Jan 05 '25 09:01 kylematoba

I get this exact error when trying to run NetBSD aarch64 (evbarm64) under virtualization on an M2 MacOS 15.2 with UTM 4.6.4 (107) so this is not limited to just Windows. For what it is worth this same VM works on the previous release of UTM.

QEMU error: QEMU exited from an error: Assertion failed: (isv), function hvf_vcpu_exec, file hvf.c, line 2065.

I already have my CPU count set manually to 4 so the fix above does not resolve for me. Changing the CPU type from "Default" to something like Cortex-a53 does not resolve the issue either.

turnipsoup avatar Jan 08 '25 03:01 turnipsoup

~~It may not (very) related to the version of Windows.~~ or maybe it is... UTM v4.5.4, which is the latest version BEFORE QEMU built in UTM got updated to version 9.1.0, works fine with same Windows 11 24H2 (build 26120) ARM64 ISO image and configurations that causes QEMU error: QEMU exited from an error: Assertion failed: (isv), function hvf_vcpu_exec, file hvf.c, line 2065. crash on UTM v4.6.4.

somnisomni avatar Jan 31 '25 12:01 somnisomni

Same problem on M3 Macbook Pro OS15.3 UTM4.6.4 QEMU error: QEMU exited from an error: Assertion failed: (isv), function hvf_vcpu_exec, file hvf.c, line 2065. Using Win11_24H2_English_Arm64.iso

Problem fixed by using CrystalFetch to get alternative .iso 26100.2033.241004-2336.ge_release_svc_refresh_CLIENTCONSUMER_RET_A64FRE_en-gb.iso

brassinc avatar Feb 06 '25 17:02 brassinc

For those experiencing this issue, can you try changing the VM Display settings and changing the Emulated Display Card from virtio-ramfb-gl to "ram framebuffer standalone device (ramfb)"? Let me know if you still get this issue.

osy avatar Feb 06 '25 18:02 osy

For those experiencing this issue, can you try changing the VM Display settings and changing the Emulated Display Card from virtio-ramfb-gl to "ram framebuffer standalone device (ramfb)"? Let me know if you still get this issue.

Seems to work fine

thcasssio avatar Feb 06 '25 19:02 thcasssio

When it crashes with virtio-ramfb-gl, do you ever see the UTM logo when starting the VM? Or is it a black screen?

osy avatar Feb 06 '25 19:02 osy

It now keeps spinning on boot, spoke too soon.

thcasssio avatar Feb 06 '25 19:02 thcasssio

@thcasssio @brassinc @somnisomni @kylematoba @dyl421421 ~~Can you test https://github.com/utmapp/UTM/actions/runs/13449913064/artifacts/2628266613 which will give a much better error message? Please post the message.~~ Outdated. See https://github.com/utmapp/UTM/issues/6919#issuecomment-2674927080

osy avatar Feb 18 '25 00:02 osy

For those experiencing this issue, can you try changing the VM Display settings and changing the Emulated Display Card from virtio-ramfb-gl to "ram framebuffer standalone device (ramfb)"? Let me know if you still get this issue.

this helped to get through that issue, however, after the windows was installed there was a window to install UTM tools (inside windows 11 UI). After that's done it prompted for reboot. Reboot resulted in infinite spinner

Image

dmitry-stepanenko avatar Feb 20 '25 12:02 dmitry-stepanenko

@dmitry-stepanenko please use https://github.com/utmapp/UTM/actions/runs/13449913064/artifacts/2628266613 along with virtio-ramfb-gl for detailed error information and paste it here

osy avatar Feb 20 '25 15:02 osy

Hi @osy,

I've tried your build with virtio-ramfb-gl two times with the same result. Installation in window mode does not work - I see flickering (installer tries to open several windows), then a black screen with the message: Display output is not active

Installation in fullscreen works better. At the first reboot during installation I'm getting the the following error message:

qemu-aarch64-softmmu: Failed to handle EC_DATAABORT. ISV=0 with PC=0x12a9a5310: 0x6F9A6830. Please report this bug.

In addition, QEMULauncher crashes: QEMULauncher_crash.txt

After resetting the VM the installation continues and finishes. Then, the Spice guest tools are installed. At the very end of this installation Mac OS panics and reboots.

drweasel avatar Feb 20 '25 20:02 drweasel

I made a special build that can work around this issue but is extremely slow. I want people who experience this issue to use this build and enable a special log which will record all instruction that would have crashed and attempt to emulate it. The fact that it tries to emulate every possible instruction makes it quite slow. If I can get a trace of which instructions are causing the crash, I can release a fix which will only emulate those instructions.

How to generate detailed logging for this issue

  1. Download and install https://github.com/utmapp/UTM/actions/runs/13459411353/artifacts/2631117697
  2. Open the settings for the VM experiencing this issue
  3. In QEMU settings, Enable Debug Logging: Image
  4. In Argument settings, add two new arguments: -d and in_asm: Image
  5. Launch the VM and run it until it crashes or until after the point it usually crashes.
  6. Back in QEMU settings, click Export Debug Log and upload it here.

osy avatar Feb 21 '25 15:02 osy

For me I notice most of my issues during (re)booting of a Windows 11 24H2 guest on a macOS host. Where it hangs during reboot.

Using the debug build from: https://github.com/utmapp/UTM/actions/runs/13459411353/artifacts/2631117697

Here your debug build of UTM hung at the "Start boot option" screen directly after a Windows reboot.

qemu-issue-6919-debug-2.log

Here only on the second reboot of the Windows VM it hung:

qemu-issue-6919-debug-3.log

At none of these I saw the hvf.c error popup, nor did macOS itself crash with the purple flash on the screen. So it might be another issue entirely.

Once it hanged, I used the on/off button of the VM to turn it off, so I could get a debug log export.

Edit: I don't really see anything that looks like assembly for whatever 'TB' is (Table Buffer?). So not sure what the -d in_asm is supposed to accomplish. Also the VM wasn't particularly slow.

HenkPoley avatar Feb 22 '25 05:02 HenkPoley

@HenkPoley before downloading the new build did you see a crash with the error message "QEMU exited from an error: Assertion failed: (isv), function hvf_vcpu_exec, file hvf.c, line 2065."?

In the log you should see entries like

----------------
IN: 
0xffffc000003c7ed8:  
OBJD-T: 734400b8

osy avatar Feb 22 '25 06:02 osy

Hi @osy,

I've tried your most recent build.

(1) I had to reboot ~5 times to get around this "Display output is not active" issue (switching fullscreen didn't work reliably - this worked before)

(2) Windows 11 Home installation worked fine! Also the installation of guest tools: qemu-issue-6919-installed-debug.log

(3) Windows offered me an update to 24H2 - installation of the update worked - the reboot then caused Mac OS X host to panic and to reboot: qemu-issue-6919-update-panic-debug.log

drweasel avatar Feb 22 '25 19:02 drweasel

Great, your second log captured these instructions:

----------------
IN: 
0xfffff802bea0e5c4:  
OBJD-T: 000400ad

----------------
IN: 
0xfffff802bea0e5c8:  
OBJD-T: 041401ad

----------------
IN: 
0xfffff802bea0e5cc:  
OBJD-T: a20c3fad

I still don't know why there is a panic though. I wonder if this is a macos issue. Can you confirm that previous version of UTM doesn't cause a panic?

osy avatar Feb 23 '25 00:02 osy

Any chance you can try on the latest macOS 15.4 beta to see if the panic is still an issue?

osy avatar Feb 23 '25 01:02 osy

I get this exact error when trying to run NetBSD aarch64 (evbarm64) under virtualization on an M2 MacOS 15.2 with UTM 4.6.4 (107) so this is not limited to just Windows. For what it is worth this same VM works on the previous release of UTM.

I experience the same, and have some more details on this particular case of the problem: M1 Ultra, Sequoia 15.3.1 I tried:

  • UTM 4.5.4: works fine
Image
  • UTM 4.6.0, 4.6.1, 4.6.2, 4.6.3: "Display output is not active"
Image
  • UTM 4.6.4: Error: QEMU error: QEMU exited from an error: Assertion failed: (isv) function hvf_vcpu_exec, file hvf.c, line 2065 and a separate popup "QEMULauncher quit unexpectedly"
Image

WIth the debug build, I get to "Display output is not active" (like in the other 4.6.x) which is better than a crash, but still worse than 4.5.4. Here's the debug log.

debug.zip

Here are the instructions for setting up the NetBSD VM, in case you want to try it locally. I'm told that the qemu script referenced at the bottom still works, but that has quite a different list of qemu options than UTM uses.

0-wiz-0 avatar Mar 03 '25 11:03 0-wiz-0

If it's of any help, first time I installed a VM it worked and I got a windows working. After I deleted the VM to build a new one, tried several times and that issue reoccured every time.

yanshay avatar Mar 04 '25 12:03 yanshay

In my setup (UTM 4.6.4 107, M2 Pro mac mini, macOS Sequoia 15.3.1, Windows 11 24H2 26100.3194), the panic appears to be triggered by the shared folder functionality:

  • shared folders disabled: the VM works just fine, it can boot, access the network, reboot itself and so on, no macOS panic observed
  • shared folders enabled: everything works until the guest tools are installed, after that UEFI inside the VM locks up on every boot due to an I/O timeout error, then either qemu crashes or macOS itself panics somewhere with the crashing address located within the com.apple.autofs kext

IMVHO this smells like a macOS issue that is triggered by recent UTM builds.

rfc1459 avatar Mar 09 '25 09:03 rfc1459