[46960.551092] run fstests generic/251 at 2023-11-22 09:57:56
[46961.150952] BTRFS: device fsid 13921637-4436-40f4-9cb4-e48f1103a380 devid 1 transid 2866851 /dev/mapper/vg0-lv0 scanned by mount (3815485)
[46961.151996] BTRFS info (device dm-0): first mount of filesystem 13921637-4436-40f4-9cb4-e48f1103a380
[46961.152013] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[46961.152018] BTRFS info (device dm-0): using free space tree
[46961.156036] BTRFS info (device dm-0): auto enabling async discard
[46961.387924] BTRFS: device fsid eaf23d3f-b507-41cd-abee-07398dda8d95 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (3815543)
[46961.388343] BTRFS info (device dm-9): first mount of filesystem eaf23d3f-b507-41cd-abee-07398dda8d95
[46961.388357] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[46961.388363] BTRFS info (device dm-9): using free space tree
[46961.395558] BTRFS info (device dm-9): auto enabling async discard
[46961.395687] BTRFS info (device dm-9): checking UUID tree
[47444.315746] ======================================================
[47444.315967] WARNING: possible circular locking dependency detected
[47444.316184] 6.7.0-rc2+ #1366 Not tainted
[47444.316326] ------------------------------------------------------
[47444.316551] kswapd0/50 is trying to acquire lock:
[47444.316724] ffff9b83945e6390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[47444.318971]
but task is already holding lock:
[47444.319178] ffff9b839ef63608 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[47444.319676]
which lock already depends on the new lock.
[47444.319958]
the existing dependency chain (in reverse order) is:
[47444.320216]
-> #3 (sb_internal#2){++++}-{0:0}:
[47444.320426] start_transaction+0x493/0xad0
[47444.320593] btrfs_commit_inode_delayed_inode+0x5f/0x120
[47444.320804] btrfs_evict_inode+0x273/0x3c0
[47444.321183] evict+0xcc/0x1d0
[47444.321461] inode_lru_isolate+0x14d/0x1e0
[47444.321629] __list_lru_walk_one+0xbe/0x1c0
[47444.322131] list_lru_walk_one+0x58/0x80
[47444.322293] prune_icache_sb+0x39/0x60
[47444.322557] super_cache_scan+0x151/0x1d0
[47444.322918] do_shrink_slab+0x164/0x670
[47444.323358] shrink_slab+0x54a/0x8b0
[47444.323506] shrink_node+0x2eb/0x7b0
[47444.323653] balance_pgdat+0x359/0x790
[47444.323811] kswapd+0x205/0x410
[47444.323944] kthread+0xff/0x130
[47444.324078] ret_from_fork+0x2d/0x50
[47444.324226] ret_from_fork_asm+0x1b/0x30
[47444.324387]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[47444.324606] fs_reclaim_acquire+0xa2/0xe0
[47444.324953] kmem_cache_alloc_lru+0x4e/0x720
[47444.325280] btrfs_alloc_inode+0x2d/0x250
[47444.325459] alloc_inode+0x1a/0xc0
[47444.325601] iget5_locked+0xba/0x110
[47444.325758] btrfs_iget+0x43/0xe0
[47444.325896] create_reloc_inode+0x1a0/0x360
[47444.326065] btrfs_relocate_block_group+0x1d2/0x3d0
[47444.326255] btrfs_relocate_chunk+0x4c/0x1b0
[47444.326592] btrfs_balance+0x8e7/0x11d0
[47444.326760] btrfs_ioctl+0x1c06/0x2840
[47444.326916] __x64_sys_ioctl+0x8b/0xc0
[47444.327076] do_syscall_64+0x3e/0xf0
[47444.327425] entry_SYSCALL_64_after_hwframe+0x6e/0x76
[47444.327764]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[47444.328012] join_transaction+0xaf/0x580
[47444.328173] start_transaction+0x1a0/0xad0
[47444.328340] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[47444.328524] kthread+0xff/0x130
[47444.328662] ret_from_fork+0x2d/0x50
[47444.328810] ret_from_fork_asm+0x1b/0x30
[47444.328972]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[47444.329208] __lock_acquire+0x1415/0x2190
[47444.329372] lock_acquire+0xc7/0x2b0
[47444.329521] join_transaction+0x1e4/0x580
[47444.329693] start_transaction+0x1a0/0xad0
[47444.329860] btrfs_commit_inode_delayed_inode+0x5f/0x120
[47444.330067] btrfs_evict_inode+0x273/0x3c0
[47444.330234] evict+0xcc/0x1d0
[47444.330362] inode_lru_isolate+0x14d/0x1e0
[47444.330528] __list_lru_walk_one+0xbe/0x1c0
[47444.330703] list_lru_walk_one+0x58/0x80
[47444.330865] prune_icache_sb+0x39/0x60
[47444.331021] super_cache_scan+0x151/0x1d0
[47444.331185] do_shrink_slab+0x164/0x670
[47444.331343] shrink_slab+0x54a/0x8b0
[47444.331492] shrink_node+0x2eb/0x7b0
[47444.331640] balance_pgdat+0x359/0x790
[47444.331798] kswapd+0x205/0x410
[47444.331934] kthread+0xff/0x130
[47444.332068] ret_from_fork+0x2d/0x50
[47444.332216] ret_from_fork_asm+0x1b/0x30
[47444.332378]
other info that might help us debug this:
[47444.332656] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[47444.333036] Possible unsafe locking scenario:
[47444.333241] CPU0 CPU1
[47444.333404] ---- ----
[47444.333566] rlock(sb_internal#2);
[47444.333699] lock(fs_reclaim);
[47444.333899] lock(sb_internal#2);
[47444.334107] rlock(btrfs_trans_num_writers);
[47444.334264]
*** DEADLOCK ***
[47444.334471] 3 locks held by kswapd0/50:
[47444.334609] #0: ffffffff9be64920 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x400/0x790
[47444.334901] #1: ffff9b839ef630e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x33/0x1d0
[47444.335229] #2: ffff9b839ef63608 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[47444.335577]
stack backtrace:
[47444.335926] CPU: 0 PID: 50 Comm: kswapd0 Not tainted 6.7.0-rc2+ #1366
[47444.336154] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[47444.336484] Call Trace:
[47444.336594]
[47444.336867] dump_stack_lvl+0x58/0x90
[47444.337483] check_noncircular+0x101/0x110
[47444.337633] __lock_acquire+0x1415/0x2190
[47444.337816] lock_acquire+0xc7/0x2b0
[47444.337948] ? join_transaction+0x1d0/0x580
[47444.338103] ? lock_release+0x134/0x270
[47444.338242] ? join_transaction+0x1d0/0x580
[47444.338393] ? join_transaction+0x3d/0x580
[47444.338541] join_transaction+0x1e4/0x580
[47444.338691] ? join_transaction+0x1d0/0x580
[47444.338842] start_transaction+0x1a0/0xad0
[47444.338991] btrfs_commit_inode_delayed_inode+0x5f/0x120
[47444.339178] btrfs_evict_inode+0x273/0x3c0
[47444.339329] ? lock_release+0x134/0x270
[47444.339467] ? __pfx_wake_bit_function+0x10/0x10
[47444.339636] evict+0xcc/0x1d0
[47444.339753] inode_lru_isolate+0x14d/0x1e0
[47444.339903] __list_lru_walk_one+0xbe/0x1c0
[47444.340053] ? __pfx_inode_lru_isolate+0x10/0x10
[47444.340222] ? __pfx_inode_lru_isolate+0x10/0x10
[47444.340387] list_lru_walk_one+0x58/0x80
[47444.340530] prune_icache_sb+0x39/0x60
[47444.340676] super_cache_scan+0x151/0x1d0
[47444.340823] do_shrink_slab+0x164/0x670
[47444.340965] shrink_slab+0x54a/0x8b0
[47444.341096] ? shrink_slab+0x420/0x8b0
[47444.341233] ? shrink_slab+0x371/0x8b0
[47444.341369] shrink_node+0x2eb/0x7b0
[47444.341501] balance_pgdat+0x359/0x790
[47444.341641] kswapd+0x205/0x410
[47444.341845] ? __pfx_autoremove_wake_function+0x10/0x10
[47444.342054] ? __pfx_kswapd+0x10/0x10
[47444.342196] kthread+0xff/0x130
[47444.342317] ? __pfx_kthread+0x10/0x10
[47444.342455] ret_from_fork+0x2d/0x50
[47444.342587] ? __pfx_kthread+0x10/0x10
[47444.342731] ret_from_fork_asm+0x1b/0x30
[47444.342878]
[47731.291542] BTRFS warning (device dm-9): failed to trim 11 block group(s), last error -512
[47731.323966] BTRFS info (device dm-0): last unmount of filesystem 13921637-4436-40f4-9cb4-e48f1103a380
[47733.711647] BTRFS info (device dm-9): last unmount of filesystem eaf23d3f-b507-41cd-abee-07398dda8d95
[47735.407286] BTRFS: device fsid eaf23d3f-b507-41cd-abee-07398dda8d95 devid 1 transid 196 /dev/mapper/vg0-lv9 scanned by mount (3827295)
[47735.408606] BTRFS info (device dm-9): first mount of filesystem eaf23d3f-b507-41cd-abee-07398dda8d95
[47735.408928] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[47735.409232] BTRFS info (device dm-9): using free space tree
[47735.411985] BTRFS info (device dm-9): auto enabling async discard
[47735.417712] BTRFS info (device dm-9): last unmount of filesystem eaf23d3f-b507-41cd-abee-07398dda8d95