[ 1516.494019] run fstests btrfs/017 at 2020-11-18 21:15:24
[ 1517.044221] BTRFS: device fsid 5d7fb91d-5206-4721-970c-6cc282a51d0d devid 1 transid 5 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (219481)
[ 1517.075456] BTRFS info (device dm-9): turning on async discard
[ 1517.075460] BTRFS info (device dm-9): disk space caching is enabled
[ 1517.075462] BTRFS info (device dm-9): has skinny extents
[ 1517.075463] BTRFS info (device dm-9): flagging fs with big metadata feature
[ 1517.085733] BTRFS info (device dm-9): checking UUID tree
[ 1517.134680] ======================================================
[ 1517.135031] WARNING: possible circular locking dependency detected
[ 1517.135389] 5.10.0-rc4+ #51 Not tainted
[ 1517.135611] ------------------------------------------------------
[ 1517.135964] btrfs/219529 is trying to acquire lock:
[ 1517.136244] ffff9a7191940650 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0x8b/0x8f0
[ 1517.136727]
but task is already holding lock:
[ 1517.137059] ffff9a71825b9800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1517.137603]
which lock already depends on the new lock.
[ 1517.138063]
the existing dependency chain (in reverse order) is:
[ 1517.138489]
-> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
[ 1517.138898] __mutex_lock+0x7e/0x7b0
[ 1517.139136] btrfs_qgroup_inherit+0x5d/0x740
[ 1517.139415] create_subvol+0x192/0x8e0
[ 1517.139659] btrfs_mksubvol+0x3e9/0x460
[ 1517.139909] __btrfs_ioctl_snap_create+0x119/0x180
[ 1517.140212] btrfs_ioctl_snap_create+0x58/0x80
[ 1517.140499] btrfs_ioctl+0x1229/0x30a0
[ 1517.140744] __x64_sys_ioctl+0x83/0xb0
[ 1517.140991] do_syscall_64+0x33/0x40
[ 1517.141227] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1517.141546]
-> #0 (sb_internal#2){.+.+}-{0:0}:
[ 1517.141886] __lock_acquire+0x1221/0x2140
[ 1517.142144] lock_acquire+0x116/0x3e0
[ 1517.142390] start_transaction+0x43b/0x6f0
[ 1517.142654] btrfs_quota_enable+0x8b/0x8f0
[ 1517.142918] btrfs_ioctl+0x2a2a/0x30a0
[ 1517.143164] __x64_sys_ioctl+0x83/0xb0
[ 1517.143412] do_syscall_64+0x33/0x40
[ 1517.143648] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1517.143965]
other info that might help us debug this:
[ 1517.144418] Possible unsafe locking scenario:
[ 1517.144754] CPU0 CPU1
[ 1517.145014] ---- ----
[ 1517.145273] lock(&fs_info->qgroup_ioctl_lock);
[ 1517.145541] lock(sb_internal#2);
[ 1517.145877] lock(&fs_info->qgroup_ioctl_lock);
[ 1517.146283] lock(sb_internal#2);
[ 1517.146481]
*** DEADLOCK ***
[ 1517.146817] 3 locks held by btrfs/219529:
[ 1517.147047] #0: ffff9a7191940460 (sb_writers#12){.+.+}-{0:0}, at: btrfs_ioctl+0xab2/0x30a0
[ 1517.147521] #1: ffff9a71825b8bb8 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x2280/0x30a0
[ 1517.148029] #2: ffff9a71825b9800 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x2b/0x8f0
[ 1517.148596]
stack backtrace:
[ 1517.148850] CPU: 0 PID: 219529 Comm: btrfs Not tainted 5.10.0-rc4+ #51
[ 1517.149220] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[ 1517.149704] Call Trace:
[ 1517.149851] dump_stack+0x8b/0xb0
[ 1517.150046] check_noncircular+0xcf/0xf0
[ 1517.150276] __lock_acquire+0x1221/0x2140
[ 1517.150513] lock_acquire+0x116/0x3e0
[ 1517.150726] ? btrfs_quota_enable+0x8b/0x8f0
[ 1517.150973] start_transaction+0x43b/0x6f0
[ 1517.151209] ? btrfs_quota_enable+0x8b/0x8f0
[ 1517.151460] btrfs_quota_enable+0x8b/0x8f0
[ 1517.151698] btrfs_ioctl+0x2a2a/0x30a0
[ 1517.151915] ? _raw_spin_unlock+0x1f/0x30
[ 1517.152151] ? handle_mm_fault+0x1061/0x1960
[ 1517.152401] ? find_held_lock+0x2b/0x80
[ 1517.152624] ? do_user_addr_fault+0x215/0x440
[ 1517.152874] ? __x64_sys_ioctl+0x83/0xb0
[ 1517.153101] __x64_sys_ioctl+0x83/0xb0
[ 1517.153323] do_syscall_64+0x33/0x40
[ 1517.153531] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1517.153820] RIP: 0033:0x7f271767f4cb
[ 1517.154027] 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
[ 1517.155073] RSP: 002b:00007ffef58a56c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 1517.155503] RAX: ffffffffffffffda RBX: 000055741338c220 RCX: 00007f271767f4cb
[ 1517.155908] RDX: 00007ffef58a56e0 RSI: 00000000c0109428 RDI: 0000000000000003
[ 1517.156312] RBP: 0000000000000003 R08: 0000557413d5c2a0 R09: 00007f271774ba60
[ 1517.156718] R10: 0000000000000231 R11: 0000000000000246 R12: 00007ffef58a56e0
[ 1517.157120] R13: 00005574133c9b40 R14: 0000557413383345 R15: 00005574133831f5
[ 1517.167710] BTRFS warning (device dm-9): qgroup rescan is already in progress
[ 1517.171183] BTRFS info (device dm-9): qgroup scan completed (inconsistency flag cleared)
[ 1517.326309] BTRFS info (device dm-9): turning on async discard
[ 1517.326684] BTRFS info (device dm-9): disk space caching is enabled
[ 1517.327063] BTRFS info (device dm-9): has skinny extents