[37073.251456] run fstests generic/251 at 2023-11-23 07:15:42
[37073.741547] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1834960 /dev/mapper/vg0-lv0 scanned by mount (615466)
[37073.742021] BTRFS info (device dm-0): first mount of filesystem 442e5b9d-ccad-458f-8dc7-acd1904d321e
[37073.742037] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[37073.742041] BTRFS info (device dm-0): using free space tree
[37073.748159] BTRFS info (device dm-0): auto enabling async discard
[37074.580177] BTRFS: device fsid b5a90163-3aca-423e-a388-ec979baf56af devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mount (615524)
[37074.580829] BTRFS info (device dm-7): first mount of filesystem b5a90163-3aca-423e-a388-ec979baf56af
[37074.580850] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[37074.580855] BTRFS info (device dm-7): use zlib compression, level 3
[37074.580858] BTRFS info (device dm-7): using free space tree
[37074.588397] BTRFS info (device dm-7): auto enabling async discard
[37074.588616] BTRFS info (device dm-7): checking UUID tree
[38116.516506] ======================================================
[38116.516703] WARNING: possible circular locking dependency detected
[38116.516944] 6.7.0-rc2+ #1367 Not tainted
[38116.517124] ------------------------------------------------------
[38116.517332] kswapd0/50 is trying to acquire lock:
[38116.517519] ffff8ec1b5122390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[38116.519845]
but task is already holding lock:
[38116.520060] ffff8ec183130608 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[38116.520511]
which lock already depends on the new lock.
[38116.520793]
the existing dependency chain (in reverse order) is:
[38116.521034]
-> #3 (sb_internal){++++}-{0:0}:
[38116.521240] start_transaction+0x493/0xad0
[38116.521462] btrfs_commit_inode_delayed_inode+0x5f/0x120
[38116.521682] btrfs_evict_inode+0x273/0x3c0
[38116.522038] evict+0xcc/0x1d0
[38116.522396] inode_lru_isolate+0x14d/0x1e0
[38116.522568] __list_lru_walk_one+0xbe/0x1c0
[38116.522903] list_lru_walk_one+0x58/0x80
[38116.523061] prune_icache_sb+0x39/0x60
[38116.523329] super_cache_scan+0x151/0x1d0
[38116.523731] do_shrink_slab+0x164/0x670
[38116.523889] shrink_slab+0x54a/0x8b0
[38116.524041] shrink_node+0x2eb/0x7b0
[38116.524189] balance_pgdat+0x359/0x790
[38116.524341] kswapd+0x205/0x410
[38116.524483] kthread+0xff/0x130
[38116.524636] ret_from_fork+0x2d/0x50
[38116.524790] ret_from_fork_asm+0x1b/0x30
[38116.524948]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[38116.525161] fs_reclaim_acquire+0xa2/0xe0
[38116.525544] kmem_cache_alloc_lru+0x4e/0x720
[38116.525889] btrfs_alloc_inode+0x2d/0x250
[38116.526075] alloc_inode+0x1a/0xc0
[38116.526242] iget5_locked+0xba/0x110
[38116.526410] btrfs_iget+0x43/0xe0
[38116.526574] create_reloc_inode+0x1a0/0x360
[38116.526756] btrfs_relocate_block_group+0x1d2/0x3d0
[38116.527029] btrfs_relocate_chunk+0x4c/0x1b0
[38116.527488] btrfs_balance+0x8e7/0x11d0
[38116.527643] btrfs_ioctl+0x1c06/0x2840
[38116.527791] __x64_sys_ioctl+0x8b/0xc0
[38116.527947] do_syscall_64+0x3e/0xf0
[38116.528326] entry_SYSCALL_64_after_hwframe+0x6e/0x76
[38116.528650]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[38116.528887] join_transaction+0xaf/0x580
[38116.529047] start_transaction+0x1a0/0xad0
[38116.529206] btrfs_dirty_inode+0x40/0xd0
[38116.529356] touch_atime+0x133/0x220
[38116.529517] filemap_read+0x2f0/0x300
[38116.529675] vfs_read+0x194/0x2b0
[38116.529820] ksys_read+0x55/0xd0
[38116.529960] do_syscall_64+0x3e/0xf0
[38116.530113] entry_SYSCALL_64_after_hwframe+0x6e/0x76
[38116.530288]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[38116.530515] __lock_acquire+0x1415/0x2190
[38116.530678] lock_acquire+0xc7/0x2b0
[38116.530826] join_transaction+0x1e4/0x580
[38116.530979] start_transaction+0x1a0/0xad0
[38116.531135] btrfs_commit_inode_delayed_inode+0x5f/0x120
[38116.531342] btrfs_evict_inode+0x273/0x3c0
[38116.531519] evict+0xcc/0x1d0
[38116.531660] inode_lru_isolate+0x14d/0x1e0
[38116.531814] __list_lru_walk_one+0xbe/0x1c0
[38116.531972] list_lru_walk_one+0x58/0x80
[38116.532131] prune_icache_sb+0x39/0x60
[38116.532284] super_cache_scan+0x151/0x1d0
[38116.532435] do_shrink_slab+0x164/0x670
[38116.532588] shrink_slab+0x54a/0x8b0
[38116.532735] shrink_node+0x2eb/0x7b0
[38116.532887] balance_pgdat+0x359/0x790
[38116.533040] kswapd+0x205/0x410
[38116.533215] kthread+0xff/0x130
[38116.533394] ret_from_fork+0x2d/0x50
[38116.533543] ret_from_fork_asm+0x1b/0x30
[38116.534351]
other info that might help us debug this:
[38116.534639] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal
[38116.535004] Possible unsafe locking scenario:
[38116.535258] CPU0 CPU1
[38116.535437] ---- ----
[38116.535593] rlock(sb_internal);
[38116.535730] lock(fs_reclaim);
[38116.535901] lock(sb_internal);
[38116.536079] rlock(btrfs_trans_num_writers);
[38116.536229]
*** DEADLOCK ***
[38116.536475] 3 locks held by kswapd0/50:
[38116.536619] #0: ffffffff9ae64920 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x400/0x790
[38116.536871] #1: ffff8ec1831300e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x33/0x1d0
[38116.537155] #2: ffff8ec183130608 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[38116.537465]
stack backtrace:
[38116.537914] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.7.0-rc2+ #1367
[38116.538133] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[38116.538452] Call Trace:
[38116.538586]
[38116.538702] dump_stack_lvl+0x58/0x90
[38116.539449] check_noncircular+0x101/0x110
[38116.539599] __lock_acquire+0x1415/0x2190
[38116.539746] lock_acquire+0xc7/0x2b0
[38116.539908] ? join_transaction+0x1d0/0x580
[38116.540065] ? lock_release+0x134/0x270
[38116.540218] ? join_transaction+0x1d0/0x580
[38116.540368] ? join_transaction+0x3d/0x580
[38116.540516] join_transaction+0x1e4/0x580
[38116.540663] ? join_transaction+0x1d0/0x580
[38116.540813] start_transaction+0x1a0/0xad0
[38116.540960] btrfs_commit_inode_delayed_inode+0x5f/0x120
[38116.541145] btrfs_evict_inode+0x273/0x3c0
[38116.541296] ? lock_release+0x134/0x270
[38116.541454] ? __pfx_wake_bit_function+0x10/0x10
[38116.541645] evict+0xcc/0x1d0
[38116.541811] inode_lru_isolate+0x14d/0x1e0
[38116.541990] __list_lru_walk_one+0xbe/0x1c0
[38116.542169] ? __pfx_inode_lru_isolate+0x10/0x10
[38116.542355] ? __pfx_inode_lru_isolate+0x10/0x10
[38116.542544] list_lru_walk_one+0x58/0x80
[38116.542715] prune_icache_sb+0x39/0x60
[38116.542892] super_cache_scan+0x151/0x1d0
[38116.543076] do_shrink_slab+0x164/0x670
[38116.543243] shrink_slab+0x54a/0x8b0
[38116.543405] ? shrink_slab+0x420/0x8b0
[38116.543568] ? shrink_slab+0x371/0x8b0
[38116.543744] shrink_node+0x2eb/0x7b0
[38116.543913] balance_pgdat+0x359/0x790
[38116.544097] kswapd+0x205/0x410
[38116.544257] ? __pfx_autoremove_wake_function+0x10/0x10
[38116.544452] ? __pfx_kswapd+0x10/0x10
[38116.547883] kthread+0xff/0x130
[38116.548043] ? __pfx_kthread+0x10/0x10
[38116.548210] ret_from_fork+0x2d/0x50
[38116.548388] ? __pfx_kthread+0x10/0x10
[38116.548561] ret_from_fork_asm+0x1b/0x30
[38116.548736]
[38330.200206] BTRFS warning (device dm-7): failed to trim 1 block group(s), last error -512
[38330.395147] BTRFS info (device dm-0): last unmount of filesystem 442e5b9d-ccad-458f-8dc7-acd1904d321e
[38335.219449] BTRFS info (device dm-7): last unmount of filesystem b5a90163-3aca-423e-a388-ec979baf56af
[38336.825210] BTRFS: device fsid b5a90163-3aca-423e-a388-ec979baf56af devid 1 transid 85 /dev/mapper/vg0-lv7 scanned by mount (634678)
[38336.826664] BTRFS info (device dm-7): first mount of filesystem b5a90163-3aca-423e-a388-ec979baf56af
[38336.827142] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[38336.827518] BTRFS info (device dm-7): use zlib compression, level 3
[38336.827792] BTRFS info (device dm-7): using free space tree
[38336.830306] BTRFS info (device dm-7): auto enabling async discard
[38336.835549] BTRFS info (device dm-7): last unmount of filesystem b5a90163-3aca-423e-a388-ec979baf56af