[11058.648228] run fstests generic/251 at 2023-07-24 23:55:51
[11059.057764] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1338143 /dev/mapper/vg0-lv0 scanned by mount (1544308)
[11059.058899] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[11059.058905] BTRFS info (device dm-0): using free space tree
[11059.063244] BTRFS info (device dm-0): auto enabling async discard
[11059.307425] BTRFS: device fsid 5a96ed51-9010-46ec-b31e-e813f70d221f devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mkfs.btrfs (1544356)
[11059.326334] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[11059.326344] BTRFS info (device dm-7): using free space tree
[11059.329309] BTRFS info (device dm-7): auto enabling async discard
[11059.329457] BTRFS info (device dm-7): checking UUID tree
[11828.755421] ======================================================
[11828.755645] WARNING: possible circular locking dependency detected
[11828.755863] 6.5.0-rc3+ #1250 Not tainted
[11828.756037] ------------------------------------------------------
[11828.756255] kswapd0/47 is trying to acquire lock:
[11828.756590] ffffa03e5f8ee378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x19f/0x550
[11828.756910]
but task is already holding lock:
[11828.757194] ffffa03e1da6d600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11828.757523]
which lock already depends on the new lock.
[11828.757860]
the existing dependency chain (in reverse order) is:
[11828.758137]
-> #3 (sb_internal){++++}-{0:0}:
[11828.758395] start_transaction+0x401/0x730
[11828.758585] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11828.758791] btrfs_evict_inode+0x273/0x3c0
[11828.759114] evict+0xcc/0x1d0
[11828.759279] inode_lru_isolate+0x14d/0x1e0
[11828.759470] __list_lru_walk_one+0xbe/0x1c0
[11828.759673] list_lru_walk_one+0x58/0x80
[11828.759854] prune_icache_sb+0x39/0x60
[11828.760038] super_cache_scan+0x161/0x1f0
[11828.760220] do_shrink_slab+0x163/0x340
[11828.760447] shrink_slab+0x1d7/0x2a0
[11828.760621] shrink_node+0x2eb/0x7b0
[11828.760796] balance_pgdat+0x344/0x780
[11828.760977] kswapd+0x205/0x410
[11828.761141] kthread+0xfc/0x130
[11828.761308] ret_from_fork+0x2d/0x50
[11828.761640] ret_from_fork_asm+0x1b/0x30
[11828.761822]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[11828.762068] fs_reclaim_acquire+0xa5/0xe0
[11828.762251] kmem_cache_alloc_lru+0x4e/0x570
[11828.762471] btrfs_alloc_inode+0x2d/0x250
[11828.762657] alloc_inode+0x1a/0xc0
[11828.762827] iget5_locked+0xba/0x110
[11828.763008] btrfs_iget+0x43/0xe0
[11828.763176] create_reloc_inode+0x19d/0x370
[11828.763362] btrfs_relocate_block_group+0x1b7/0x410
[11828.763567] btrfs_relocate_chunk+0x4c/0x190
[11828.763752] btrfs_balance+0x8e7/0x11d0
[11828.764057] btrfs_ioctl+0x1d3d/0x2900
[11828.764232] __x64_sys_ioctl+0x8b/0xc0
[11828.764415] do_syscall_64+0x38/0x90
[11828.764596] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11828.764795]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[11828.765068] join_transaction+0xdb/0x550
[11828.765245] start_transaction+0x24f/0x730
[11828.765427] btrfs_dirty_inode+0x40/0xd0
[11828.765609] touch_atime+0x15b/0x280
[11828.765790] step_into+0x2bf/0x6e0
[11828.765959] link_path_walk.part.0+0x22f/0x370
[11828.766147] path_openat+0xa5/0xa30
[11828.766316] do_filp_open+0x96/0x120
[11828.766617] do_open_execat+0x55/0xf0
[11828.766792] open_exec+0x27/0x50
[11828.766958] load_elf_binary+0x215/0x1820
[11828.767146] bprm_execve+0x30c/0x870
[11828.767320] do_execveat_common+0x1b5/0x260
[11828.767508] __x64_sys_execve+0x39/0x50
[11828.767685] do_syscall_64+0x38/0x90
[11828.767862] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11828.768066]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[11828.768330] __lock_acquire+0x1415/0x2190
[11828.768518] lock_acquire+0xc7/0x2b0
[11828.768694] join_transaction+0x1cd/0x550
[11828.768875] start_transaction+0x24f/0x730
[11828.769179] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11828.769390] btrfs_evict_inode+0x273/0x3c0
[11828.769580] evict+0xcc/0x1d0
[11828.769743] inode_lru_isolate+0x14d/0x1e0
[11828.769922] __list_lru_walk_one+0xbe/0x1c0
[11828.770110] list_lru_walk_one+0x58/0x80
[11828.770292] prune_icache_sb+0x39/0x60
[11828.770470] super_cache_scan+0x161/0x1f0
[11828.770650] do_shrink_slab+0x163/0x340
[11828.770825] shrink_slab+0x1d7/0x2a0
[11828.771002] shrink_node+0x2eb/0x7b0
[11828.771175] balance_pgdat+0x344/0x780
[11828.771350] kswapd+0x205/0x410
[11828.771634] kthread+0xfc/0x130
[11828.771807] ret_from_fork+0x2d/0x50
[11828.771978] ret_from_fork_asm+0x1b/0x30
[11828.772158]
other info that might help us debug this:
[11828.772540] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal
[11828.772922] Possible unsafe locking scenario:
[11828.773184] CPU0 CPU1
[11828.773363] ---- ----
[11828.773548] rlock(sb_internal);
[11828.773709] lock(fs_reclaim);
[11828.773909] lock(sb_internal);
[11828.774112] rlock(btrfs_trans_num_writers);
[11828.774286]
*** DEADLOCK ***
[11828.774578] 4 locks held by kswapd0/47:
[11828.774756] #0: ffffffffaae62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[11828.775188] #1: ffffffffaae507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[11828.775508] #2: ffffa03e1da6d0e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[11828.775842] #3: ffffa03e1da6d600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11828.776177]
stack backtrace:
[11828.776398] CPU: 1 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc3+ #1250
[11828.776622] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[11828.776924] Call Trace:
[11828.777066]
[11828.777212] dump_stack_lvl+0x58/0x90
[11828.777380] check_noncircular+0x101/0x110
[11828.777688] __lock_acquire+0x1415/0x2190
[11828.777864] lock_acquire+0xc7/0x2b0
[11828.778026] ? join_transaction+0x19f/0x550
[11828.778198] ? lock_release+0x134/0x270
[11828.778368] join_transaction+0x1cd/0x550
[11828.778547] ? join_transaction+0x19f/0x550
[11828.778723] start_transaction+0x24f/0x730
[11828.778898] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11828.779099] btrfs_evict_inode+0x273/0x3c0
[11828.779277] ? lock_release+0x134/0x270
[11828.779447] ? __pfx_wake_bit_function+0x10/0x10
[11828.779633] evict+0xcc/0x1d0
[11828.779789] inode_lru_isolate+0x14d/0x1e0
[11828.780079] __list_lru_walk_one+0xbe/0x1c0
[11828.780267] ? __pfx_inode_lru_isolate+0x10/0x10
[11828.780473] ? __pfx_inode_lru_isolate+0x10/0x10
[11828.780661] list_lru_walk_one+0x58/0x80
[11828.780829] prune_icache_sb+0x39/0x60
[11828.780994] super_cache_scan+0x161/0x1f0
[11828.781168] do_shrink_slab+0x163/0x340
[11828.781340] ? lock_is_held_type+0xe2/0x140
[11828.781520] shrink_slab+0x1d7/0x2a0
[11828.781683] shrink_node+0x2eb/0x7b0
[11828.781859] balance_pgdat+0x344/0x780
[11828.782030] kswapd+0x205/0x410
[11828.782185] ? __pfx_autoremove_wake_function+0x10/0x10
[11828.782484] ? __pfx_kswapd+0x10/0x10
[11828.782795] kthread+0xfc/0x130
[11828.782952] ? __pfx_kthread+0x10/0x10
[11828.783122] ret_from_fork+0x2d/0x50
[11828.783286] ? __pfx_kthread+0x10/0x10
[11828.783456] ret_from_fork_asm+0x1b/0x30
[11828.783628] RIP: 0000:0x0
[11828.783786] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[11828.784012] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[11828.784291] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[11828.785708] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[11828.786046] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[11828.790719] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[11828.790954] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[11828.791189]
[12034.609837] BTRFS: device fsid 5a96ed51-9010-46ec-b31e-e813f70d221f devid 1 transid 71 /dev/mapper/vg0-lv7 scanned by mount (1585376)
[12034.610655] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[12034.611007] BTRFS info (device dm-7): using free space tree
[12034.615718] BTRFS info (device dm-7): auto enabling async discard