Re: Panic under load when ran under QEMU
Andrius V <[email protected]> Sat, 27 Jun 2026 05:57:30 +0000
| Newsgroups | gmane.os.netbsd.current |
|---|---|
| Message-ID | <CAFO4NkokTXxV7LtHHe4is00TQvaLVBankxaX3p_nzwcP_W5Lgw@mail.gmail.com> |
On Fri, Jun 26, 2026 at 1:47=E2=80=AFPM ci4ic4 <[email protected]> wrote: > > > 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 ZF= S pools backed by fast NVME disks. Anyway, I passed the panic traces to Cla= ude 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=3D1` on QEMU, completion interrupts f= lood 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 ment= ions. Block device features at boot show no `EVENT_IDX`; net device shows i= t. > > **Workaround:** switch virtio-blk to virtio-scsi (`vioscsi` driver unaffe= cted). > > **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 50= 8/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 vir= tio-scsi and I no longer have the issue. > > Chavdar > > > > Sent with Proton Mail secure email. > > Hi, I think you should file PR nevertheless, since the bug is likely real (I think they were some recent fixes on ld_virtio relatively recently, but likely this is a different bug). NetBSD project doesn't allow LLM generated code, but you can provide backtrace (if you still have it), describe an issue, and even this analysis I suppose (with the clear note that it was AI analysed), I think it was some discussion about using LLM in mailing lists recently, where policy will be just to clearly state that this text is AI output. Don't submit actual code or patches. Regards, Andrius V