[12185.886114] run fstests generic/251 at 2023-03-27 00:18:24
[12186.427354] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 1651580 /dev/mapper/vg0-lv0 scanned by mount (1581387)
[12186.428780] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[12186.428787] BTRFS info (device dm-0): using free space tree
[12186.432658] BTRFS info (device dm-0): auto enabling async discard
[12186.679253] BTRFS: device fsid df38554b-9632-44d1-af02-57b0ee8df3a0 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (1581436)
[12186.730802] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[12186.730811] BTRFS info (device dm-9): turning on async discard
[12186.730814] BTRFS info (device dm-9): disk space caching is enabled
[12186.741841] BTRFS info (device dm-9): checking UUID tree
[13175.155203] ======================================================
[13175.155549] WARNING: possible circular locking dependency detected
[13175.155901] 6.2.0-rc8+ #1127 Not tainted
[13175.156124] ------------------------------------------------------
[13175.156466] kswapd0/46 is trying to acquire lock:
[13175.156736] ffff92d7167fc650 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[13175.157268]
but task is already holding lock:
[13175.157594] ffffffffa9e61c60 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x4aa/0x7a0
[13175.158200]
which lock already depends on the new lock.
[13175.158649]
the existing dependency chain (in reverse order) is:
[13175.159069]
-> #3 (fs_reclaim){+.+.}-{0:0}:
[13175.159478] fs_reclaim_acquire+0xa5/0xe0
[13175.159828] kmem_cache_alloc_lru+0x37/0x6e0
[13175.160161] btrfs_alloc_inode+0x2d/0x260
[13175.160477] alloc_inode+0x1a/0xc0
[13175.160818] iget5_locked+0xba/0x110
[13175.161111] btrfs_iget+0x43/0xe0
[13175.161408] create_reloc_inode+0x19d/0x2e0
[13175.161733] btrfs_relocate_block_group+0x1b7/0x3f0
[13175.162035] btrfs_relocate_chunk+0x4c/0x140
[13175.162305] btrfs_balance+0x762/0xe30
[13175.162549] btrfs_ioctl+0x1d66/0x2880
[13175.162847] __x64_sys_ioctl+0x88/0xc0
[13175.163120] do_syscall_64+0x38/0x90
[13175.163350] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[13175.163663]
-> #2 (btrfs_trans_num_extwriters){++++}-{0:0}:
[13175.164059] join_transaction+0xdb/0x590
[13175.164312] start_transaction+0x24f/0x690
[13175.164574] btrfs_uuid_scan_kthread+0x2b0/0x380
[13175.164867] kthread+0xf0/0x120
[13175.165078] ret_from_fork+0x29/0x50
[13175.165312]
-> #1 (btrfs_trans_num_writers){++++}-{0:0}:
[13175.165775] join_transaction+0xb9/0x590
[13175.166094] start_transaction+0x24f/0x690
[13175.166356] btrfs_uuid_scan_kthread+0x2b0/0x380
[13175.166656] kthread+0xf0/0x120
[13175.166872] ret_from_fork+0x29/0x50
[13175.167104]
-> #0 (sb_internal#2){++++}-{0:0}:
[13175.167438] __lock_acquire+0x111c/0x1e20
[13175.167703] lock_acquire+0xc2/0x2d0
[13175.167936] start_transaction+0x3f9/0x690
[13175.168199] btrfs_commit_inode_delayed_inode+0x5f/0x120
[13175.168525] btrfs_evict_inode+0x2d3/0x410
[13175.168834] evict+0xcc/0x1d0
[13175.169035] inode_lru_isolate+0x14d/0x1e0
[13175.169297] __list_lru_walk_one+0xbe/0x1c0
[13175.169563] list_lru_walk_one+0x58/0x80
[13175.169816] prune_icache_sb+0x39/0x60
[13175.170057] super_cache_scan+0x161/0x1f0
[13175.170315] do_shrink_slab+0x163/0x400
[13175.170566] shrink_slab+0x1d3/0x290
[13175.170808] shrink_node+0x300/0x720
[13175.171039] balance_pgdat+0x35c/0x7a0
[13175.171285] kswapd+0x205/0x4b0
[13175.171492] kthread+0xf0/0x120
[13175.171706] ret_from_fork+0x29/0x50
[13175.172138]
other info that might help us debug this:
[13175.172755] Chain exists of:
sb_internal#2 --> btrfs_trans_num_extwriters --> fs_reclaim
[13175.173516] Possible unsafe locking scenario:
[13175.173924] CPU0 CPU1
[13175.174234] ---- ----
[13175.174601] lock(fs_reclaim);
[13175.174876] lock(btrfs_trans_num_extwriters);
[13175.175312] lock(fs_reclaim);
[13175.175658] lock(sb_internal#2);
[13175.175959]
*** DEADLOCK ***
[13175.176516] 3 locks held by kswapd0/46:
[13175.176855] #0: ffffffffa9e61c60 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x4aa/0x7a0
[13175.177546] #1: ffffffffa9e50150 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x290
[13175.178237] #2: ffff92d7167fc0e0 (&type->s_umount_key#44){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[13175.179027]
stack backtrace:
[13175.179411] CPU: 1 PID: 46 Comm: kswapd0 Not tainted 6.2.0-rc8+ #1127
[13175.179959] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[13175.180677] Call Trace:
[13175.180905]
[13175.181091] dump_stack_lvl+0x56/0x73
[13175.181409] check_noncircular+0xd6/0x100
[13175.181768] ? save_trace+0x3f/0x2f0
[13175.182079] ? add_lock_to_list+0x94/0x100
[13175.182456] __lock_acquire+0x111c/0x1e20
[13175.182796] lock_acquire+0xc2/0x2d0
[13175.183100] ? btrfs_commit_inode_delayed_inode+0x5f/0x120
[13175.183554] start_transaction+0x3f9/0x690
[13175.183897] ? btrfs_commit_inode_delayed_inode+0x5f/0x120
[13175.184361] btrfs_commit_inode_delayed_inode+0x5f/0x120
[13175.184807] btrfs_evict_inode+0x2d3/0x410
[13175.185161] ? lock_release+0x137/0x2d0
[13175.185477] ? __pfx_wake_bit_function+0x10/0x10
[13175.185872] evict+0xcc/0x1d0
[13175.186129] inode_lru_isolate+0x14d/0x1e0
[13175.186482] __list_lru_walk_one+0xbe/0x1c0
[13175.186842] ? __pfx_inode_lru_isolate+0x10/0x10
[13175.187242] ? __pfx_inode_lru_isolate+0x10/0x10
[13175.187629] list_lru_walk_one+0x58/0x80
[13175.187976] prune_icache_sb+0x39/0x60
[13175.188300] super_cache_scan+0x161/0x1f0
[13175.189052] do_shrink_slab+0x163/0x400
[13175.189438] shrink_slab+0x1d3/0x290
[13175.190255] shrink_node+0x300/0x720
[13175.190472] balance_pgdat+0x35c/0x7a0
[13175.190706] kswapd+0x205/0x4b0
[13175.190898] ? __pfx_autoremove_wake_function+0x10/0x10
[13175.191201] ? __pfx_kswapd+0x10/0x10
[13175.191416] kthread+0xf0/0x120
[13175.191607] ? __pfx_kthread+0x10/0x10
[13175.191833] ret_from_fork+0x29/0x50
[13175.192050]
[13289.639515] BTRFS: device fsid df38554b-9632-44d1-af02-57b0ee8df3a0 devid 1 transid 132 /dev/mapper/vg0-lv9 scanned by mount (1590670)
[13289.641533] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[13289.642068] BTRFS info (device dm-9): turning on async discard
[13289.642434] BTRFS info (device dm-9): disk space caching is enabled