Daily crash of HAOS (invalid opcode)

I have been getting almost daily crashes on a new installation using a Mini PC 11th Gen Intel N5095 with 8GB RAM (https://smile.amazon.com/dp/B09ZLDBC8X). The Home Assistant VM has to be Forced Reset in order to recover
I’m running Home Assistant OS 9.5 (core 2023.2.3) in KVM on Linux Mint 21.1 (5.15.0-58-generic)
I have tried multiple full host OS rebuild along with multiple full rebuilds of Home Assistant OS. This has been a consistent issue for the full month I’ve been trying to use HA
I’m in the process of converting my zwave and Insteon devices from my ISY994i to HA. While I’m really liking HA, the stability has me very concerned
I was able to pull the logs from HAOS. Here is a snippet of what I believe is the problem area.

Feb 08 18:46:10 homeassistant kernel: invalid opcode: 0000 [#1] SMP NOPTI
Feb 08 18:46:10 homeassistant kernel: CPU: 0 PID: 1953 Comm: coredns Not tainted 5.15.90 #1
Feb 08 18:46:10 homeassistant kernel: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
Feb 08 18:46:10 homeassistant kernel: RIP: 0010:asm_exc_invalid_op+0x0/0x20
Feb 08 18:46:10 homeassistant kernel: Code: 08 00 00 48 89 c4 48 89 e7 48 8b 74 24 78 48 c7 44 24 78 ff ff ff ff e8 ae d9 f8 ff e9 f9 09 00 00 66 0f >
Feb 08 18:46:10 homeassistant kernel: RSP: 0018:ffffb010818b3028 EFLAGS: 00010046
Feb 08 18:46:10 homeassistant kernel: RAX: 0000000000000000 RBX: ffffb010818b3d00 RCX: 00000000bdee2e3b
Feb 08 18:46:10 homeassistant kernel: RDX: 0000000000000000 RSI: 00000000281ff3a1 RDI: ffff965580839304
Feb 08 18:46:10 homeassistant kernel: RBP: ffffb010818b3cb0 R08: ffffb010818b3cb0 R09: 0000000000000000
Feb 08 18:46:10 homeassistant kernel: R10: ffffb010818b3ed8 R11: 0000000000000000 R12: 000000c000380148
Feb 08 18:46:10 homeassistant kernel: R13: 0000000000000000 R14: ffffb010818b3d38 R15: ffff96559ed22ac0
Feb 08 18:46:10 homeassistant kernel: FS:  000000c000380090(0000) GS:ffff9655bbc00000(0000) knlGS:0000000000000000
Feb 08 18:46:10 homeassistant kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Feb 08 18:46:10 homeassistant kernel: CR2: 000000c0000c7010 CR3: 000000011ef88000 CR4: 0000000000350ef0
Feb 08 18:46:10 homeassistant kernel: Call Trace:
Feb 08 18:46:10 homeassistant kernel:  <TASK>
Feb 08 18:46:10 homeassistant kernel: RIP: 0010:asm_exc_invalid_op+0x0/0x20
Feb 08 18:46:10 homeassistant kernel: Code: 08 00 00 48 89 c4 48 89 e7 48 8b 74 24 78 48 c7 44 24 78 ff ff ff ff e8 ae d9 f8 ff e9 f9 09 00 00 66 0f >

Any assistance would be greatly appreciated

I have the Z-WAVE JS UI add-on installed and running. The “Studio Code Server” and “Terminal & SSH” add-ons are installed but not running

I have the following Integrations:
Google Calendar, Google Cast, Life360, Home, Mobile App, OpenWeatherMap, Radio Browser, Roku, Sun, ISY, and Z-Wave JS

Not certain if this might resolve your issue but try to run on q35 machine emulation; you are running on i440fx (Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015)

What image did you install exactly? There is an image specifically for KVM:

Also, I suggest you check out QEMU Guest Kernel Panic | Proxmox Support Forum and the links that leads to.

I tried to install the image the other day - I run into another issue, but I noticed I could choose the processor type for QEMU. Not sure if that has an impact.

I installed the KVM image from here: Linux - Home Assistant

Ok, that’s good.

This is not really a HA issue, but an issue with the hardware and the Linux kernel.
The kernel is trying to use a function that is bugged or not available.
SMP is related to multi core processing and PTI is related to paging of memory.

This could be related to a bugfix for CPUs with known vulnerabilities, like spectre, meltdown, hertzbleed or retbleed.
The Linux version HA uses detect the CPU you have chosen to emulate and then most likely tries to deploy a software patch against this vulnerability and your hardware emulation do not like that.

I re-installed using virtualbox instead of KVM. Hopefully this will work better for me

I’ve been running for 5 days now with Virtualbox instead of KVM with no crashes. Longest I’ve gone so far. Looks like there must be some incompatibility in KVM with my hardware

It is not your physical hardware.
It is the virtual hardware that caused the problem. The Linux system tried to install a patch for a security flaw in the real physical hardware that your hypervisors tried to emulate and that patch did not work correctly on the emulation.

1 Like