[54876.690039] run fstests generic/251 at 2023-09-07 12:07:55
[54877.389298] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2671084 /dev/mapper/vg0-lv0 scanned by mount (3964290)
[54877.390005] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[54877.390011] BTRFS info (device dm-0): using free space tree
[54877.394830] BTRFS info (device dm-0): auto enabling async discard
[54877.603680] BTRFS: device fsid 6b31eb64-7197-4274-b0ee-c6a476537f68 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (3964338)
[54877.628313] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[54877.628326] BTRFS info (device dm-9): turning on sync discard
[54877.628330] BTRFS info (device dm-9): enabling free space tree
[54877.628333] BTRFS info (device dm-9): using free space tree
[54877.628931] BTRFS info: devid 1 device path /dev/mapper/vg0-lv9 changed to /dev/dm-9 scanned by systemd-udevd (3963211)
[54877.630106] BTRFS info: devid 1 device path /dev/dm-9 changed to /dev/mapper/vg0-lv9 scanned by systemd-udevd (3963211)
[54877.636328] BTRFS info (device dm-9): creating free space tree
[54877.638080] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[54877.638086] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[54877.646804] BTRFS info (device dm-9): cleaning free space cache v1
[54877.654812] BTRFS info (device dm-9): checking UUID tree

[55402.427510] ======================================================
[55402.427856] WARNING: possible circular locking dependency detected
[55402.428239] 6.5.0+ #1294 Not tainted
[55402.428383] ------------------------------------------------------
[55402.428735] kswapd0/50 is trying to acquire lock:
[55402.429018] ffff90be82742388 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[55402.431471] 
               but task is already holding lock:
[55402.431820] ffff90bee94bc600 (sb_internal#2){++++}-{0:0}, at: evict_refill_and_join+0x7d/0xe0
[55402.432304] 
               which lock already depends on the new lock.

[55402.432764] 
               the existing dependency chain (in reverse order) is:
[55402.433201] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[55402.433542]        start_transaction+0x3f9/0x740
[55402.433806]        evict_refill_and_join+0x7d/0xe0
[55402.434087]        btrfs_evict_inode+0x2ff/0x3c0
[55402.434356]        evict+0xcc/0x1d0
[55402.434866]        inode_lru_isolate+0x14d/0x1e0
[55402.435122]        __list_lru_walk_one+0xbe/0x1c0
[55402.435618]        list_lru_walk_one+0x58/0x80
[55402.435895]        prune_icache_sb+0x39/0x60
[55402.436139]        super_cache_scan+0x167/0x1f0
[55402.436566]        do_shrink_slab+0x163/0x340
[55402.436920]        shrink_slab+0x1d7/0x2a0
[55402.437067]        shrink_node+0x2eb/0x7b0
[55402.437292]        balance_pgdat+0x344/0x780
[55402.437538]        kswapd+0x205/0x410
[55402.437753]        kthread+0xfc/0x130
[55402.438160]        ret_from_fork+0x2d/0x50
[55402.438575]        ret_from_fork_asm+0x1b/0x30
[55402.439011] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[55402.439342]        fs_reclaim_acquire+0xa5/0xe0
[55402.440023]        kmem_cache_alloc_lru+0x4e/0x570
[55402.440412]        btrfs_alloc_inode+0x2d/0x250
[55402.440867]        alloc_inode+0x1a/0xc0
[55402.441089]        iget5_locked+0xba/0x110
[55402.441331]        btrfs_iget+0x43/0xe0
[55402.441558]        create_reloc_inode+0x19d/0x370
[55402.442035]        btrfs_relocate_block_group+0x1b7/0x410
[55402.442346]        btrfs_relocate_chunk+0x4c/0x1b0
[55402.442812]        btrfs_balance+0x8e7/0x11d0
[55402.443067]        btrfs_ioctl+0x1d3d/0x2900
[55402.443523]        __x64_sys_ioctl+0x8b/0xc0
[55402.443980]        do_syscall_64+0x38/0x90
[55402.444474]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[55402.445165] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[55402.445659]        join_transaction+0xb4/0x590
[55402.445924]        start_transaction+0x187/0x740
[55402.446185]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[55402.446777]        kthread+0xfc/0x130
[55402.446999]        ret_from_fork+0x2d/0x50
[55402.447243]        ret_from_fork_asm+0x1b/0x30
[55402.447506] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[55402.447904]        __lock_acquire+0x1415/0x2190
[55402.448401]        lock_acquire+0xc7/0x2b0
[55402.448648]        join_transaction+0x1de/0x590
[55402.448925]        start_transaction+0x187/0x740
[55402.449199]        evict_refill_and_join+0x7d/0xe0
[55402.449497]        btrfs_evict_inode+0x2ff/0x3c0
[55402.449772]        evict+0xcc/0x1d0
[55402.449990]        inode_lru_isolate+0x14d/0x1e0
[55402.450271]        __list_lru_walk_one+0xbe/0x1c0
[55402.450552]        list_lru_walk_one+0x58/0x80
[55402.450824]        prune_icache_sb+0x39/0x60
[55402.451067]        super_cache_scan+0x167/0x1f0
[55402.451326]        do_shrink_slab+0x163/0x340
[55402.451590]        shrink_slab+0x1d7/0x2a0
[55402.451842]        shrink_node+0x2eb/0x7b0
[55402.452087]        balance_pgdat+0x344/0x780
[55402.452346]        kswapd+0x205/0x410
[55402.452563]        kthread+0xfc/0x130
[55402.452783]        ret_from_fork+0x2d/0x50
[55402.453023]        ret_from_fork_asm+0x1b/0x30
[55402.453282] 
               other info that might help us debug this:

[55402.453754] Chain exists of:
                 btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2

[55402.454374]  Possible unsafe locking scenario:

[55402.454719]        CPU0                    CPU1
[55402.454987]        ----                    ----
[55402.455256]   rlock(sb_internal#2);
[55402.455464]                                lock(fs_reclaim);
[55402.455817]                                lock(sb_internal#2);
[55402.456162]   rlock(btrfs_trans_num_writers);
[55402.456419] 
                *** DEADLOCK ***

[55402.456763] 4 locks held by kswapd0/50:
[55402.457002]  #0: ffffffff90e62e40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[55402.457464]  #1: ffffffff90e51350 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[55402.457949]  #2: ffff90bee94bc0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[55402.458497]  #3: ffff90bee94bc600 (sb_internal#2){++++}-{0:0}, at: evict_refill_and_join+0x7d/0xe0
[55402.459021] 
               stack backtrace:
[55402.459272] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.5.0+ #1294
[55402.459626] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[55402.460100] Call Trace:
[55402.460544]  
[55402.460685]  dump_stack_lvl+0x58/0x90
[55402.461109]  check_noncircular+0x101/0x110
[55402.461357]  __lock_acquire+0x1415/0x2190
[55402.461603]  lock_acquire+0xc7/0x2b0
[55402.461818]  ? join_transaction+0x1af/0x590
[55402.462043]  ? lock_release+0x134/0x270
[55402.462269]  join_transaction+0x1de/0x590
[55402.462514]  ? join_transaction+0x1af/0x590
[55402.462765]  start_transaction+0x187/0x740
[55402.463008]  evict_refill_and_join+0x7d/0xe0
[55402.463257]  btrfs_evict_inode+0x2ff/0x3c0
[55402.463505]  evict+0xcc/0x1d0
[55402.463682]  inode_lru_isolate+0x14d/0x1e0
[55402.463911]  __list_lru_walk_one+0xbe/0x1c0
[55402.464152]  ? __pfx_inode_lru_isolate+0x10/0x10
[55402.464431]  ? __pfx_inode_lru_isolate+0x10/0x10
[55402.464706]  list_lru_walk_one+0x58/0x80
[55402.464940]  prune_icache_sb+0x39/0x60
[55402.465151]  super_cache_scan+0x167/0x1f0
[55402.465399]  do_shrink_slab+0x163/0x340
[55402.465628]  ? lock_is_held_type+0xe2/0x140
[55402.465881]  shrink_slab+0x1d7/0x2a0
[55402.466097]  shrink_node+0x2eb/0x7b0
[55402.466316]  balance_pgdat+0x344/0x780
[55402.466545]  kswapd+0x205/0x410
[55402.466727]  ? __pfx_autoremove_wake_function+0x10/0x10
[55402.467123]  ? __pfx_kswapd+0x10/0x10
[55402.467257]  kthread+0xfc/0x130
[55402.467375]  ? __pfx_kthread+0x10/0x10
[55402.467511]  ret_from_fork+0x2d/0x50
[55402.467641]  ? __pfx_kthread+0x10/0x10
[55402.467781]  ret_from_fork_asm+0x1b/0x30
[55402.467925]  
[55742.461966] BTRFS warning (device dm-9): failed to trim 11 block group(s), last error -512
[55746.501417] BTRFS: device fsid 6b31eb64-7197-4274-b0ee-c6a476537f68 devid 1 transid 161 /dev/mapper/vg0-lv9 scanned by mount (3975890)
[55746.502872] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[55746.503169] BTRFS info (device dm-9): turning on sync discard
[55746.503376] BTRFS info (device dm-9): using free space tree