Pool suspended by EINVAL read of a hole block pointer (no vdev) on partial overwrite of a small file (2.4.4)
System information
| Type | Version/Name |
|---|---|
| Distribution Name | Proxmox VE (Debian) |
| Distribution Version | PVE 9.2 / Debian 13 (trixie) |
| Kernel Version | 7.0.14-17-pve |
| Architecture | x86_64 |
| OpenZFS Version | zfs-2.4.4-pve1, zfs-kmod-2.4.4-pve1 |
Pool: 2x2 mirror of Samsung PM983 NVMe. Features: block_cloning active; zfs_bclone_enabled=1, zfs_bclone_wait_dirty=1, zfs_dio_enabled=1, failmode=wait. Workload: unprivileged LXC containers running Docker (overlayfs on a ZFS filesystem dataset), heavy small-file churn (CI runners).
Describe the problem you're observing
The pool was suspended by a failed read of a hole block pointer with zio_err=EINVAL and no vdev, on what looks like a read-modify-write of a small file created 4 seconds earlier. zpool clear re-executed the same zio, which failed again immediately, so only a reboot recovered the pool. No device errors, no NVMe resets, ECC clean; scrub after reboot found 0 errors.
The failing ereport (no vdev members at all):
class = "ereport.fs.zfs.data"
pool_failmode = "wait"
zio_err = 0x16
zio_flags = 0x1000000 [RAW_COMPRESS]
zio_stage = 0x4000000 [DONE]
zio_pipeline = 0x5f00002 [READ_BP_INIT READY VDEV_IO_START VDEV_IO_DONE VDEV_IO_ASSESS CHECKSUM_VERIFY DONE]
zio_type = 0x1 [READ]
zio_priority = 0x0 [SYNC_READ]
zio_objset = 0x4007
zio_object = 0x190840
zio_level = 0x0
zio_blkid = 0x0followed in the same millisecond by ereport.fs.zfs.io_failure and WARNING: Pool 'fast' has encountered an uncorrectable I/O failure and has been suspended. After zpool clear the same ereport repeated with zio_flags = 0x41000000 [RAW_COMPRESS REEXECUTED].
The object is a 172-byte regular file (Docker's /var/lib/docker/containers/<id>/hosts) created at 16:37:51; the suspend was at 16:37:55. zdb -ddddd on the dataset:
Object lvl iblk dblk dsize dnsize lsize %full type
1640512 1 128K 512 0 1K 512 0.00 ZFS plain file
dnode maxblkid: 0
size 172
gen 8513557
Indirect blocks:
0 L0 0:0:0 200L B=8513638txg 8513638 (the bp's birth) had synced; txg 8513639 stayed in quiesce. /proc/spl/kstat/zfs/<pool>/txgs:
8513638 ... C ...
8513639 ... Q ...Two hours earlier, on a different dataset in the same pool (another CI container), a read with the same signature but [CANFAIL RAW_COMPRESS] produced ereport.fs.zfs.data zio_err=0x16 and only failed the application. That object has since been deleted.
Reading of the 2.4.4 source (please correct me): a hole bp reaches arc_read(), which only has ASSERT(!BP_IS_HOLE(bp)). With BP_GET_NDVAS()==0 the mirror issues no child I/O; checksum verification then runs with checksum type 0 (inherit), which has no function, and zio_checksum_error_impl() returns EINVAL. Without ZIO_FLAG_CANFAIL that suspends the pool, and re-execution can never succeed. What I cannot tell is which caller handed a hole bp to arc_read() instead of dbuf_read_hole(). Possibly related: #15526, #18724, #18853.
Secondary effect, possibly worth its own issue: while suspended, writes to that pool's zvols consumed 71 of the 79 threads of the global zvol taskqs (9 taskqs, default zvol_num_taskqs/zvol_threads). zvol requests from VMs on a different, healthy pool that hashed to a full taskq then hung too, so one suspended pool degraded every zvol on the host.
Describe how to reproduce the problem
Not reproduced on demand. It happened once in production (plus the earlier CANFAIL variant) under Docker-in-LXC CI churn with block cloning enabled. Block cloning has since been disabled (zfs_bclone_enabled=0) as a precaution; I have not confirmed that it is involved.
Include any warning/errors/backtraces from the system logs
Hung-task traces show writers blocked in txg_wait_synced_flags <- dmu_tx_wait <- dmu_tx_assign <- zvol_write / zfs_write, and txg_sync running in dsl_scan_active / bpobj_space. I kept a snapshot of the affected dataset plus the full zpool events -v, dbgmsg, D-state stacks and zdb output, and can provide more (e.g. zdb of the dnode or indirect block) on request.
Source: openzfs/zfs