[ 1483.894511] run fstests btrfs/017 at 2020-11-17 21:15:05
[ 1484.446991] BTRFS: device fsid 28e716c4-0a16-4c14-8350-6192efc0fb22 devid 1 transid 5 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (224754)
[ 1484.470407] BTRFS info (device dm-9): disk space caching is enabled
[ 1484.470411] BTRFS info (device dm-9): has skinny extents
[ 1484.470412] BTRFS info (device dm-9): flagging fs with big metadata feature
[ 1484.478243] BTRFS info (device dm-9): checking UUID tree
[ 1484.537914] ======================================================
[ 1484.538282] WARNING: possible circular locking dependency detected
[ 1484.538630] 5.10.0-rc4+ #50 Not tainted
[ 1484.538849] ------------------------------------------------------
[ 1484.539200] btrfs/224801 is trying to acquire lock:
[ 1484.539475] ffff961811502650 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0x8b/0x8f0
[ 1484.539946]
but task is already holding lock:
[ 1484.540279] ffff9618135bd800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1484.540815]
which lock already depends on the new lock.
[ 1484.541275]
the existing dependency chain (in reverse order) is:
[ 1484.541695]
-> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
[ 1484.542107] __mutex_lock+0x7e/0x7b0
[ 1484.542341] btrfs_qgroup_inherit+0x5d/0x740
[ 1484.542613] create_subvol+0x192/0x8e0
[ 1484.542855] btrfs_mksubvol+0x3e9/0x460
[ 1484.543109] __btrfs_ioctl_snap_create+0x119/0x180
[ 1484.543408] btrfs_ioctl_snap_create+0x58/0x80
[ 1484.543688] btrfs_ioctl+0x1229/0x30a0
[ 1484.543931] __x64_sys_ioctl+0x83/0xb0
[ 1484.544179] do_syscall_64+0x33/0x40
[ 1484.544414] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1484.544749]
-> #0 (sb_internal#2){.+.+}-{0:0}:
[ 1484.545103] __lock_acquire+0x1221/0x2140
[ 1484.545384] lock_acquire+0x116/0x3e0
[ 1484.545628] start_transaction+0x43b/0x6f0
[ 1484.545908] btrfs_quota_enable+0x8b/0x8f0
[ 1484.546201] btrfs_ioctl+0x2a2a/0x30a0
[ 1484.546444] __x64_sys_ioctl+0x83/0xb0
[ 1484.546687] do_syscall_64+0x33/0x40
[ 1484.546943] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1484.547312]
other info that might help us debug this:
[ 1484.547760] Possible unsafe locking scenario:
[ 1484.548094] CPU0 CPU1
[ 1484.548350] ---- ----
[ 1484.548608] lock(&fs_info->qgroup_ioctl_lock);
[ 1484.548869] lock(sb_internal#2);
[ 1484.549206] lock(&fs_info->qgroup_ioctl_lock);
[ 1484.549603] lock(sb_internal#2);
[ 1484.549798]
*** DEADLOCK ***
[ 1484.550133] 3 locks held by btrfs/224801:
[ 1484.550413] #0: ffff961811502460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0xab2/0x30a0
[ 1484.550912] #1: ffff9618135bcbb8 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x2280/0x30a0
[ 1484.551421] #2: ffff9618135bd800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1484.551979]
stack backtrace:
[ 1484.552237] CPU: 1 PID: 224801 Comm: btrfs Not tainted 5.10.0-rc4+ #50
[ 1484.552602] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[ 1484.553086] Call Trace:
[ 1484.553234] dump_stack+0x8b/0xb0
[ 1484.553426] check_noncircular+0xcf/0xf0
[ 1484.553650] __lock_acquire+0x1221/0x2140
[ 1484.553880] lock_acquire+0x116/0x3e0
[ 1484.554096] ? btrfs_quota_enable+0x8b/0x8f0
[ 1484.554339] start_transaction+0x43b/0x6f0
[ 1484.554572] ? btrfs_quota_enable+0x8b/0x8f0
[ 1484.554819] btrfs_quota_enable+0x8b/0x8f0
[ 1484.555055] btrfs_ioctl+0x2a2a/0x30a0
[ 1484.555270] ? _raw_spin_unlock+0x1f/0x30
[ 1484.555501] ? handle_mm_fault+0x1061/0x1960
[ 1484.555745] ? find_held_lock+0x2b/0x80
[ 1484.555964] ? do_user_addr_fault+0x215/0x440
[ 1484.556215] ? __x64_sys_ioctl+0x83/0xb0
[ 1484.556439] __x64_sys_ioctl+0x83/0xb0
[ 1484.556655] do_syscall_64+0x33/0x40
[ 1484.556860] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1484.557150] RIP: 0033:0x7fe2ef2b95cb
[ 1484.557356] Code: 89 d8 49 8d 3c 1c 48 f7 d8 49 39 c4 72 b5 e8 1c ff ff ff 85 c0 78 ba 4c 89 e0 5b 5d 41 5c c3 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 7d c8 0c 00 f7 d8 64 89 01 48
[ 1484.558394] RSP: 002b:00007ffea234e688 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 1484.558834] RAX: ffffffffffffffda RBX: 000055a2c1a7a220 RCX: 00007fe2ef2b95cb
[ 1484.559266] RDX: 00007ffea234e6a0 RSI: 00000000c0109428 RDI: 0000000000000003
[ 1484.559689] RBP: 0000000000000003 R08: 000055a2c27402a0 R09: 00007fe2ef386a60
[ 1484.560115] R10: 0000000000000231 R11: 0000000000000246 R12: 00007ffea234e6a0
[ 1484.560513] R13: 000055a2c1ab7b40 R14: 000055a2c1a71345 R15: 000055a2c1a711f5
[ 1484.573347] BTRFS warning (device dm-9): qgroup rescan is already in progress
[ 1484.576866] BTRFS info (device dm-9): qgroup scan completed (inconsistency flag cleared)
[ 1484.667395] BTRFS info (device dm-9): disk space caching is enabled
[ 1484.667772] BTRFS info (device dm-9): has skinny extents