[53568.470415] run fstests generic/251 at 2023-09-19 11:51:32
[53568.970637] BTRFS: device fsid 13921637-4436-40f4-9cb4-e48f1103a380 devid 1 transid 2457024 /dev/mapper/vg0-lv0 scanned by mount (3749050)
[53568.971710] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[53568.971716] BTRFS info (device dm-0): using free space tree
[53568.975750] BTRFS info (device dm-0): auto enabling async discard
[53569.246620] BTRFS: device fsid b3788954-f173-43ae-a5ff-7a5495ab270e devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (3749108)
[53569.247079] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[53569.247087] BTRFS info (device dm-9): using free space tree
[53569.252975] BTRFS info (device dm-9): auto enabling async discard
[53569.253135] BTRFS info (device dm-9): checking UUID tree
[54187.678757] ======================================================
[54187.679073] WARNING: possible circular locking dependency detected
[54187.679389] 6.6.0-rc2+ #1306 Not tainted
[54187.679596] ------------------------------------------------------
[54187.679916] kswapd0/50 is trying to acquire lock:
[54187.680161] ffff8de5553ca398 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[54187.680645]
but task is already holding lock:
[54187.680950] ffff8de553f21600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[54187.681446]
which lock already depends on the new lock.
[54187.681862]
the existing dependency chain (in reverse order) is:
[54187.682245]
-> #3 (sb_internal#2){++++}-{0:0}:
[54187.682604] start_transaction+0x493/0xad0
[54187.682897] btrfs_commit_inode_delayed_inode+0x5f/0x120
[54187.683266] btrfs_evict_inode+0x273/0x3c0
[54187.683536] evict+0xcc/0x1d0
[54187.683759] inode_lru_isolate+0x14d/0x1e0
[54187.684040] __list_lru_walk_one+0xbe/0x1c0
[54187.684339] list_lru_walk_one+0x58/0x80
[54187.684597] prune_icache_sb+0x39/0x60
[54187.684861] super_cache_scan+0x167/0x1f0
[54187.685131] do_shrink_slab+0x163/0x340
[54187.685401] shrink_slab+0x1d7/0x2a0
[54187.685647] shrink_node+0x2eb/0x7b0
[54187.685903] balance_pgdat+0x344/0x780
[54187.686165] kswapd+0x205/0x410
[54187.686388] kthread+0xff/0x130
[54187.686613] ret_from_fork+0x2d/0x50
[54187.686870] ret_from_fork_asm+0x1b/0x30
[54187.687139]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[54187.687486] fs_reclaim_acquire+0xa2/0xe0
[54187.687772] kmem_cache_alloc_lru+0x4e/0x600
[54187.688071] btrfs_alloc_inode+0x2d/0x250
[54187.688345] alloc_inode+0x1a/0xc0
[54187.688585] iget5_locked+0xba/0x110
[54187.688866] btrfs_iget+0x43/0xe0
[54187.689102] create_reloc_inode+0x1a0/0x370
[54187.689389] btrfs_relocate_block_group+0x1b7/0x410
[54187.689716] btrfs_relocate_chunk+0x4c/0x1b0
[54187.690008] btrfs_balance+0x8e7/0x11d0
[54187.690275] btrfs_ioctl+0x1a2d/0x2820
[54187.690545] __x64_sys_ioctl+0x8b/0xc0
[54187.690893] do_syscall_64+0x38/0x90
[54187.691233] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[54187.691665]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[54187.692179] join_transaction+0xaf/0x580
[54187.692531] start_transaction+0x1a0/0xad0
[54187.692862] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[54187.693227] kthread+0xff/0x130
[54187.693451] ret_from_fork+0x2d/0x50
[54187.693736] ret_from_fork_asm+0x1b/0x30
[54187.694115]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[54187.694563] __lock_acquire+0x1415/0x2190
[54187.694846] lock_acquire+0xc7/0x2b0
[54187.695131] join_transaction+0x1e4/0x580
[54187.695526] start_transaction+0x1a0/0xad0
[54187.695862] btrfs_commit_inode_delayed_inode+0x5f/0x120
[54187.696252] btrfs_evict_inode+0x273/0x3c0
[54187.696593] evict+0xcc/0x1d0
[54187.696849] inode_lru_isolate+0x14d/0x1e0
[54187.697168] __list_lru_walk_one+0xbe/0x1c0
[54187.697459] list_lru_walk_one+0x58/0x80
[54187.697770] prune_icache_sb+0x39/0x60
[54187.698031] super_cache_scan+0x167/0x1f0
[54187.698305] do_shrink_slab+0x163/0x340
[54187.698585] shrink_slab+0x1d7/0x2a0
[54187.698827] shrink_node+0x2eb/0x7b0
[54187.699105] balance_pgdat+0x344/0x780
[54187.699356] kswapd+0x205/0x410
[54187.699594] kthread+0xff/0x130
[54187.699819] ret_from_fork+0x2d/0x50
[54187.700062] ret_from_fork_asm+0x1b/0x30
[54187.700325]
other info that might help us debug this:
[54187.700790] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[54187.701411] Possible unsafe locking scenario:
[54187.701909] CPU0 CPU1
[54187.702216] ---- ----
[54187.702454] rlock(sb_internal#2);
[54187.702640] lock(fs_reclaim);
[54187.702937] lock(sb_internal#2);
[54187.703253] rlock(btrfs_trans_num_writers);
[54187.703511]
*** DEADLOCK ***
[54187.703824] 4 locks held by kswapd0/50:
[54187.704031] #0: ffffffff9ae62e40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[54187.704457] #1: ffffffff9ae51350 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[54187.704889] #2: ffff8de553f210e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[54187.705366] #3: ffff8de553f21600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[54187.705878]
stack backtrace:
[54187.706113] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc2+ #1306
[54187.706443] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[54187.706879] Call Trace:
[54187.707011]
[54187.707131] dump_stack_lvl+0x58/0x90
[54187.707336] check_noncircular+0x101/0x110
[54187.707550] __lock_acquire+0x1415/0x2190
[54187.707776] lock_acquire+0xc7/0x2b0
[54187.707966] ? join_transaction+0x1d0/0x580
[54187.708186] ? lock_release+0x134/0x270
[54187.708386] ? join_transaction+0x1d0/0x580
[54187.708607] ? join_transaction+0x3d/0x580
[54187.708826] join_transaction+0x1e4/0x580
[54187.709037] ? join_transaction+0x1d0/0x580
[54187.709255] start_transaction+0x1a0/0xad0
[54187.709468] btrfs_commit_inode_delayed_inode+0x5f/0x120
[54187.709787] btrfs_evict_inode+0x273/0x3c0
[54187.710003] ? lock_release+0x134/0x270
[54187.710205] ? __pfx_wake_bit_function+0x10/0x10
[54187.710503] evict+0xcc/0x1d0
[54187.710687] inode_lru_isolate+0x14d/0x1e0
[54187.710931] __list_lru_walk_one+0xbe/0x1c0
[54187.711150] ? __pfx_inode_lru_isolate+0x10/0x10
[54187.711482] ? __pfx_inode_lru_isolate+0x10/0x10
[54187.711765] list_lru_walk_one+0x58/0x80
[54187.712079] prune_icache_sb+0x39/0x60
[54187.712385] super_cache_scan+0x167/0x1f0
[54187.712659] do_shrink_slab+0x163/0x340
[54187.712929] ? lock_is_held_type+0xe2/0x140
[54187.713219] shrink_slab+0x1d7/0x2a0
[54187.713447] shrink_node+0x2eb/0x7b0
[54187.713740] balance_pgdat+0x344/0x780
[54187.714029] kswapd+0x205/0x410
[54187.714252] ? __pfx_autoremove_wake_function+0x10/0x10
[54187.714598] ? __pfx_kswapd+0x10/0x10
[54187.714881] kthread+0xff/0x130
[54187.715075] ? __pfx_kthread+0x10/0x10
[54187.715370] ret_from_fork+0x2d/0x50
[54187.715682] ? __pfx_kthread+0x10/0x10
[54187.715921] ret_from_fork_asm+0x1b/0x30
[54187.716177]
[54432.170997] BTRFS: device fsid b3788954-f173-43ae-a5ff-7a5495ab270e devid 1 transid 144 /dev/mapper/vg0-lv9 scanned by mount (3760534)
[54432.172545] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[54432.173190] BTRFS info (device dm-9): using free space tree
[54432.175862] BTRFS info (device dm-9): auto enabling async discard