[35520.466975] run fstests generic/251 at 2023-09-11 06:44:09
[35520.931552] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1543680 /dev/mapper/vg0-lv0 scanned by mount (616100)
[35520.932437] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[35520.932444] BTRFS info (device dm-0): using free space tree
[35520.938077] BTRFS info (device dm-0): auto enabling async discard
[35522.124464] BTRFS: device fsid fe2d6ae3-6790-4f35-8423-6e3f86071c00 devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mkfs.btrfs (616148)
[35522.151166] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[35522.151179] BTRFS info (device dm-7): use zlib compression, level 3
[35522.151185] BTRFS info (device dm-7): using free space tree
[35522.171281] BTRFS info (device dm-7): auto enabling async discard
[35522.171450] BTRFS info (device dm-7): checking UUID tree

[36555.840100] ======================================================
[36555.840300] WARNING: possible circular locking dependency detected
[36555.840496] 6.5.0+ #1298 Not tainted
[36555.840644] ------------------------------------------------------
[36555.840835] kswapd0/50 is trying to acquire lock:
[36555.841012] ffff90df2add2388 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[36555.843210] 
               but task is already holding lock:
[36555.843433] ffff90df7b043600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[36555.843800] 
               which lock already depends on the new lock.

[36555.844127] 
               the existing dependency chain (in reverse order) is:
[36555.844392] 
               -> #3 (sb_internal){++++}-{0:0}:
[36555.844617]        start_transaction+0x3f9/0x740
[36555.844782]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[36555.844976]        btrfs_evict_inode+0x273/0x3c0
[36555.845147]        evict+0xcc/0x1d0
[36555.846621]        inode_lru_isolate+0x14d/0x1e0
[36555.846788]        __list_lru_walk_one+0xbe/0x1c0
[36555.847416]        list_lru_walk_one+0x58/0x80
[36555.847594]        prune_icache_sb+0x39/0x60
[36555.847767]        super_cache_scan+0x167/0x1f0
[36555.848573]        do_shrink_slab+0x163/0x340
[36555.849101]        shrink_slab+0x1d7/0x2a0
[36555.849259]        shrink_node+0x2eb/0x7b0
[36555.849415]        balance_pgdat+0x344/0x780
[36555.849576]        kswapd+0x205/0x410
[36555.849726]        kthread+0xfc/0x130
[36555.850668]        ret_from_fork+0x2d/0x50
[36555.851257]        ret_from_fork_asm+0x1b/0x30
[36555.851884] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[36555.852118]        fs_reclaim_acquire+0xa5/0xe0
[36555.852416]        kmem_cache_alloc_lru+0x4e/0x570
[36555.852878]        btrfs_alloc_inode+0x2d/0x250
[36555.853060]        alloc_inode+0x1a/0xc0
[36555.853232]        iget5_locked+0xba/0x110
[36555.853393]        btrfs_iget+0x43/0xe0
[36555.853550]        create_reloc_inode+0x19d/0x370
[36555.853754]        btrfs_relocate_block_group+0x1b7/0x410
[36555.853936]        btrfs_relocate_chunk+0x4c/0x1b0
[36555.854331]        btrfs_balance+0x8e7/0x11d0
[36555.854496]        btrfs_ioctl+0x1d3d/0x2900
[36555.854692]        __x64_sys_ioctl+0x8b/0xc0
[36555.855008]        do_syscall_64+0x38/0x90
[36555.856051]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[36555.856801] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[36555.857056]        join_transaction+0xb4/0x590
[36555.857221]        start_transaction+0x187/0x740
[36555.857389]        btrfs_dirty_inode+0x40/0xd0
[36555.857555]        touch_atime+0x133/0x220
[36555.857710]        iterate_dir+0x117/0x180
[36555.857866]        __x64_sys_getdents64+0x6a/0x120
[36555.858042]        do_syscall_64+0x38/0x90
[36555.858203]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[36555.858385] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[36555.858626]        __lock_acquire+0x1415/0x2190
[36555.859170]        lock_acquire+0xc7/0x2b0
[36555.859332]        join_transaction+0x1de/0x590
[36555.859505]        start_transaction+0x187/0x740
[36555.859673]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[36555.859862]        btrfs_evict_inode+0x273/0x3c0
[36555.860033]        evict+0xcc/0x1d0
[36555.860178]        inode_lru_isolate+0x14d/0x1e0
[36555.860347]        __list_lru_walk_one+0xbe/0x1c0
[36555.860518]        list_lru_walk_one+0x58/0x80
[36555.860679]        prune_icache_sb+0x39/0x60
[36555.860840]        super_cache_scan+0x167/0x1f0
[36555.861010]        do_shrink_slab+0x163/0x340
[36555.861176]        shrink_slab+0x1d7/0x2a0
[36555.861332]        shrink_node+0x2eb/0x7b0
[36555.861489]        balance_pgdat+0x344/0x780
[36555.861652]        kswapd+0x205/0x410
[36555.861804]        kthread+0xfc/0x130
[36555.861953]        ret_from_fork+0x2d/0x50
[36555.862112]        ret_from_fork_asm+0x1b/0x30
[36555.862280] 
               other info that might help us debug this:

[36555.862583] Chain exists of:
                 btrfs_trans_num_writers --> fs_reclaim --> sb_internal

[36555.862928]  Possible unsafe locking scenario:

[36555.863159]        CPU0                    CPU1
[36555.863326]        ----                    ----
[36555.863490]   rlock(sb_internal);
[36555.863632]                                lock(fs_reclaim);
[36555.863816]                                lock(sb_internal);
[36555.864017]   rlock(btrfs_trans_num_writers);
[36555.864181] 
                *** DEADLOCK ***

[36555.864476] 4 locks held by kswapd0/50:
[36555.864628]  #0: ffffffff94e62e40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[36555.864908]  #1: ffffffff94e51350 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[36555.865184]  #2: ffff90df7b0430e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[36555.865479]  #3: ffff90df7b043600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[36555.865776] 
               stack backtrace:
[36555.865978] CPU: 0 PID: 50 Comm: kswapd0 Not tainted 6.5.0+ #1298
[36555.866169] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[36555.866455] Call Trace:
[36555.866785]  
[36555.866912]  dump_stack_lvl+0x58/0x90
[36555.867471]  check_noncircular+0x101/0x110
[36555.867636]  __lock_acquire+0x1415/0x2190
[36555.867814]  lock_acquire+0xc7/0x2b0
[36555.867963]  ? join_transaction+0x1af/0x590
[36555.868129]  ? lock_release+0x134/0x270
[36555.868313]  join_transaction+0x1de/0x590
[36555.868471]  ? join_transaction+0x1af/0x590
[36555.868633]  start_transaction+0x187/0x740
[36555.868809]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[36555.868986]  btrfs_evict_inode+0x273/0x3c0
[36555.871898]  ? lock_release+0x134/0x270
[36555.872185]  ? __pfx_wake_bit_function+0x10/0x10
[36555.872536]  evict+0xcc/0x1d0
[36555.872719]  inode_lru_isolate+0x14d/0x1e0
[36555.872988]  __list_lru_walk_one+0xbe/0x1c0
[36555.873265]  ? __pfx_inode_lru_isolate+0x10/0x10
[36555.873530]  ? __pfx_inode_lru_isolate+0x10/0x10
[36555.873777]  list_lru_walk_one+0x58/0x80
[36555.874001]  prune_icache_sb+0x39/0x60
[36555.874217]  super_cache_scan+0x167/0x1f0
[36555.874434]  do_shrink_slab+0x163/0x340
[36555.874648]  ? lock_is_held_type+0xe2/0x140
[36555.875150]  shrink_slab+0x1d7/0x2a0
[36555.875358]  shrink_node+0x2eb/0x7b0
[36555.875571]  balance_pgdat+0x344/0x780
[36555.876354]  kswapd+0x205/0x410
[36555.876502]  ? __pfx_autoremove_wake_function+0x10/0x10
[36555.876676]  ? __pfx_kswapd+0x10/0x10
[36555.876822]  kthread+0xfc/0x130
[36555.876988]  ? __pfx_kthread+0x10/0x10
[36555.877137]  ret_from_fork+0x2d/0x50
[36555.877303]  ? __pfx_kthread+0x10/0x10
[36555.877462]  ret_from_fork_asm+0x1b/0x30
[36555.877618]  
[36816.843210] BTRFS: device fsid fe2d6ae3-6790-4f35-8423-6e3f86071c00 devid 1 transid 76 /dev/mapper/vg0-lv7 scanned by mount (632362)
[36816.844759] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[36816.845194] BTRFS info (device dm-7): use zlib compression, level 3
[36816.845408] BTRFS info (device dm-7): using free space tree
[36816.848360] BTRFS info (device dm-7): auto enabling async discard