[10334.219425] run fstests generic/251 at 2023-08-28 23:45:22
[10334.759069] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2593671 /dev/mapper/vg0-lv0 scanned by mount (1580717)
[10334.760674] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[10334.760684] BTRFS info (device dm-0): using free space tree
[10334.765062] BTRFS info (device dm-0): auto enabling async discard
[10335.015144] BTRFS: device fsid 1257979e-acd2-4329-bf56-ba1dfaead37e devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (1580765)
[10335.068887] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[10335.068902] BTRFS info (device dm-9): turning on async discard
[10335.068906] BTRFS info (device dm-9): disk space caching is enabled
[10335.074385] BTRFS info (device dm-9): checking UUID tree
[10884.046032] ======================================================
[10884.046281] WARNING: possible circular locking dependency detected
[10884.046532] 6.5.0-rc7+ #1285 Not tainted
[10884.046703] ------------------------------------------------------
[10884.046950] kswapd0/47 is trying to acquire lock:
[10884.047143] ffff8d5a12682388 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[10884.047701]
but task is already holding lock:
[10884.047938] ffff8d5a067ac600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[10884.048772]
which lock already depends on the new lock.
[10884.049363]
the existing dependency chain (in reverse order) is:
[10884.049681]
-> #3 (sb_internal#2){++++}-{0:0}:
[10884.049931] start_transaction+0x3f9/0x740
[10884.050129] btrfs_commit_inode_delayed_inode+0x5f/0x120
[10884.050374] btrfs_evict_inode+0x273/0x3c0
[10884.050580] evict+0xcc/0x1d0
[10884.050747] inode_lru_isolate+0x14d/0x1e0
[10884.050943] __list_lru_walk_one+0xbe/0x1c0
[10884.051150] list_lru_walk_one+0x58/0x80
[10884.051339] prune_icache_sb+0x39/0x60
[10884.051592] super_cache_scan+0x161/0x1f0
[10884.051796] do_shrink_slab+0x163/0x340
[10884.051983] shrink_slab+0x1d7/0x2a0
[10884.052160] shrink_node+0x2eb/0x7b0
[10884.052332] balance_pgdat+0x344/0x780
[10884.052515] kswapd+0x205/0x410
[10884.052679] kthread+0xfc/0x130
[10884.052846] ret_from_fork+0x2d/0x50
[10884.053019] ret_from_fork_asm+0x1b/0x30
[10884.053215]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[10884.053454] fs_reclaim_acquire+0xa5/0xe0
[10884.053657] kmem_cache_alloc_lru+0x4e/0x570
[10884.053865] btrfs_alloc_inode+0x2d/0x250
[10884.054058] alloc_inode+0x1a/0xc0
[10884.054226] iget5_locked+0xba/0x110
[10884.054401] btrfs_iget+0x43/0xe0
[10884.054565] create_reloc_inode+0x19d/0x370
[10884.054770] btrfs_relocate_block_group+0x1b7/0x410
[10884.054995] btrfs_relocate_chunk+0x4c/0x1b0
[10884.055202] btrfs_balance+0x8e7/0x11d0
[10884.055390] btrfs_ioctl+0x1d3d/0x2900
[10884.055578] __x64_sys_ioctl+0x8b/0xc0
[10884.055763] do_syscall_64+0x38/0x90
[10884.055956] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[10884.056196]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[10884.056489] join_transaction+0xb4/0x590
[10884.056685] start_transaction+0x187/0x740
[10884.056882] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[10884.057098] kthread+0xfc/0x130
[10884.057296] ret_from_fork+0x2d/0x50
[10884.057470] ret_from_fork_asm+0x1b/0x30
[10884.057667]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[10884.057946] __lock_acquire+0x1415/0x2190
[10884.058181] lock_acquire+0xc7/0x2b0
[10884.058358] join_transaction+0x1de/0x590
[10884.058550] start_transaction+0x187/0x740
[10884.058758] btrfs_commit_inode_delayed_inode+0x5f/0x120
[10884.059006] btrfs_evict_inode+0x273/0x3c0
[10884.059371] evict+0xcc/0x1d0
[10884.059833] inode_lru_isolate+0x14d/0x1e0
[10884.060137] __list_lru_walk_one+0xbe/0x1c0
[10884.060413] list_lru_walk_one+0x58/0x80
[10884.060612] prune_icache_sb+0x39/0x60
[10884.060796] super_cache_scan+0x161/0x1f0
[10884.060988] do_shrink_slab+0x163/0x340
[10884.061305] shrink_slab+0x1d7/0x2a0
[10884.061480] shrink_node+0x2eb/0x7b0
[10884.061661] balance_pgdat+0x344/0x780
[10884.061843] kswapd+0x205/0x410
[10884.061999] kthread+0xfc/0x130
[10884.062158] ret_from_fork+0x2d/0x50
[10884.062334] ret_from_fork_asm+0x1b/0x30
[10884.062523]
other info that might help us debug this:
[10884.062858] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[10884.063414] Possible unsafe locking scenario:
[10884.063849] CPU0 CPU1
[10884.064071] ---- ----
[10884.064262] rlock(sb_internal#2);
[10884.064443] lock(fs_reclaim);
[10884.064685] lock(sb_internal#2);
[10884.064931] rlock(btrfs_trans_num_writers);
[10884.065117]
*** DEADLOCK ***
[10884.065361] 4 locks held by kswapd0/47:
[10884.065525] #0: ffffffff9de62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[10884.065866] #1: ffffffff9de507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[10884.066211] #2: ffff8d5a067ac0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[10884.066598] #3: ffff8d5a067ac600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[10884.067009]
stack backtrace:
[10884.067196] CPU: 0 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc7+ #1285
[10884.067461] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[10884.067815] Call Trace:
[10884.067925]
[10884.068024] dump_stack_lvl+0x58/0x90
[10884.068185] check_noncircular+0x101/0x110
[10884.068361] __lock_acquire+0x1415/0x2190
[10884.068535] lock_acquire+0xc7/0x2b0
[10884.068695] ? join_transaction+0x1af/0x590
[10884.068874] ? lock_release+0x134/0x270
[10884.069038] join_transaction+0x1de/0x590
[10884.069210] ? join_transaction+0x1af/0x590
[10884.069389] start_transaction+0x187/0x740
[10884.069564] btrfs_commit_inode_delayed_inode+0x5f/0x120
[10884.069795] btrfs_evict_inode+0x273/0x3c0
[10884.069970] ? lock_release+0x134/0x270
[10884.070133] ? __pfx_wake_bit_function+0x10/0x10
[10884.070331] evict+0xcc/0x1d0
[10884.070465] inode_lru_isolate+0x14d/0x1e0
[10884.070645] __list_lru_walk_one+0xbe/0x1c0
[10884.070823] ? __pfx_inode_lru_isolate+0x10/0x10
[10884.071021] ? __pfx_inode_lru_isolate+0x10/0x10
[10884.071217] list_lru_walk_one+0x58/0x80
[10884.071386] prune_icache_sb+0x39/0x60
[10884.071548] super_cache_scan+0x161/0x1f0
[10884.071733] do_shrink_slab+0x163/0x340
[10884.072078] shrink_slab+0x1d7/0x2a0
[10884.072298] shrink_node+0x2eb/0x7b0
[10884.072624] balance_pgdat+0x344/0x780
[10884.072966] kswapd+0x205/0x410
[10884.073284] ? __pfx_autoremove_wake_function+0x10/0x10
[10884.073505] ? __pfx_kswapd+0x10/0x10
[10884.073669] kthread+0xfc/0x130
[10884.073901] ? __pfx_kthread+0x10/0x10
[10884.074065] ret_from_fork+0x2d/0x50
[10884.074221] ? __pfx_kthread+0x10/0x10
[10884.074384] ret_from_fork_asm+0x1b/0x30
[10884.074555]
[11206.866116] BTRFS: device fsid 1257979e-acd2-4329-bf56-ba1dfaead37e devid 1 transid 126 /dev/mapper/vg0-lv9 scanned by mount (1610300)
[11206.868134] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[11206.868450] BTRFS info (device dm-9): turning on async discard
[11206.868682] BTRFS info (device dm-9): disk space caching is enabled