[38052.368738] run fstests generic/251 at 2023-10-22 07:26:28
[38052.834994] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1708380 /dev/mapper/vg0-lv0 scanned by mount (705208)
[38052.835962] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[38052.835968] BTRFS info (device dm-0): using free space tree
[38052.841106] BTRFS info (device dm-0): auto enabling async discard
[38053.127537] BTRFS: device fsid ca1f3e03-e745-422e-b6be-5e5629fd00cc devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mount (705266)
[38053.127992] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[38053.128000] BTRFS info (device dm-7): use zlib compression, level 3
[38053.128004] BTRFS info (device dm-7): using free space tree
[38053.135586] BTRFS info (device dm-7): auto enabling async discard
[38053.135707] BTRFS info (device dm-7): checking UUID tree
[38913.020765] ======================================================
[38913.020945] WARNING: possible circular locking dependency detected
[38913.021126] 6.6.0-rc5+ #1335 Not tainted
[38913.021277] ------------------------------------------------------
[38913.021453] kswapd0/51 is trying to acquire lock:
[38913.021608] ffff8ddcb9362390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[38913.026312]
but task is already holding lock:
[38913.026525] ffff8ddc55767600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[38913.027118]
which lock already depends on the new lock.
[38913.027403]
the existing dependency chain (in reverse order) is:
[38913.027637]
-> #3 (sb_internal){++++}-{0:0}:
[38913.027844] start_transaction+0x493/0xad0
[38913.028001] btrfs_commit_inode_delayed_inode+0x5f/0x120
[38913.028181] btrfs_evict_inode+0x273/0x3c0
[38913.028334] evict+0xcc/0x1d0
[38913.028951] inode_lru_isolate+0x14d/0x1e0
[38913.029110] __list_lru_walk_one+0xbe/0x1c0
[38913.029587] list_lru_walk_one+0x58/0x80
[38913.029736] prune_icache_sb+0x39/0x60
[38913.029885] super_cache_scan+0x167/0x1f0
[38913.030312] do_shrink_slab+0x163/0x340
[38913.030592] shrink_slab+0x1d7/0x2a0
[38913.030736] shrink_node+0x2eb/0x7b0
[38913.030881] balance_pgdat+0x344/0x780
[38913.031033] kswapd+0x205/0x410
[38913.031179] kthread+0xff/0x130
[38913.031489] ret_from_fork+0x2d/0x50
[38913.031930] ret_from_fork_asm+0x1b/0x30
[38913.032345]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[38913.032584] fs_reclaim_acquire+0xa2/0xe0
[38913.032865] kmem_cache_alloc_lru+0x4e/0x600
[38913.033287] btrfs_alloc_inode+0x2d/0x250
[38913.033440] alloc_inode+0x1a/0xc0
[38913.033606] iget5_locked+0xba/0x110
[38913.033766] btrfs_iget+0x43/0xe0
[38913.033917] create_reloc_inode+0x1a0/0x360
[38913.034101] btrfs_relocate_block_group+0x1d2/0x3d0
[38913.034293] btrfs_relocate_chunk+0x4c/0x1b0
[38913.034721] btrfs_balance+0x8e7/0x11d0
[38913.034871] btrfs_ioctl+0x1c25/0x2860
[38913.035022] __x64_sys_ioctl+0x8b/0xc0
[38913.035181] do_syscall_64+0x38/0x90
[38913.035566] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[38913.035945]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[38913.036218] join_transaction+0xaf/0x580
[38913.036396] start_transaction+0x1a0/0xad0
[38913.036576] btrfs_dirty_inode+0x40/0xd0
[38913.036768] touch_atime+0x133/0x220
[38913.036949] iterate_dir+0x117/0x180
[38913.037134] __x64_sys_getdents64+0x6a/0x120
[38913.037325] do_syscall_64+0x38/0x90
[38913.037506] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[38913.037723]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[38913.038010] __lock_acquire+0x1415/0x2190
[38913.038480] lock_acquire+0xc7/0x2b0
[38913.038657] join_transaction+0x1e4/0x580
[38913.038844] start_transaction+0x1a0/0xad0
[38913.039022] btrfs_commit_inode_delayed_inode+0x5f/0x120
[38913.039220] btrfs_evict_inode+0x273/0x3c0
[38913.039394] evict+0xcc/0x1d0
[38913.039566] inode_lru_isolate+0x14d/0x1e0
[38913.039737] __list_lru_walk_one+0xbe/0x1c0
[38913.039891] list_lru_walk_one+0x58/0x80
[38913.040042] prune_icache_sb+0x39/0x60
[38913.040195] super_cache_scan+0x167/0x1f0
[38913.040351] do_shrink_slab+0x163/0x340
[38913.040497] shrink_slab+0x1d7/0x2a0
[38913.040643] shrink_node+0x2eb/0x7b0
[38913.045780] balance_pgdat+0x344/0x780
[38913.045969] kswapd+0x205/0x410
[38913.046155] kthread+0xff/0x130
[38913.046325] ret_from_fork+0x2d/0x50
[38913.046508] ret_from_fork_asm+0x1b/0x30
[38913.046704]
other info that might help us debug this:
[38913.047015] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal
[38913.047418] Possible unsafe locking scenario:
[38913.047676] CPU0 CPU1
[38913.047864] ---- ----
[38913.048064] rlock(sb_internal);
[38913.048230] lock(fs_reclaim);
[38913.048440] lock(sb_internal);
[38913.048641] rlock(btrfs_trans_num_writers);
[38913.048834]
*** DEADLOCK ***
[38913.049125] 4 locks held by kswapd0/51:
[38913.049339] #0: ffffffff8fe62ea0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[38913.049646] #1: ffffffff8fe513b0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[38913.049961] #2: ffff8ddc557670e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[38913.050287] #3: ffff8ddc55767600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[38913.050604]
stack backtrace:
[38913.050811] CPU: 1 PID: 51 Comm: kswapd0 Not tainted 6.6.0-rc5+ #1335
[38913.051017] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[38913.051309] Call Trace:
[38913.051468]
[38913.051614] dump_stack_lvl+0x58/0x90
[38913.052085] check_noncircular+0x101/0x110
[38913.052292] __lock_acquire+0x1415/0x2190
[38913.052477] lock_acquire+0xc7/0x2b0
[38913.052652] ? join_transaction+0x1d0/0x580
[38913.052844] ? lock_release+0x134/0x270
[38913.053033] ? join_transaction+0x1d0/0x580
[38913.053223] ? join_transaction+0x3d/0x580
[38913.053408] join_transaction+0x1e4/0x580
[38913.053599] ? join_transaction+0x1d0/0x580
[38913.053793] start_transaction+0x1a0/0xad0
[38913.053961] btrfs_commit_inode_delayed_inode+0x5f/0x120
[38913.054176] btrfs_evict_inode+0x273/0x3c0
[38913.054359] ? lock_release+0x134/0x270
[38913.054526] ? __pfx_wake_bit_function+0x10/0x10
[38913.054905] evict+0xcc/0x1d0
[38913.055072] inode_lru_isolate+0x14d/0x1e0
[38913.055259] __list_lru_walk_one+0xbe/0x1c0
[38913.055442] ? __pfx_inode_lru_isolate+0x10/0x10
[38913.055619] ? __pfx_inode_lru_isolate+0x10/0x10
[38913.055799] list_lru_walk_one+0x58/0x80
[38913.055948] prune_icache_sb+0x39/0x60
[38913.056102] super_cache_scan+0x167/0x1f0
[38913.056255] do_shrink_slab+0x163/0x340
[38913.056398] shrink_slab+0x1d7/0x2a0
[38913.056539] shrink_node+0x2eb/0x7b0
[38913.056695] balance_pgdat+0x344/0x780
[38913.056853] kswapd+0x205/0x410
[38913.056999] ? __pfx_autoremove_wake_function+0x10/0x10
[38913.057195] ? __pfx_kswapd+0x10/0x10
[38913.057370] kthread+0xff/0x130
[38913.057539] ? __pfx_kthread+0x10/0x10
[38913.057725] ret_from_fork+0x2d/0x50
[38913.057892] ? __pfx_kthread+0x10/0x10
[38913.058066] ret_from_fork_asm+0x1b/0x30
[38913.058249]
[39155.768467] BTRFS warning (device dm-7): failed to trim 2 block group(s), last error -512
[39160.777562] BTRFS: device fsid ca1f3e03-e745-422e-b6be-5e5629fd00cc devid 1 transid 85 /dev/mapper/vg0-lv7 scanned by mount (719205)
[39160.778423] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[39160.778677] BTRFS info (device dm-7): use zlib compression, level 3
[39160.778892] BTRFS info (device dm-7): using free space tree
[39160.781079] BTRFS info (device dm-7): auto enabling async discard