Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Panic under load when ran under QEMU



One of my NetBSD nodes started having panics under load - when running a full bob build - recently. It is a VM on a ProxMox server, all updated and setup somewhat non-standard - stuff accumulated over the years and perhaps not 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 Claude 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_IDX`. Under heavy I/O with `iothread=1` on QEMU, completion interrupts flood the handler faster than it drains the used ring → livelock → watchdog panic.

**Evidence:** `if_vioif.c:508` negotiates it; `ld_virtio.c` has zero mentions. Block device features at boot show no `EVENT_IDX`; net device shows it.

**Workaround:** switch virtio-blk to virtio-scsi (`vioscsi` driver unaffected).

**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 virtio-scsi and I no longer have the issue. 

Chavdar 
 


Sent with Proton Mail secure email.




Home | Main Index | Thread Index | Old Index