[Bug 291064] locking bug in fuse_vnop_read()

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 17 Nov 2025 17:10:27 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291064

            Bug ID: 291064
           Summary: locking bug in fuse_vnop_read()
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: markj@FreeBSD.org
                CC: asomers@FreeBSD.org

I tried to use fsapfsmount to access a volume.  I wanted to back up some files
from it, but upon reading them I get a panic:

VNASSERT failed: locked not true at /root/freebsd/sys/kern/vfs_subr.c:5816
(assert_vop_elocked)
0xfffff8046a050dc0: type VREG state VSTATE_CONSTRUCTED op 0xffffffff84348878
    usecount 2, writecount 0, refcount 3598 seqc users 0           
    hold count flags ()                         
    flags ()                                                         
    v_object 0xfffff800136f3d90 ref 0 pages 103776 cleanbuf 3596 dirtybuf 0
    lock type fuse: SHARED (count 1)                               
nodeid: 6, parent nodeid: 0, nlookup: 1, flag: 0x2000
panic: fuse_internal_cache_attrs: vnode is not exclusive locked but should be
cpuid = 3                                       
time = 1763398849                                                    
KDB: stack backtrace:                         
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0229c904d0
vpanic() at vpanic+0x136/frame 0xfffffe0229c90600              
panic() at panic+0x43/frame 0xfffffe0229c90660                                  
assert_vop_elocked() at assert_vop_elocked+0x86/frame 0xfffffe0229c90690
fuse_internal_cache_attrs() at fuse_internal_cache_attrs+0x47/frame
0xfffffe0229c906f0
fuse_internal_do_getattr() at fuse_internal_do_getattr+0x156/frame
0xfffffe0229c907a0
fuse_vnode_size() at fuse_vnode_size+0x70/frame 0xfffffe0229c907f0              
fuse_read_biobackend() at fuse_read_biobackend+0x56/frame 0xfffffe0229c90880    
fuse_vnop_read() at fuse_vnop_read+0x15a/frame 0xfffffe0229c908e0               
VOP_READ_APV() at VOP_READ_APV+0x55/frame 0xfffffe0229c90910                    
vn_rdwr() at vn_rdwr+0x304/frame 0xfffffe0229c909d0                             
vn_generic_copy_file_range() at vn_generic_copy_file_range+0x8ee/frame
0xfffffe0229c90bf0                                                              
vn_copy_file_range() at vn_copy_file_range+0x28f/frame 0xfffffe0229c90cd0       
kern_copy_file_range() at kern_copy_file_range+0x408/frame 0xfffffe0229c90db0   
sys_copy_file_range() at sys_copy_file_range+0x78/frame 0xfffffe0229c90e00      
amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe0229c90f30                 
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe0229c90f30      
--- syscall (569, FreeBSD ELF64, copy_file_range), rip = 0x765682438da, rsp =
0x765650dcb38, rbp = 0x765650dcc80 ---                                          
Timeout initializing vt_vga                  
Uptime: 4m58s                                                                   
Dumping 2388 out of 65217 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%

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