Environment
Ubuntu 22.04 LTS, kernel 5.15.0-72, KVM guest and bare-metal servers using Samsung PM983 NVMe SSDs, application uses io_uring with direct I/O (O_DIRECT) and frequent fsync calls from many threads.
Symptoms
Host kernel logs show stack traces referencing io_uring, blk-mq and nvme: 'BUG: unable to handle kernel NULL pointer dereference', followed by I/O timeouts, io_uring operations failing with -EIO. System may panic under sustained workload or hang requiring power-cycle.
Observations
dmesg shows nvme timeout messages followed by io_uring submission queue stack trace. When io_uring usage is disabled (fall back to preadv/pwrite) or direct IO removed, panics stop. SSD firmware current per vendor tool; SMART shows no media errors. reproducer using fio with io_uring/direct=1 + fsync reproduces kernel oops within minutes.
Already attempted
Upgraded kernel minor revision, installed latest nvme-cli firmware check (no update available), reduced queue depth and threads, disabled io_uring in application: problem disappears. Captured vmcore and oops logs; opened kernel bug report with trace.
Question
Is this likely a kernel io_uring / NVMe driver bug, SSD firmware issue, or application misuse of io_uring direct-IO? How to safely run high-fsync workloads without kernel panics until a permanent fix is available?
Verified community troubleshooting
The quickest safe mitigation is to stop using io_uring with O_DIRECT for that workload: switch the app to buffered I/O or POSIX AIO and reduce parallel fsyncs. That stops the kernel oopses while you gather evidence. Then gather dmesg/oops logs and a minimal fio reproducer (io_uring, direct=1, fsync) and test on a newer mainline kernel—many io_uring fixes landed after 5.15. If the reproducer still crashes, open a kernel bug with traces and vendor firmware logs. To verify fix, rerun the reproducer on an upgraded kernel; rollback by restarting the service using the prior I/O path.
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags