[Bug 253158] Panic: snapacct_ufs2: bad block - Non-suJ mksnap_ffs(8) crash

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Feb 14 09:56:54 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253158

--- Comment #34 from Konstantin Belousov <kib at FreeBSD.org> ---
(In reply to Cy Schubert from comment #33)
So everything in the dump looks fine, except in the vn_io_fault1() frame,
the short_uio offset and resid are corrupted, which ultimately causes the
panic when ffs_read() tries to actually move bytes around.

Please apply the following debugging patch, compile the same way as you did,
and provide me with the kernel.full+vmcore, again.  Thanks.

diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index f8943b3c07e7..72357d3ab2af 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1339,6 +1339,8 @@ vn_io_fault1(struct vnode *vp, struct uio *uio, struct
vn_io_fault_args *args,
                td->td_ma = ma;
                td->td_ma_cnt = cnt;

+volatile struct uio short_uio1;
+short_uio1 = short_uio;
                error = vn_io_fault_doio(args, &short_uio, td);
                vm_page_unhold_pages(ma, cnt);
                adv = len - short_uio.uio_resid;

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list