You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zfs umount -> zfsctl_destroy() takes zfs_snapshot_lock WRITER &
calls zfsctl_snapshot_unmount_cancel() which waits for
snapentry_expire() if present(only when snap is automounted).
This snapentry_expire() itself then waits for zfs_snapshot_lock
READER, resulting in a deadlock.
Describe how to reproduce the problem
Need the below patch,
rohan@rohan-vm:~$ cat bug-repro.diff
sudo zpool/zpool create pool /dev/sdb
sudo zpool/zpool list
sudo zfs/zfs snapshot pool@snap1
mount | grep pool
cd /pool/.zfs/snapshot/snap1/
cd -
mount | grep pool
sudo zfs/zfs umount pool
After 120 seconds,
dmesg
Include any warning/errors/backtraces from the system logs
zfs umount -> zfsctl_destroy() takes zfs_snapshot_lock WRITER &
calls zfsctl_snapshot_unmount_cancel() which waits for
snapentry_expire() if present(only when snap is automounted).
This snapentry_expire() itself then waits for zfs_snapshot_lock
READER, resulting in a deadlock.
Fix is, in zfsctl_destroy() do avl_tree lookup & removal with
WRITER zfs_snapshot_lock & leave this lock before
zfsctl_snapshot_unmount_cancel() call, since the validity of se
is protected by se->se_refcount.
Also remove the corresponding lock assertion from
zfsctl_snapshot_unmount_cancel() too.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rohan Puri <rohan.puri15@gmail.com>
Closesopenzfs#7751
System information
Describe the problem you're observing
Describe how to reproduce the problem
Need the below patch,
rohan@rohan-vm:~$ cat bug-repro.diff
Then series of commands,
After 120 seconds,
dmesg
Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: