Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2026 22:59:31 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 293198] zfs deadlock while copying many files, vfs_deleteextattr_dir-related?
Message-ID:  <bug-293198-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

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

            Bug ID: 293198
           Summary: zfs deadlock while copying many files,
                    vfs_deleteextattr_dir-related?
           Product: Base System
           Version: 15.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: pen@lysator.liu.se

Created attachment 268084
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=268084&action=edit
Output from procstat -kk -a

While copying many zfs (30000) filesystems (using a loop of zfs create ; tar
cpf - | (cd xxx ; tar xpf -) the bsdtar writing the files (and eventually the
whole system) deadlocks at after some 479 filesystems have been copied:

# fgrep bsdtar /tmp/procstat-kka-2.out 

48759 103729 bsdtar              -                   mi_switch+0xbc
sleepq_catch_signals+0x27d sleepq_wait_sig+0x9 _sleep+0x197
uipc_sosend_stream_or_seqpacket+0x475 sousrsend+0x5f dofilewrite+0x81
sys_write+0x127 amd64_syscall+0x126 fast_syscall_common+0xf8 

48760 105220 bsdtar              -                   mi_switch+0xbc
_sleep+0x19e rms_rlock_fallback+0x90 zfs_lookup+0x74 zfs_deleteextattr_dir+0x38
zfs_setextattr+0x7dc VOP_SETEXTATTR_APV+0x24 extattr_set_vp+0x11d
kern_extattr_set_path+0x14e sys_extattr_set_link+0x6b amd64_syscall+0x126
fast_syscall_common+0xf8 

My reading of the deadlock is that it is related to some extattrs. 


ps auxww|grep bsdtar indicates that it was copying some stuff in a Documents/My
Videos directory that looks like this in the source:

# ls -laR My\ Videos
total 28
drwxr-xr-x  2 agnra495 student-liu.se   3 Apr  9  2025 $RECYCLE.BIN
drwxr-xr-x  3 agnra495 student-liu.se   4 Apr 15  2025 .
drwxr-xr-x  6 agnra495 student-liu.se   7 Apr 15  2025 ..
-rw-r--r--  1 agnra495 student-liu.se 504 Apr 15  2025 desktop.ini

My Videos/$RECYCLE.BIN:
total 11
drwxr-xr-x  2 agnra495 student-liu.se   3 Apr  9  2025 .
drwxr-xr-x  3 agnra495 student-liu.se   4 Apr 15  2025 ..
-rw-r--r--  1 agnra495 student-liu.se 129 Apr  9  2025 desktop.ini

There are some extattrs set on the files but nothing strange:

# find . -print | xargs lsextattr user 
.       DOSATTRIB
./desktop.ini   DOSATTRIB
./$RECYCLE.BIN  DOSATTRIB
./$RECYCLE.BIN/desktop.ini      DOSATTRIB

# find . -print | xargs lsextattr system
.       
./desktop.ini   
./$RECYCLE.BIN  
./$RECYCLE.BIN/desktop.ini      

Attaching the full "procstat -kk -a" output.

The copying is being done inside a Zpool.

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

home | help

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