[11844.823066] run fstests generic/251 at 2023-11-14 00:13:07
[11845.376656] BTRFS: device fsid 13921637-4436-40f4-9cb4-e48f1103a380 devid 1 transid 2810087 /dev/mapper/vg0-lv0 scanned by mount (1603124)
[11845.377125] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[11845.377131] BTRFS info (device dm-0): using free space tree
[11845.381777] BTRFS info (device dm-0): auto enabling async discard
[11846.387238] BTRFS: device fsid 12c7c272-fd4b-47f8-8075-3ce86f3c7e59 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (1603182)
[11846.387709] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[11846.387716] BTRFS info (device dm-9): disk space caching is enabled
[11846.391345] BTRFS info (device dm-9): auto enabling async discard
[11846.391589] BTRFS info (device dm-9): checking UUID tree
[12839.834333] ======================================================
[12839.834602] WARNING: possible circular locking dependency detected
[12839.834936] 6.7.0-rc1+ #1358 Not tainted
[12839.835120] ------------------------------------------------------
[12839.835384] kswapd0/50 is trying to acquire lock:
[12839.835589] ffffa0a74be76390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[12839.835990]
but task is already holding lock:
[12839.836290] ffffa0a7435b9608 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[12839.836726]
which lock already depends on the new lock.
[12839.837084]
the existing dependency chain (in reverse order) is:
[12839.837444]
-> #3 (sb_internal#2){++++}-{0:0}:
[12839.837708] start_transaction+0x493/0xad0
[12839.837918] btrfs_commit_inode_delayed_inode+0x5f/0x120
[12839.838182] btrfs_evict_inode+0x273/0x3c0
[12839.838390] evict+0xcc/0x1d0
[12839.838550] inode_lru_isolate+0x14d/0x1e0
[12839.838756] __list_lru_walk_one+0xbe/0x1c0
[12839.838969] list_lru_walk_one+0x58/0x80
[12839.839204] prune_icache_sb+0x39/0x60
[12839.839395] super_cache_scan+0x151/0x1d0
[12839.839599] do_shrink_slab+0x164/0x670
[12839.839797] shrink_slab+0x54a/0x8b0
[12839.839986] shrink_node+0x2eb/0x7b0
[12839.840169] balance_pgdat+0x359/0x790
[12839.840363] kswapd+0x205/0x410
[12839.840528] kthread+0xff/0x130
[12839.840697] ret_from_fork+0x2d/0x50
[12839.840884] ret_from_fork_asm+0x1b/0x30
[12839.841154]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[12839.841429] fs_reclaim_acquire+0xa2/0xe0
[12839.841630] kmem_cache_alloc_lru+0x4e/0x720
[12839.841910] btrfs_alloc_inode+0x2d/0x250
[12839.842148] alloc_inode+0x1a/0xc0
[12839.842321] iget5_locked+0xba/0x110
[12839.842530] btrfs_iget+0x43/0xe0
[12839.842745] create_reloc_inode+0x1a0/0x360
[12839.843041] btrfs_relocate_block_group+0x1d2/0x3d0
[12839.843347] btrfs_relocate_chunk+0x4c/0x1b0
[12839.843659] btrfs_balance+0x8e7/0x11d0
[12839.843906] btrfs_ioctl+0x1c06/0x2840
[12839.844143] __x64_sys_ioctl+0x8b/0xc0
[12839.844441] do_syscall_64+0x3e/0xf0
[12839.844791] entry_SYSCALL_64_after_hwframe+0x6e/0x76
[12839.845126]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[12839.845698] join_transaction+0xaf/0x580
[12839.846116] start_transaction+0x1a0/0xad0
[12839.846495] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[12839.846936] kthread+0xff/0x130
[12839.847255] ret_from_fork+0x2d/0x50
[12839.847656] ret_from_fork_asm+0x1b/0x30
[12839.848052]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[12839.848635] __lock_acquire+0x1415/0x2190
[12839.849020] lock_acquire+0xc7/0x2b0
[12839.849406] join_transaction+0x1e4/0x580
[12839.849825] start_transaction+0x1a0/0xad0
[12839.850263] btrfs_commit_inode_delayed_inode+0x5f/0x120
[12839.850770] btrfs_evict_inode+0x273/0x3c0
[12839.851116] evict+0xcc/0x1d0
[12839.851421] inode_lru_isolate+0x14d/0x1e0
[12839.851775] __list_lru_walk_one+0xbe/0x1c0
[12839.852060] list_lru_walk_one+0x58/0x80
[12839.852420] prune_icache_sb+0x39/0x60
[12839.852681] super_cache_scan+0x151/0x1d0
[12839.852928] do_shrink_slab+0x164/0x670
[12839.853297] shrink_slab+0x54a/0x8b0
[12839.853696] shrink_node+0x2eb/0x7b0
[12839.854096] balance_pgdat+0x359/0x790
[12839.854373] kswapd+0x205/0x410
[12839.854580] kthread+0xff/0x130
[12839.854926] ret_from_fork+0x2d/0x50
[12839.855245] ret_from_fork_asm+0x1b/0x30
[12839.855521]
other info that might help us debug this:
[12839.855953] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[12839.856543] Possible unsafe locking scenario:
[12839.856840] CPU0 CPU1
[12839.857046] ---- ----
[12839.857322] rlock(sb_internal#2);
[12839.857574] lock(fs_reclaim);
[12839.857919] lock(sb_internal#2);
[12839.858319] rlock(btrfs_trans_num_writers);
[12839.858590]
*** DEADLOCK ***
[12839.858951] 3 locks held by kswapd0/50:
[12839.859199] #0: ffffffffb3e64880 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x400/0x790
[12839.860007] #1: ffffa0a7435b90e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x33/0x1d0
[12839.860825] #2: ffffa0a7435b9608 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[12839.861565]
stack backtrace:
[12839.861976] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.7.0-rc1+ #1358
[12839.862543] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[12839.863265] Call Trace:
[12839.863533]
[12839.863767] dump_stack_lvl+0x58/0x90
[12839.864150] check_noncircular+0x101/0x110
[12839.864572] ? mark_held_locks+0x49/0x80
[12839.864826] __lock_acquire+0x1415/0x2190
[12839.865087] lock_acquire+0xc7/0x2b0
[12839.865317] ? join_transaction+0x1d0/0x580
[12839.865577] ? lock_release+0x134/0x270
[12839.865823] ? join_transaction+0x1d0/0x580
[12839.866082] ? join_transaction+0x3d/0x580
[12839.866323] join_transaction+0x1e4/0x580
[12839.866569] ? join_transaction+0x1d0/0x580
[12839.866831] start_transaction+0x1a0/0xad0
[12839.867091] btrfs_commit_inode_delayed_inode+0x5f/0x120
[12839.867419] btrfs_evict_inode+0x273/0x3c0
[12839.867647] ? lock_release+0x134/0x270
[12839.867857] ? __pfx_wake_bit_function+0x10/0x10
[12839.868125] evict+0xcc/0x1d0
[12839.868350] inode_lru_isolate+0x14d/0x1e0
[12839.868639] __list_lru_walk_one+0xbe/0x1c0
[12839.868932] ? __pfx_inode_lru_isolate+0x10/0x10
[12839.869218] ? __pfx_inode_lru_isolate+0x10/0x10
[12839.869637] list_lru_walk_one+0x58/0x80
[12839.870023] prune_icache_sb+0x39/0x60
[12839.870342] super_cache_scan+0x151/0x1d0
[12839.870609] do_shrink_slab+0x164/0x670
[12839.870820] shrink_slab+0x54a/0x8b0
[12839.871094] ? shrink_slab+0x420/0x8b0
[12839.871466] ? shrink_slab+0x371/0x8b0
[12839.871762] shrink_node+0x2eb/0x7b0
[12839.871991] balance_pgdat+0x359/0x790
[12839.872344] kswapd+0x205/0x410
[12839.872613] ? __pfx_autoremove_wake_function+0x10/0x10
[12839.873057] ? __pfx_kswapd+0x10/0x10
[12839.873346] kthread+0xff/0x130
[12839.873584] ? __pfx_kthread+0x10/0x10
[12839.873894] ret_from_fork+0x2d/0x50
[12839.874205] ? __pfx_kthread+0x10/0x10
[12839.874523] ret_from_fork_asm+0x1b/0x30
[12839.874870]
[13074.313138] BTRFS: device fsid 12c7c272-fd4b-47f8-8075-3ce86f3c7e59 devid 1 transid 130 /dev/mapper/vg0-lv9 scanned by mount (1615116)
[13074.314674] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[13074.315130] BTRFS info (device dm-9): disk space caching is enabled
[13074.319008] BTRFS info (device dm-9): auto enabling async discard