[ 1463.999823] run fstests btrfs/017 at 2020-11-20 21:14:58
[ 1464.641808] BTRFS: device fsid a5e48d6a-6455-4e34-8d20-c37b57d0d301 devid 1 transid 5 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (225716)
[ 1464.672412] BTRFS info (device dm-9): disk space caching is enabled
[ 1464.672416] BTRFS info (device dm-9): has skinny extents
[ 1464.672417] BTRFS info (device dm-9): flagging fs with big metadata feature
[ 1464.684424] BTRFS info (device dm-9): checking UUID tree
[ 1464.730910] ======================================================
[ 1464.731263] WARNING: possible circular locking dependency detected
[ 1464.731615] 5.10.0-rc4+ #53 Not tainted
[ 1464.731836] ------------------------------------------------------
[ 1464.732189] btrfs/225763 is trying to acquire lock:
[ 1464.732467] ffff8ba111306650 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0x8b/0x8f0
[ 1464.732944]
but task is already holding lock:
[ 1464.733276] ffff8ba102499800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1464.733814]
which lock already depends on the new lock.
[ 1464.734277]
the existing dependency chain (in reverse order) is:
[ 1464.734699]
-> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
[ 1464.735111] __mutex_lock+0x7e/0x7b0
[ 1464.735348] btrfs_qgroup_inherit+0x5d/0x740
[ 1464.735622] create_subvol+0x192/0x8e0
[ 1464.735869] btrfs_mksubvol+0x3e9/0x460
[ 1464.736120] __btrfs_ioctl_snap_create+0x119/0x180
[ 1464.736421] btrfs_ioctl_snap_create+0x58/0x80
[ 1464.736704] btrfs_ioctl+0x1229/0x30a0
[ 1464.736952] __x64_sys_ioctl+0x83/0xb0
[ 1464.737203] do_syscall_64+0x33/0x40
[ 1464.737439] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1464.737756]
-> #0 (sb_internal#2){.+.+}-{0:0}:
[ 1464.738098] __lock_acquire+0x1221/0x2140
[ 1464.738358] lock_acquire+0x116/0x3e0
[ 1464.738599] start_transaction+0x43b/0x6f0
[ 1464.738868] btrfs_quota_enable+0x8b/0x8f0
[ 1464.739132] btrfs_ioctl+0x2a2a/0x30a0
[ 1464.739380] __x64_sys_ioctl+0x83/0xb0
[ 1464.739625] do_syscall_64+0x33/0x40
[ 1464.739865] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1464.740181]
other info that might help us debug this:
[ 1464.740630] Possible unsafe locking scenario:
[ 1464.740967] CPU0 CPU1
[ 1464.741227] ---- ----
[ 1464.741485] lock(&fs_info->qgroup_ioctl_lock);
[ 1464.741749] lock(sb_internal#2);
[ 1464.742087] lock(&fs_info->qgroup_ioctl_lock);
[ 1464.742491] lock(sb_internal#2);
[ 1464.742690]
*** DEADLOCK ***
[ 1464.743032] 3 locks held by btrfs/225763:
[ 1464.743273] #0: ffff8ba111306460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0xab2/0x30a0
[ 1464.743750] #1: ffff8ba102498bb8 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x2280/0x30a0
[ 1464.744268] #2: ffff8ba102499800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1464.744835]
stack backtrace:
[ 1464.745091] CPU: 1 PID: 225763 Comm: btrfs Not tainted 5.10.0-rc4+ #53
[ 1464.745462] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[ 1464.745950] Call Trace:
[ 1464.746099] dump_stack+0x8b/0xb0
[ 1464.746294] check_noncircular+0xcf/0xf0
[ 1464.746523] __lock_acquire+0x1221/0x2140
[ 1464.746760] lock_acquire+0x116/0x3e0
[ 1464.746978] ? btrfs_quota_enable+0x8b/0x8f0
[ 1464.747227] start_transaction+0x43b/0x6f0
[ 1464.747465] ? btrfs_quota_enable+0x8b/0x8f0
[ 1464.747713] btrfs_quota_enable+0x8b/0x8f0
[ 1464.747957] btrfs_ioctl+0x2a2a/0x30a0
[ 1464.748176] ? _raw_spin_unlock+0x1f/0x30
[ 1464.748410] ? handle_mm_fault+0x1061/0x1960
[ 1464.748659] ? find_held_lock+0x2b/0x80
[ 1464.748886] ? do_user_addr_fault+0x215/0x440
[ 1464.749151] ? __x64_sys_ioctl+0x83/0xb0
[ 1464.749377] __x64_sys_ioctl+0x83/0xb0
[ 1464.749595] do_syscall_64+0x33/0x40
[ 1464.749804] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1464.750097] RIP: 0033:0x7f125d4ca5cb
[ 1464.750307] 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
[ 1464.751354] RSP: 002b:00007ffc12e4b6d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 1464.751784] RAX: ffffffffffffffda RBX: 000055f3e789a220 RCX: 00007f125d4ca5cb
[ 1464.752203] RDX: 00007ffc12e4b6f0 RSI: 00000000c0109428 RDI: 0000000000000003
[ 1464.752609] RBP: 0000000000000003 R08: 000055f3e88772a0 R09: 00007f125d597a60
[ 1464.753022] R10: 0000000000000231 R11: 0000000000000246 R12: 00007ffc12e4b6f0
[ 1464.753433] R13: 000055f3e78d7b40 R14: 000055f3e7891345 R15: 000055f3e78911f5
[ 1464.764220] BTRFS warning (device dm-9): qgroup rescan is already in progress
[ 1464.770902] BTRFS info (device dm-9): qgroup scan completed (inconsistency flag cleared)
[ 1465.084476] BTRFS info (device dm-9): disk space caching is enabled
[ 1465.085097] BTRFS info (device dm-9): has skinny extents