[32601.701459] run fstests generic/251 at 2023-07-14 05:57:38
[32602.146810] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2311226 /dev/mapper/vg0-lv0 scanned by mount (821087)
[32602.148183] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[32602.148189] BTRFS info (device dm-0): using free space tree
[32602.151546] BTRFS info (device dm-0): auto enabling async discard
[32602.381468] BTRFS: device fsid 4ed81a5f-70d5-465a-a43d-d8e72998cf76 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (821135)
[32602.400066] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[32602.400076] BTRFS info (device dm-9): setting incompat feature flag for COMPRESS_ZSTD (0x10)
[32602.400079] BTRFS info (device dm-9): use zstd compression, level 3
[32602.400082] BTRFS info (device dm-9): turning on async discard
[32602.400084] BTRFS info (device dm-9): disk space caching is enabled
[32602.403921] BTRFS info (device dm-9): checking UUID tree
[32877.559754] ======================================================
[32877.560013] WARNING: possible circular locking dependency detected
[32877.560290] 6.5.0-rc1+ #1239 Not tainted
[32877.560472] ------------------------------------------------------
[32877.560716] kswapd0/47 is trying to acquire lock:
[32877.560922] ffff8c141d286378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x19f/0x550
[32877.561286]
but task is already holding lock:
[32877.561518] ffff8c13dd15c600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[32877.561909]
which lock already depends on the new lock.
[32877.562223]
the existing dependency chain (in reverse order) is:
[32877.562516]
-> #3 (sb_internal#2){++++}-{0:0}:
[32877.562752] start_transaction+0x401/0x730
[32877.562947] btrfs_commit_inode_delayed_inode+0x5f/0x120
[32877.563238] btrfs_evict_inode+0x273/0x3c0
[32877.563496] evict+0xcc/0x1d0
[32877.563648] inode_lru_isolate+0x14d/0x1e0
[32877.563834] __list_lru_walk_one+0xbe/0x1c0
[32877.564040] list_lru_walk_one+0x58/0x80
[32877.564221] prune_icache_sb+0x39/0x60
[32877.564395] super_cache_scan+0x161/0x1f0
[32877.564623] do_shrink_slab+0x163/0x340
[32877.564876] shrink_slab+0x1d7/0x2a0
[32877.565117] shrink_node+0x2eb/0x7b0
[32877.565339] balance_pgdat+0x344/0x780
[32877.565579] kswapd+0x205/0x410
[32877.565785] kthread+0xfc/0x130
[32877.566007] ret_from_fork+0x29/0x50
[32877.566235]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[32877.566544] fs_reclaim_acquire+0xa5/0xe0
[32877.566794] kmem_cache_alloc_lru+0x4e/0x570
[32877.567056] btrfs_alloc_inode+0x2d/0x250
[32877.567309] alloc_inode+0x1a/0xc0
[32877.567466] iget5_locked+0xba/0x110
[32877.567630] btrfs_iget+0x43/0xe0
[32877.567782] create_reloc_inode+0x19d/0x370
[32877.567986] btrfs_relocate_block_group+0x1b7/0x410
[32877.568227] btrfs_relocate_chunk+0x4c/0x190
[32877.568491] btrfs_balance+0x8e7/0x11d0
[32877.568731] btrfs_ioctl+0x1d3d/0x2900
[32877.568972] __x64_sys_ioctl+0x8b/0xc0
[32877.569215] do_syscall_64+0x38/0x90
[32877.569444] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[32877.569743]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[32877.570130] join_transaction+0xdb/0x550
[32877.570375] start_transaction+0x24f/0x730
[32877.570630] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[32877.570914] kthread+0xfc/0x130
[32877.571118] ret_from_fork+0x29/0x50
[32877.571341]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[32877.571700] __lock_acquire+0x1415/0x2190
[32877.571967] lock_acquire+0xc7/0x2b0
[32877.572193] join_transaction+0x1cd/0x550
[32877.572407] start_transaction+0x24f/0x730
[32877.572648] btrfs_commit_inode_delayed_inode+0x5f/0x120
[32877.572904] btrfs_evict_inode+0x273/0x3c0
[32877.573092] evict+0xcc/0x1d0
[32877.573233] inode_lru_isolate+0x14d/0x1e0
[32877.573415] __list_lru_walk_one+0xbe/0x1c0
[32877.573600] list_lru_walk_one+0x58/0x80
[32877.573776] prune_icache_sb+0x39/0x60
[32877.573956] super_cache_scan+0x161/0x1f0
[32877.574134] do_shrink_slab+0x163/0x340
[32877.574306] shrink_slab+0x1d7/0x2a0
[32877.574466] shrink_node+0x2eb/0x7b0
[32877.574626] balance_pgdat+0x344/0x780
[32877.574798] kswapd+0x205/0x410
[32877.574957] kthread+0xfc/0x130
[32877.575102] ret_from_fork+0x29/0x50
[32877.575264]
other info that might help us debug this:
[32877.575564] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[32877.575982] Possible unsafe locking scenario:
[32877.576209] CPU0 CPU1
[32877.576385] ---- ----
[32877.576560] rlock(sb_internal#2);
[32877.576700] lock(fs_reclaim);
[32877.576984] lock(sb_internal#2);
[32877.577218] rlock(btrfs_trans_num_writers);
[32877.577392]
*** DEADLOCK ***
[32877.577620] 4 locks held by kswapd0/47:
[32877.577772] #0: ffffffff8ce62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[32877.578098] #1: ffffffff8ce507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[32877.578447] #2: ffff8c13dd15c0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[32877.578821] #3: ffff8c13dd15c600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[32877.579213]
stack backtrace:
[32877.579386] CPU: 0 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc1+ #1239
[32877.579632] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[32877.579967] Call Trace:
[32877.580069]
[32877.580160] dump_stack_lvl+0x58/0x90
[32877.580309] check_noncircular+0x101/0x110
[32877.580472] __lock_acquire+0x1415/0x2190
[32877.580633] lock_acquire+0xc7/0x2b0
[32877.580775] ? join_transaction+0x19f/0x550
[32877.580953] ? lock_release+0x134/0x270
[32877.581105] join_transaction+0x1cd/0x550
[32877.581264] ? join_transaction+0x19f/0x550
[32877.581472] start_transaction+0x24f/0x730
[32877.581696] btrfs_commit_inode_delayed_inode+0x5f/0x120
[32877.581991] btrfs_evict_inode+0x273/0x3c0
[32877.582199] ? lock_release+0x134/0x270
[32877.582376] ? __pfx_wake_bit_function+0x10/0x10
[32877.582560] evict+0xcc/0x1d0
[32877.582685] inode_lru_isolate+0x14d/0x1e0
[32877.582845] __list_lru_walk_one+0xbe/0x1c0
[32877.583022] ? __pfx_inode_lru_isolate+0x10/0x10
[32877.583204] ? __pfx_inode_lru_isolate+0x10/0x10
[32877.583386] list_lru_walk_one+0x58/0x80
[32877.583541] prune_icache_sb+0x39/0x60
[32877.583693] super_cache_scan+0x161/0x1f0
[32877.583852] do_shrink_slab+0x163/0x340
[32877.584019] ? lock_is_held_type+0xe2/0x140
[32877.584185] shrink_slab+0x1d7/0x2a0
[32877.584330] shrink_node+0x2eb/0x7b0
[32877.584475] balance_pgdat+0x344/0x780
[32877.584629] kswapd+0x205/0x410
[32877.584758] ? __pfx_autoremove_wake_function+0x10/0x10
[32877.584977] ? __pfx_kswapd+0x10/0x10
[32877.585125] kthread+0xfc/0x130
[32877.585253] ? __pfx_kthread+0x10/0x10
[32877.585401] ret_from_fork+0x29/0x50
[32877.585548]
[33376.951580] BTRFS: device fsid 4ed81a5f-70d5-465a-a43d-d8e72998cf76 devid 1 transid 71 /dev/mapper/vg0-lv9 scanned by mount (833347)
[33376.953292] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[33376.953772] BTRFS info (device dm-9): use zstd compression, level 3
[33376.954179] BTRFS info (device dm-9): turning on async discard
[33376.954740] BTRFS info (device dm-9): disk space caching is enabled