[53008.014640] run fstests generic/251 at 2023-09-20 11:37:58
[53008.600240] BTRFS: device fsid 13921637-4436-40f4-9cb4-e48f1103a380 devid 1 transid 2463434 /dev/mapper/vg0-lv0 scanned by mount (3797014)
[53008.600790] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[53008.600797] BTRFS info (device dm-0): using free space tree
[53008.605143] BTRFS info (device dm-0): auto enabling async discard
[53008.878552] BTRFS: device fsid 696e4550-2af6-481f-a03a-57ae371aa1f3 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (3797072)
[53008.879292] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[53008.879300] BTRFS info (device dm-9): using free space tree
[53008.886710] BTRFS info (device dm-9): auto enabling async discard
[53008.886856] BTRFS info (device dm-9): checking UUID tree
[54016.191340] ======================================================
[54016.191683] WARNING: possible circular locking dependency detected
[54016.192015] 6.6.0-rc2+ #1307 Not tainted
[54016.192228] ------------------------------------------------------
[54016.192626] kswapd0/50 is trying to acquire lock:
[54016.192877] ffff8e7073a56398 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[54016.195050]
but task is already holding lock:
[54016.195353] ffff8e7073509600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[54016.195992]
which lock already depends on the new lock.
[54016.196467]
the existing dependency chain (in reverse order) is:
[54016.196871]
-> #3 (sb_internal#2){++++}-{0:0}:
[54016.197188] start_transaction+0x493/0xad0
[54016.197440] btrfs_commit_inode_delayed_inode+0x5f/0x120
[54016.197754] btrfs_evict_inode+0x273/0x3c0
[54016.198029] evict+0xcc/0x1d0
[54016.199323] inode_lru_isolate+0x14d/0x1e0
[54016.199583] __list_lru_walk_one+0xbe/0x1c0
[54016.200374] list_lru_walk_one+0x58/0x80
[54016.200619] prune_icache_sb+0x39/0x60
[54016.200868] super_cache_scan+0x167/0x1f0
[54016.201280] do_shrink_slab+0x163/0x340
[54016.201915] shrink_slab+0x1d7/0x2a0
[54016.202142] shrink_node+0x2eb/0x7b0
[54016.202536] balance_pgdat+0x344/0x780
[54016.202774] kswapd+0x205/0x410
[54016.202974] kthread+0xff/0x130
[54016.204307] ret_from_fork+0x2d/0x50
[54016.205216] ret_from_fork_asm+0x1b/0x30
[54016.206208]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[54016.206508] fs_reclaim_acquire+0xa2/0xe0
[54016.207066] kmem_cache_alloc_lru+0x4e/0x600
[54016.207555] btrfs_alloc_inode+0x2d/0x250
[54016.207819] alloc_inode+0x1a/0xc0
[54016.208027] iget5_locked+0xba/0x110
[54016.208248] btrfs_iget+0x43/0xe0
[54016.208484] create_reloc_inode+0x1a0/0x370
[54016.208828] btrfs_relocate_block_group+0x1b7/0x410
[54016.209249] btrfs_relocate_chunk+0x4c/0x1b0
[54016.209799] btrfs_balance+0x8e7/0x11d0
[54016.210045] btrfs_ioctl+0x1a2d/0x2820
[54016.210291] __x64_sys_ioctl+0x8b/0xc0
[54016.210711] do_syscall_64+0x38/0x90
[54016.212038] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[54016.212688]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[54016.213052] join_transaction+0xaf/0x580
[54016.213288] start_transaction+0x1a0/0xad0
[54016.213529] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[54016.213818] kthread+0xff/0x130
[54016.214012] ret_from_fork+0x2d/0x50
[54016.214229] ret_from_fork_asm+0x1b/0x30
[54016.214466]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[54016.214823] __lock_acquire+0x1415/0x2190
[54016.215342] lock_acquire+0xc7/0x2b0
[54016.215572] join_transaction+0x1e4/0x580
[54016.215825] start_transaction+0x1a0/0xad0
[54016.216072] btrfs_commit_inode_delayed_inode+0x5f/0x120
[54016.216377] btrfs_evict_inode+0x273/0x3c0
[54016.216621] evict+0xcc/0x1d0
[54016.216820] inode_lru_isolate+0x14d/0x1e0
[54016.217062] __list_lru_walk_one+0xbe/0x1c0
[54016.217310] list_lru_walk_one+0x58/0x80
[54016.217544] prune_icache_sb+0x39/0x60
[54016.217787] super_cache_scan+0x167/0x1f0
[54016.218029] do_shrink_slab+0x163/0x340
[54016.218263] shrink_slab+0x1d7/0x2a0
[54016.218477] shrink_node+0x2eb/0x7b0
[54016.218700] balance_pgdat+0x344/0x780
[54016.218923] kswapd+0x205/0x410
[54016.219118] kthread+0xff/0x130
[54016.219361] ret_from_fork+0x2d/0x50
[54016.219665] ret_from_fork_asm+0x1b/0x30
[54016.219997]
other info that might help us debug this:
[54016.220470] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[54016.221036] Possible unsafe locking scenario:
[54016.221341] CPU0 CPU1
[54016.221608] ---- ----
[54016.221861] rlock(sb_internal#2);
[54016.222062] lock(fs_reclaim);
[54016.222387] lock(sb_internal#2);
[54016.222732] rlock(btrfs_trans_num_writers);
[54016.222960]
*** DEADLOCK ***
[54016.223265] 4 locks held by kswapd0/50:
[54016.223476] #0: ffffffffb0e62e40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[54016.223948] #1: ffffffffb0e51350 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[54016.224421] #2: ffff8e70735090e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[54016.224951] #3: ffff8e7073509600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[54016.225516]
stack backtrace:
[54016.225794] CPU: 0 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc2+ #1307
[54016.226161] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[54016.226807] Call Trace:
[54016.226961]
[54016.227099] dump_stack_lvl+0x58/0x90
[54016.227777] check_noncircular+0x101/0x110
[54016.227996] __lock_acquire+0x1415/0x2190
[54016.228219] lock_acquire+0xc7/0x2b0
[54016.228432] ? join_transaction+0x1d0/0x580
[54016.228719] ? lock_release+0x134/0x270
[54016.228946] ? join_transaction+0x1d0/0x580
[54016.229191] ? join_transaction+0x3d/0x580
[54016.229430] join_transaction+0x1e4/0x580
[54016.229671] ? join_transaction+0x1d0/0x580
[54016.229918] start_transaction+0x1a0/0xad0
[54016.230206] btrfs_commit_inode_delayed_inode+0x5f/0x120
[54016.230549] btrfs_evict_inode+0x273/0x3c0
[54016.230836] ? lock_release+0x134/0x270
[54016.231088] ? __pfx_wake_bit_function+0x10/0x10
[54016.231409] evict+0xcc/0x1d0
[54016.231716] inode_lru_isolate+0x14d/0x1e0
[54016.232203] __list_lru_walk_one+0xbe/0x1c0
[54016.232451] ? __pfx_inode_lru_isolate+0x10/0x10
[54016.232704] ? __pfx_inode_lru_isolate+0x10/0x10
[54016.232976] list_lru_walk_one+0x58/0x80
[54016.233195] prune_icache_sb+0x39/0x60
[54016.233408] super_cache_scan+0x167/0x1f0
[54016.233636] do_shrink_slab+0x163/0x340
[54016.233852] ? lock_is_held_type+0xe2/0x140
[54016.234315] shrink_slab+0x1d7/0x2a0
[54016.234529] shrink_node+0x2eb/0x7b0
[54016.234731] balance_pgdat+0x344/0x780
[54016.234938] kswapd+0x205/0x410
[54016.235109] ? __pfx_autoremove_wake_function+0x10/0x10
[54016.235390] ? __pfx_kswapd+0x10/0x10
[54016.235588] kthread+0xff/0x130
[54016.235766] ? __pfx_kthread+0x10/0x10
[54016.235971] ret_from_fork+0x2d/0x50
[54016.236166] ? __pfx_kthread+0x10/0x10
[54016.236370] ret_from_fork_asm+0x1b/0x30
[54016.236592]
[54043.387968] BTRFS: device fsid 696e4550-2af6-481f-a03a-57ae371aa1f3 devid 1 transid 157 /dev/mapper/vg0-lv9 scanned by mount (3809962)
[54043.389193] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[54043.389667] BTRFS info (device dm-9): using free space tree
[54043.392263] BTRFS info (device dm-9): auto enabling async discard