[11350.252922] run fstests generic/251 at 2023-08-11 00:01:26
[11350.731699] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1412655 /dev/mapper/vg0-lv0 scanned by mount (1541110)
[11350.733109] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[11350.733117] BTRFS info (device dm-0): using free space tree
[11350.738186] BTRFS info (device dm-0): auto enabling async discard
[11351.022731] BTRFS: device fsid 7a773925-cf23-4ce7-bf2a-d4fe737a2257 devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mkfs.btrfs (1541158)
[11351.050120] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[11351.050130] BTRFS info (device dm-7): using free space tree
[11351.057449] BTRFS info (device dm-7): auto enabling async discard
[11351.057710] BTRFS info (device dm-7): checking UUID tree
[11978.929497] ======================================================
[11978.929764] WARNING: possible circular locking dependency detected
[11978.929966] 6.5.0-rc5+ #1267 Not tainted
[11978.930123] ------------------------------------------------------
[11978.930320] kswapd0/47 is trying to acquire lock:
[11978.930505] ffff908256ef6388 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[11978.930813]
but task is already holding lock:
[11978.931045] ffff9082b72e5600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11978.931398]
which lock already depends on the new lock.
[11978.931763]
the existing dependency chain (in reverse order) is:
[11978.932028]
-> #3 (sb_internal){++++}-{0:0}:
[11978.932265] start_transaction+0x3f9/0x740
[11978.932448] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11978.932644] btrfs_evict_inode+0x273/0x3c0
[11978.932814] evict+0xcc/0x1d0
[11978.932989] inode_lru_isolate+0x14d/0x1e0
[11978.933165] __list_lru_walk_one+0xbe/0x1c0
[11978.933379] list_lru_walk_one+0x58/0x80
[11978.933556] prune_icache_sb+0x39/0x60
[11978.933722] super_cache_scan+0x161/0x1f0
[11978.933951] do_shrink_slab+0x163/0x340
[11978.934209] shrink_slab+0x1d7/0x2a0
[11978.934403] shrink_node+0x2eb/0x7b0
[11978.934591] balance_pgdat+0x344/0x780
[11978.934764] kswapd+0x205/0x410
[11978.934952] kthread+0xfc/0x130
[11978.935146] ret_from_fork+0x2d/0x50
[11978.935318] ret_from_fork_asm+0x1b/0x30
[11978.935499]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[11978.935731] fs_reclaim_acquire+0xa5/0xe0
[11978.935917] kmem_cache_alloc_lru+0x4e/0x570
[11978.936145] btrfs_alloc_inode+0x2d/0x250
[11978.936325] alloc_inode+0x1a/0xc0
[11978.936487] iget5_locked+0xba/0x110
[11978.936651] btrfs_iget+0x43/0xe0
[11978.936807] create_reloc_inode+0x19d/0x370
[11978.936979] btrfs_relocate_block_group+0x1b7/0x410
[11978.937167] btrfs_relocate_chunk+0x4c/0x1b0
[11978.937345] btrfs_balance+0x8e7/0x11d0
[11978.937518] btrfs_ioctl+0x1d3d/0x2900
[11978.937683] __x64_sys_ioctl+0x8b/0xc0
[11978.937845] do_syscall_64+0x38/0x90
[11978.938011] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11978.938200]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[11978.938459] join_transaction+0xb4/0x590
[11978.938630] start_transaction+0x187/0x740
[11978.938805] btrfs_dirty_inode+0x40/0xd0
[11978.938969] touch_atime+0x15b/0x280
[11978.939131] iterate_dir+0x117/0x180
[11978.939295] __x64_sys_getdents64+0x6a/0x120
[11978.939474] do_syscall_64+0x38/0x90
[11978.939636] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11978.939821]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[11978.940072] __lock_acquire+0x1415/0x2190
[11978.940246] lock_acquire+0xc7/0x2b0
[11978.940415] join_transaction+0x1de/0x590
[11978.940587] start_transaction+0x187/0x740
[11978.940758] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11978.940948] btrfs_evict_inode+0x273/0x3c0
[11978.941119] evict+0xcc/0x1d0
[11978.941271] inode_lru_isolate+0x14d/0x1e0
[11978.941447] __list_lru_walk_one+0xbe/0x1c0
[11978.941618] list_lru_walk_one+0x58/0x80
[11978.941785] prune_icache_sb+0x39/0x60
[11978.941951] super_cache_scan+0x161/0x1f0
[11978.942123] do_shrink_slab+0x163/0x340
[11978.942289] shrink_slab+0x1d7/0x2a0
[11978.943069] shrink_node+0x2eb/0x7b0
[11978.943235] balance_pgdat+0x344/0x780
[11978.943406] kswapd+0x205/0x410
[11978.943559] kthread+0xfc/0x130
[11978.943712] ret_from_fork+0x2d/0x50
[11978.943876] ret_from_fork_asm+0x1b/0x30
[11978.944045]
other info that might help us debug this:
[11978.944352] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal
[11978.944717] Possible unsafe locking scenario:
[11978.944947] CPU0 CPU1
[11978.945118] ---- ----
[11978.945284] rlock(sb_internal);
[11978.945434] lock(fs_reclaim);
[11978.945623] lock(sb_internal);
[11978.945815] rlock(btrfs_trans_num_writers);
[11978.945976]
*** DEADLOCK ***
[11978.946244] 4 locks held by kswapd0/47:
[11978.946405] #0: ffffffffa8e62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[11978.946690] #1: ffffffffa8e507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[11978.946967] #2: ffff9082b72e50e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[11978.947272] #3: ffff9082b72e5600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11978.947581]
stack backtrace:
[11978.947787] CPU: 0 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc5+ #1267
[11978.947994] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[11978.948281] Call Trace:
[11978.948418]
[11978.948548] dump_stack_lvl+0x58/0x90
[11978.948706] check_noncircular+0x101/0x110
[11978.948870] __lock_acquire+0x1415/0x2190
[11978.949036] lock_acquire+0xc7/0x2b0
[11978.949190] ? join_transaction+0x1af/0x590
[11978.949352] ? lock_release+0x134/0x270
[11978.949512] join_transaction+0x1de/0x590
[11978.949675] ? join_transaction+0x1af/0x590
[11978.949843] start_transaction+0x187/0x740
[11978.950003] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11978.950185] btrfs_evict_inode+0x273/0x3c0
[11978.950351] ? lock_release+0x134/0x270
[11978.950514] ? __pfx_wake_bit_function+0x10/0x10
[11978.950684] evict+0xcc/0x1d0
[11978.950826] inode_lru_isolate+0x14d/0x1e0
[11978.950989] __list_lru_walk_one+0xbe/0x1c0
[11978.951151] ? __pfx_inode_lru_isolate+0x10/0x10
[11978.951322] ? __pfx_inode_lru_isolate+0x10/0x10
[11978.951500] list_lru_walk_one+0x58/0x80
[11978.951663] prune_icache_sb+0x39/0x60
[11978.951826] super_cache_scan+0x161/0x1f0
[11978.951986] do_shrink_slab+0x163/0x340
[11978.952147] shrink_slab+0x1d7/0x2a0
[11978.952303] shrink_node+0x2eb/0x7b0
[11978.952462] balance_pgdat+0x344/0x780
[11978.952621] kswapd+0x205/0x410
[11978.952768] ? __pfx_autoremove_wake_function+0x10/0x10
[11978.952949] ? __pfx_kswapd+0x10/0x10
[11978.953101] kthread+0xfc/0x130
[11978.953247] ? __pfx_kthread+0x10/0x10
[11978.953411] ret_from_fork+0x2d/0x50
[11978.953594] ? __pfx_kthread+0x10/0x10
[11978.953752] ret_from_fork_asm+0x1b/0x30
[11978.953915]
[12249.670006] BTRFS warning (device dm-7): failed to trim 3 block group(s), last error -512
[12256.352670] BTRFS: device fsid 7a773925-cf23-4ce7-bf2a-d4fe737a2257 devid 1 transid 66 /dev/mapper/vg0-lv7 scanned by mount (1549607)
[12256.354059] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[12256.354332] BTRFS info (device dm-7): using free space tree
[12256.357283] BTRFS info (device dm-7): auto enabling async discard