Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jun 2019 18:05:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 238565] panic: vinvalbuf: dirty bufs during unmount if clustered writes return errors
Message-ID:  <bug-238565-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238565

            Bug ID: 238565
           Summary: panic: vinvalbuf: dirty bufs during unmount if
                    clustered writes return errors
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: asomers@FreeBSD.org

It seems that if a clustered write experiences an error while fsyncing duri=
ng
unmount, vinvalbuf will panic.  This only happens with clustered writes, not
normal writes.  So far I've only been able to reproduce it on fusefs, but I
suspect that all file systems which use clustering (UFS, ext2, msdosfs, fus=
efs)
are affected.  The problem is easiest to reproduce with fusefs just because
fuse makes it easy to inject errors at any point.

The panic can be reproduced on the projects/fuse2 branch by doing the
following:
$ sudo sysctl sysctl vfs.fusefs.data_cache_mode=3D2
$ cd /usr/tests/sys/fs/fusefs
$ ./write --gtest_also_run_disabled_tests=20
--gtest_filter=3DWriteCluster.DISABLED_cluster_write_err -v


fsync: giving up on dirty (error =3D 5) 0xfffff80049732960: tag fuse, type =
VREG
    usecount 0, writecount 0, refcount 5
    flags (VI_ACTIVE|VI_DOINGINACT)
    v_object 0xfffff80049318900 ref 0 pages 48 cleanbuf 0 dirtybuf 3
    lock type fuse: EXCL by thread 0xfffff8000337f5a0 (pid 3944, write, tid
100085)
nodeid: 42, parent nodeid: 0, nlookup: 1, flag: 0
panic: vinvalbuf: dirty bufs
cpuid =3D 0
time =3D 1560534385
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0031dd8=
4c0
vpanic() at vpanic+0x19d/frame 0xfffffe0031dd8510
panic() at panic+0x43/frame 0xfffffe0031dd8570
bufobj_invalbuf() at bufobj_invalbuf+0x2ca/frame 0xfffffe0031dd85d0
vgonel() at vgonel+0x15e/frame 0xfffffe0031dd8640
vflush() at vflush+0x22c/frame 0xfffffe0031dd8790
fuse_vfsop_unmount() at fuse_vfsop_unmount+0xad/frame 0xfffffe0031dd8800
dounmount() at dounmount+0x4ae/frame 0xfffffe0031dd8860
sys_unmount() at sys_unmount+0x300/frame 0xfffffe0031dd8990
amd64_syscall() at amd64_syscall+0x276/frame 0xfffffe0031dd8ab0
fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0031dd8ab0
--- syscall (22, FreeBSD ELF64, sys_unmount), rip =3D 0x80052d9aa, rsp =3D
0x7fffffffe6e8, rbp =3D 0x7fffffffe700 ---
KDB: enter: panic

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238565-227>