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
Thanks for the report. Fixed by a6279470762c19ba97 "Btrfs: fix deadlock when allocating tree block during leaf/node split", in 5.0.