Bug 202383 - btrfs receive deadlock on btrfs_async_run_delayed_refs() and btrfs_tree_lock()
Summary: btrfs receive deadlock on btrfs_async_run_delayed_refs() and btrfs_tree_lock()
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: BTRFS virtual assignee
Depends on:
Reported: 2019-01-22 15:11 UTC by Eli V
Modified: 2019-01-22 15:11 UTC (History)
0 users

See Also:
Kernel Version: 4.19.16
Tree: Mainline
Regression: No

dmesg with stack traces (17.06 KB, text/plain)
2019-01-22 15:11 UTC, Eli V

Description Eli V 2019-01-22 15:11:22 UTC
Created attachment 280667 [details]
dmesg with stack traces

Running a btrfs receive using btrfs-progs v4.19.1 on linux kernel 4.19.16 seems to have deadlocked the btrfs receive process. Full command is /usr/local/bin/btrfs receive /mirror/, and it's and ssh invocation of a send with just the subvolume being sent i.e. no other options. The filesystem itself doesn't seem to be hung, i.e. can still ls and read files on it, just the receive and a handful of kernel threads are hung. The /proc/stack for the btrfs receive is:

[<0>] btrfs_async_run_delayed_refs+0x115/0x140 [btrfs]
[<0>] __btrfs_end_transaction+0x1d1/0x2d0 [btrfs]
[<0>] btrfs_setattr+0x4ea/0x590 [btrfs]
[<0>] notify_change+0x2f4/0x430
[<0>] do_truncate+0x5e/0x90
[<0>] vfs_truncate+0x195/0x1d0
[<0>] do_sys_truncate+0x59/0xa0
[<0>] do_syscall_64+0x55/0x100
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

Note You need to log in before you can comment on or make changes to this bug.