[53246.234890] run fstests generic/251 at 2023-09-29 11:42:40
[53246.726609] BTRFS: device fsid 13921637-4436-40f4-9cb4-e48f1103a380 devid 1 transid 2518705 /dev/mapper/vg0-lv0 scanned by mount (3859334)
[53246.727316] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[53246.727322] BTRFS info (device dm-0): using free space tree
[53246.731269] BTRFS info (device dm-0): auto enabling async discard
[53247.002442] BTRFS: device fsid 3f6d0f06-9ac4-4117-8c25-5cd9ea1ee077 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (3859392)
[53247.003305] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[53247.003313] BTRFS info (device dm-9): using free space tree
[53247.006457] BTRFS info (device dm-9): auto enabling async discard
[53247.006579] BTRFS info (device dm-9): checking UUID tree
[53428.501413] ======================================================
[53428.501954] WARNING: possible circular locking dependency detected
[53428.502505] 6.6.0-rc3+ #1316 Not tainted
[53428.502915] ------------------------------------------------------
[53428.503427] kswapd0/50 is trying to acquire lock:
[53428.503800] ffff9ddc03282390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[53428.506484]
but task is already holding lock:
[53428.506952] ffff9ddc21860600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[53428.507925]
which lock already depends on the new lock.
[53428.508514]
the existing dependency chain (in reverse order) is:
[53428.509154]
-> #3 (sb_internal#2){++++}-{0:0}:
[53428.509611] start_transaction+0x493/0xad0
[53428.509959] btrfs_commit_inode_delayed_inode+0x5f/0x120
[53428.510398] btrfs_evict_inode+0x273/0x3c0
[53428.510747] evict+0xcc/0x1d0
[53428.511315] inode_lru_isolate+0x14d/0x1e0
[53428.511695] __list_lru_walk_one+0xbe/0x1c0
[53428.512259] list_lru_walk_one+0x58/0x80
[53428.512681] prune_icache_sb+0x39/0x60
[53428.513081] super_cache_scan+0x167/0x1f0
[53428.513679] do_shrink_slab+0x163/0x340
[53428.514182] shrink_slab+0x1d7/0x2a0
[53428.514517] shrink_node+0x2eb/0x7b0
[53428.514843] balance_pgdat+0x344/0x780
[53428.515204] kswapd+0x205/0x410
[53428.515513] kthread+0xff/0x130
[53428.516227] ret_from_fork+0x2d/0x50
[53428.516707] ret_from_fork_asm+0x1b/0x30
[53428.517294]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[53428.517772] fs_reclaim_acquire+0xa2/0xe0
[53428.518440] kmem_cache_alloc_lru+0x4e/0x600
[53428.519130] btrfs_alloc_inode+0x2d/0x250
[53428.519507] alloc_inode+0x1a/0xc0
[53428.519839] iget5_locked+0xba/0x110
[53428.520166] btrfs_iget+0x43/0xe0
[53428.520499] create_reloc_inode+0x1a0/0x370
[53428.520959] btrfs_relocate_block_group+0x1d2/0x3d0
[53428.521438] btrfs_relocate_chunk+0x4c/0x1b0
[53428.522014] btrfs_balance+0x8e7/0x11d0
[53428.522368] btrfs_ioctl+0x1bb4/0x28b0
[53428.522737] __x64_sys_ioctl+0x8b/0xc0
[53428.523302] do_syscall_64+0x38/0x90
[53428.523655] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[53428.524286]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[53428.524870] join_transaction+0xaf/0x580
[53428.525237] start_transaction+0x1a0/0xad0
[53428.525604] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[53428.526232] kthread+0xff/0x130
[53428.526543] ret_from_fork+0x2d/0x50
[53428.526905] ret_from_fork_asm+0x1b/0x30
[53428.527251]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[53428.527849] __lock_acquire+0x1415/0x2190
[53428.528622] lock_acquire+0xc7/0x2b0
[53428.528992] join_transaction+0x1e4/0x580
[53428.529405] start_transaction+0x1a0/0xad0
[53428.529787] btrfs_commit_inode_delayed_inode+0x5f/0x120
[53428.530326] btrfs_evict_inode+0x273/0x3c0
[53428.530793] evict+0xcc/0x1d0
[53428.531119] inode_lru_isolate+0x14d/0x1e0
[53428.531538] __list_lru_walk_one+0xbe/0x1c0
[53428.531977] list_lru_walk_one+0x58/0x80
[53428.532395] prune_icache_sb+0x39/0x60
[53428.532800] super_cache_scan+0x167/0x1f0
[53428.533230] do_shrink_slab+0x163/0x340
[53428.533622] shrink_slab+0x1d7/0x2a0
[53428.533993] shrink_node+0x2eb/0x7b0
[53428.534362] balance_pgdat+0x344/0x780
[53428.534751] kswapd+0x205/0x410
[53428.535076] kthread+0xff/0x130
[53428.535413] ret_from_fork+0x2d/0x50
[53428.535787] ret_from_fork_asm+0x1b/0x30
[53428.536213]
other info that might help us debug this:
[53428.536938] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[53428.537931] Possible unsafe locking scenario:
[53428.538557] CPU0 CPU1
[53428.539030] ---- ----
[53428.539378] rlock(sb_internal#2);
[53428.539654] lock(fs_reclaim);
[53428.540117] lock(sb_internal#2);
[53428.540572] rlock(btrfs_trans_num_writers);
[53428.540926]
*** DEADLOCK ***
[53428.541412] 4 locks held by kswapd0/50:
[53428.541711] #0: ffffffff91e62e00 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[53428.542352] #1: ffffffff91e51310 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[53428.543016] #2: ffff9ddc218600e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[53428.543766] #3: ffff9ddc21860600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[53428.544553]
stack backtrace:
[53428.545124] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc3+ #1316
[53428.545633] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[53428.546374] Call Trace:
[53428.546814]
[53428.547056] dump_stack_lvl+0x58/0x90
[53428.547470] check_noncircular+0x101/0x110
[53428.547921] __lock_acquire+0x1415/0x2190
[53428.548272] lock_acquire+0xc7/0x2b0
[53428.548576] ? join_transaction+0x1d0/0x580
[53428.548931] ? lock_release+0x134/0x270
[53428.549246] ? join_transaction+0x1d0/0x580
[53428.549584] ? join_transaction+0x3d/0x580
[53428.549916] join_transaction+0x1e4/0x580
[53428.550241] ? join_transaction+0x1d0/0x580
[53428.550577] start_transaction+0x1a0/0xad0
[53428.550906] btrfs_commit_inode_delayed_inode+0x5f/0x120
[53428.551341] btrfs_evict_inode+0x273/0x3c0
[53428.551663] ? lock_release+0x134/0x270
[53428.551982] ? __pfx_wake_bit_function+0x10/0x10
[53428.552561] evict+0xcc/0x1d0
[53428.552799] inode_lru_isolate+0x14d/0x1e0
[53428.553136] __list_lru_walk_one+0xbe/0x1c0
[53428.553473] ? __pfx_inode_lru_isolate+0x10/0x10
[53428.553895] ? __pfx_inode_lru_isolate+0x10/0x10
[53428.554288] list_lru_walk_one+0x58/0x80
[53428.554613] prune_icache_sb+0x39/0x60
[53428.554930] super_cache_scan+0x167/0x1f0
[53428.555259] do_shrink_slab+0x163/0x340
[53428.555558] shrink_slab+0x1d7/0x2a0
[53428.555862] shrink_node+0x2eb/0x7b0
[53428.556156] balance_pgdat+0x344/0x780
[53428.556479] kswapd+0x205/0x410
[53428.556759] ? __pfx_autoremove_wake_function+0x10/0x10
[53428.557181] ? __pfx_kswapd+0x10/0x10
[53428.557494] kthread+0xff/0x130
[53428.557774] ? __pfx_kthread+0x10/0x10
[53428.558095] ret_from_fork+0x2d/0x50
[53428.558411] ? __pfx_kthread+0x10/0x10
[53428.558734] ret_from_fork_asm+0x1b/0x30
[53428.559057]
[53884.000838] BTRFS: device fsid 3f6d0f06-9ac4-4117-8c25-5cd9ea1ee077 devid 1 transid 84 /dev/mapper/vg0-lv9 scanned by mount (3869951)
[53884.002570] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[53884.003296] BTRFS info (device dm-9): using free space tree
[53884.006020] BTRFS info (device dm-9): auto enabling async discard