[ 1495.316677] run fstests btrfs/017 at 2020-11-19 21:15:05
[ 1495.896524] BTRFS: device fsid 358dbcd0-3f51-4155-b602-2673cbdfa77f devid 1 transid 5 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (216145)
[ 1495.933166] BTRFS info (device dm-9): turning on async discard
[ 1495.933170] BTRFS info (device dm-9): disk space caching is enabled
[ 1495.933171] BTRFS info (device dm-9): has skinny extents
[ 1495.933173] BTRFS info (device dm-9): flagging fs with big metadata feature
[ 1495.942989] BTRFS info (device dm-9): checking UUID tree
[ 1495.993896] ======================================================
[ 1495.994253] WARNING: possible circular locking dependency detected
[ 1495.994615] 5.10.0-rc4+ #52 Not tainted
[ 1495.994841] ------------------------------------------------------
[ 1495.995197] btrfs/216192 is trying to acquire lock:
[ 1495.995488] ffff9992825ef650 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0x8b/0x8f0
[ 1495.995973]
but task is already holding lock:
[ 1495.996312] ffff9992858f1800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1495.996862]
which lock already depends on the new lock.
[ 1495.997335]
the existing dependency chain (in reverse order) is:
[ 1495.997765]
-> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
[ 1495.998184] __mutex_lock+0x7e/0x7b0
[ 1495.998428] btrfs_qgroup_inherit+0x5d/0x740
[ 1495.998706] create_subvol+0x192/0x8e0
[ 1495.998955] btrfs_mksubvol+0x3e9/0x460
[ 1495.999210] __btrfs_ioctl_snap_create+0x119/0x180
[ 1495.999522] btrfs_ioctl_snap_create+0x58/0x80
[ 1495.999810] btrfs_ioctl+0x1229/0x30a0
[ 1496.000062] __x64_sys_ioctl+0x83/0xb0
[ 1496.000315] do_syscall_64+0x33/0x40
[ 1496.000557] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1496.000879]
-> #0 (sb_internal#2){.+.+}-{0:0}:
[ 1496.001225] __lock_acquire+0x1221/0x2140
[ 1496.001493] lock_acquire+0x116/0x3e0
[ 1496.001738] start_transaction+0x43b/0x6f0
[ 1496.002008] btrfs_quota_enable+0x8b/0x8f0
[ 1496.002276] btrfs_ioctl+0x2a2a/0x30a0
[ 1496.002527] __x64_sys_ioctl+0x83/0xb0
[ 1496.002778] do_syscall_64+0x33/0x40
[ 1496.003018] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1496.003341]
other info that might help us debug this:
[ 1496.003799] Possible unsafe locking scenario:
[ 1496.004141] CPU0 CPU1
[ 1496.004407] ---- ----
[ 1496.004671] lock(&fs_info->qgroup_ioctl_lock);
[ 1496.004939] lock(sb_internal#2);
[ 1496.005282] lock(&fs_info->qgroup_ioctl_lock);
[ 1496.005706] lock(sb_internal#2);
[ 1496.005926]
*** DEADLOCK ***
[ 1496.006268] 3 locks held by btrfs/216192:
[ 1496.006506] #0: ffff9992825ef460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0xab2/0x30a0
[ 1496.006992] #1: ffff9992858f0bb8 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x2280/0x30a0
[ 1496.007546] #2: ffff9992858f1800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1496.008143]
stack backtrace:
[ 1496.008412] CPU: 1 PID: 216192 Comm: btrfs Not tainted 5.10.0-rc4+ #52
[ 1496.008788] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[ 1496.009280] Call Trace:
[ 1496.009438] dump_stack+0x8b/0xb0
[ 1496.009637] check_noncircular+0xcf/0xf0
[ 1496.009869] __lock_acquire+0x1221/0x2140
[ 1496.010109] lock_acquire+0x116/0x3e0
[ 1496.010339] ? btrfs_quota_enable+0x8b/0x8f0
[ 1496.010593] start_transaction+0x43b/0x6f0
[ 1496.010833] ? btrfs_quota_enable+0x8b/0x8f0
[ 1496.011086] btrfs_quota_enable+0x8b/0x8f0
[ 1496.011340] btrfs_ioctl+0x2a2a/0x30a0
[ 1496.011565] ? _raw_spin_unlock+0x1f/0x30
[ 1496.011827] ? handle_mm_fault+0x1061/0x1960
[ 1496.012089] ? find_held_lock+0x2b/0x80
[ 1496.012323] ? do_user_addr_fault+0x215/0x440
[ 1496.012581] ? __x64_sys_ioctl+0x83/0xb0
[ 1496.012817] __x64_sys_ioctl+0x83/0xb0
[ 1496.013044] do_syscall_64+0x33/0x40
[ 1496.013257] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1496.013560] RIP: 0033:0x7f3a8e5d64cb
[ 1496.013773] 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 b9 0c 00 f7 d8 64 89 01 48
[ 1496.014861] RSP: 002b:00007ffe666c8628 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 1496.015307] RAX: ffffffffffffffda RBX: 000055a016ae9220 RCX: 00007f3a8e5d64cb
[ 1496.015744] RDX: 00007ffe666c8640 RSI: 00000000c0109428 RDI: 0000000000000003
[ 1496.016192] RBP: 0000000000000003 R08: 000055a0171382a0 R09: 00007f3a8e6a2a60
[ 1496.016677] R10: 0000000000000231 R11: 0000000000000246 R12: 00007ffe666c8640
[ 1496.017123] R13: 000055a016b26b40 R14: 000055a016ae0345 R15: 000055a016ae01f5
[ 1496.027065] BTRFS warning (device dm-9): qgroup rescan is already in progress
[ 1496.055729] BTRFS info (device dm-9): qgroup scan completed (inconsistency flag cleared)
[ 1496.220650] BTRFS info (device dm-9): turning on async discard
[ 1496.221016] BTRFS info (device dm-9): disk space caching is enabled
[ 1496.221384] BTRFS info (device dm-9): has skinny extents