Panic under load when ran under QEMU
ci4ic4 <[email protected]> Fri, 26 Jun 2026 13:46:58 +0000
| Newsgroups | gmane.os.netbsd.current |
|---|---|
| Message-ID | <PylC9gd48vFujw5QebzOItqmSd-c1HMBzPFkpAry8me80pdBJRhzarDxIWg79nxh4fdSlgtfrEOoecxNrnL5tHOWWwC8AsKrTKGXcLKBBxk=@proton.me> |
One of my NetBSD nodes started having panics under load - when running a fu= ll bob build - recently. It is a VM on a ProxMox server, all updated and se= tup somewhat non-standard - stuff accumulated over the years and perhaps no= t following the best in practice advice; the virtual disks live on two ZFS = pools backed by fast NVME disks. Anyway, I passed the panic traces to Claud= e Code, which found a very plausible issue as follows: ---- Confirmed fixed. Summary for the NetBSD PR: **Bug:** `sys/dev/pci/ld_virtio.c` doesn't negotiate `VIRTIO_F_RING_EVENT_I= DX`. Under heavy I/O with `iothread=3D1` on QEMU, completion interrupts flo= od the handler faster than it drains the used ring =E2=86=92 livelock = =E2=86=92 watchdog panic. **Evidence:** `if_vioif.c:508` negotiates it; `ld_virtio.c` has zero mentio= ns. Block device features at boot show no `EVENT_IDX`; net device shows it. **Workaround:** switch virtio-blk to virtio-scsi (`vioscsi` driver unaffect= ed). **Fix:** add `VIRTIO_F_RING_EVENT_IDX` to `req_features` in `ld_virtio.c` += event-idx update after completion drain, mirroring `if_vioif.c` lines 508/= 2212/2381. ---- I won't be filing a PR as I understand LLM contributions are not accepted, = but perhaps somebody might be interested to confirm it. I switched to virti= o-scsi and I no longer have the issue.=20 Chavdar=20 =20 Sent with Proton Mail secure email.