[54354.525487] run fstests generic/251 at 2023-09-22 12:04:27
[54355.191388] BTRFS: device fsid 13921637-4436-40f4-9cb4-e48f1103a380 devid 1 transid 2473420 /dev/mapper/vg0-lv0 scanned by mount (3861981)
[54355.192620] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[54355.192628] BTRFS info (device dm-0): using free space tree
[54355.197598] BTRFS info (device dm-0): auto enabling async discard
[54355.443373] BTRFS: device fsid 69837c6b-98ec-4a61-9e2c-306f5056e6ab devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (3862039)
[54355.444025] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[54355.444033] BTRFS info (device dm-9): using free space tree
[54355.448867] BTRFS info (device dm-9): auto enabling async discard
[54355.449038] BTRFS info (device dm-9): checking UUID tree

[54900.593346] ======================================================
[54900.593813] WARNING: possible circular locking dependency detected
[54900.594268] 6.6.0-rc2+ #1309 Not tainted
[54900.594538] ------------------------------------------------------
[54900.595006] kswapd0/50 is trying to acquire lock:
[54900.595369] ffff9ab40087e398 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[54900.596394] 
               but task is already holding lock:
[54900.596849] ffff9ab403ecb600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[54900.597550] 
               which lock already depends on the new lock.

[54900.598184] 
               the existing dependency chain (in reverse order) is:
[54900.598764] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[54900.599230]        start_transaction+0x493/0xad0
[54900.599599]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[54900.600067]        btrfs_evict_inode+0x273/0x3c0
[54900.600434]        evict+0xcc/0x1d0
[54900.601490]        inode_lru_isolate+0x14d/0x1e0
[54900.601853]        __list_lru_walk_one+0xbe/0x1c0
[54900.602718]        list_lru_walk_one+0x58/0x80
[54900.603054]        prune_icache_sb+0x39/0x60
[54900.603351]        super_cache_scan+0x167/0x1f0
[54900.603837]        do_shrink_slab+0x163/0x340
[54900.604521]        shrink_slab+0x1d7/0x2a0
[54900.604839]        shrink_node+0x2eb/0x7b0
[54900.605260]        balance_pgdat+0x344/0x780
[54900.605588]        kswapd+0x205/0x410
[54900.605876]        kthread+0xff/0x130
[54900.606392]        ret_from_fork+0x2d/0x50
[54900.606797]        ret_from_fork_asm+0x1b/0x30
[54900.607353] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[54900.607757]        fs_reclaim_acquire+0xa2/0xe0
[54900.608337]        kmem_cache_alloc_lru+0x4e/0x600
[54900.608954]        btrfs_alloc_inode+0x2d/0x250
[54900.609307]        alloc_inode+0x1a/0xc0
[54900.609610]        iget5_locked+0xba/0x110
[54900.609926]        btrfs_iget+0x43/0xe0
[54900.610221]        create_reloc_inode+0x1a0/0x370
[54900.610617]        btrfs_relocate_block_group+0x1b7/0x410
[54900.611033]        btrfs_relocate_chunk+0x4c/0x1b0
[54900.611412]        btrfs_balance+0x8e7/0x11d0
[54900.611761]        btrfs_ioctl+0x1bb4/0x28b0
[54900.612118]        __x64_sys_ioctl+0x8b/0xc0
[54900.612639]        do_syscall_64+0x38/0x90
[54900.612974]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[54900.613412] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[54900.613953]        join_transaction+0xaf/0x580
[54900.614320]        start_transaction+0x1a0/0xad0
[54900.614685]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[54900.615085]        kthread+0xff/0x130
[54900.615399]        ret_from_fork+0x2d/0x50
[54900.615784]        ret_from_fork_asm+0x1b/0x30
[54900.616144] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[54900.616656]        __lock_acquire+0x1415/0x2190
[54900.617360]        lock_acquire+0xc7/0x2b0
[54900.617684]        join_transaction+0x1e4/0x580
[54900.618030]        start_transaction+0x1a0/0xad0
[54900.618382]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[54900.618824]        btrfs_evict_inode+0x273/0x3c0
[54900.619186]        evict+0xcc/0x1d0
[54900.619465]        inode_lru_isolate+0x14d/0x1e0
[54900.619831]        __list_lru_walk_one+0xbe/0x1c0
[54900.620189]        list_lru_walk_one+0x58/0x80
[54900.620530]        prune_icache_sb+0x39/0x60
[54900.620867]        super_cache_scan+0x167/0x1f0
[54900.621220]        do_shrink_slab+0x163/0x340
[54900.621556]        shrink_slab+0x1d7/0x2a0
[54900.621872]        shrink_node+0x2eb/0x7b0
[54900.622209]        balance_pgdat+0x344/0x780
[54900.622553]        kswapd+0x205/0x410
[54900.622845]        kthread+0xff/0x130
[54900.623139]        ret_from_fork+0x2d/0x50
[54900.623458]        ret_from_fork_asm+0x1b/0x30
[54900.623815] 
               other info that might help us debug this:

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

[54900.625254]  Possible unsafe locking scenario:

[54900.625710]        CPU0                    CPU1
[54900.626058]        ----                    ----
[54900.626409]   rlock(sb_internal#2);
[54900.626688]                                lock(fs_reclaim);
[54900.627116]                                lock(sb_internal#2);
[54900.627566]   rlock(btrfs_trans_num_writers);
[54900.627906] 
                *** DEADLOCK ***

[54900.628356] 4 locks held by kswapd0/50:
[54900.628657]  #0: ffffffffaee62e40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[54900.629302]  #1: ffffffffaee51350 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[54900.629951]  #2: ffff9ab403ecb0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[54900.630687]  #3: ffff9ab403ecb600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[54900.631474] 
               stack backtrace:
[54900.632001] CPU: 0 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc2+ #1309
[54900.632483] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[54900.633124] Call Trace:
[54900.633318]  
[54900.633486]  dump_stack_lvl+0x58/0x90
[54900.633957]  check_noncircular+0x101/0x110
[54900.634272]  __lock_acquire+0x1415/0x2190
[54900.634580]  lock_acquire+0xc7/0x2b0
[54900.634866]  ? join_transaction+0x1d0/0x580
[54900.635191]  ? lock_release+0x134/0x270
[54900.635487]  ? join_transaction+0x1d0/0x580
[54900.635818]  ? join_transaction+0x3d/0x580
[54900.636134]  join_transaction+0x1e4/0x580
[54900.636441]  ? join_transaction+0x1d0/0x580
[54900.636770]  start_transaction+0x1a0/0xad0
[54900.637090]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[54900.637498]  btrfs_evict_inode+0x273/0x3c0
[54900.637847]  ? lock_release+0x134/0x270
[54900.638200]  ? __pfx_wake_bit_function+0x10/0x10
[54900.638751]  evict+0xcc/0x1d0
[54900.638994]  inode_lru_isolate+0x14d/0x1e0
[54900.639320]  __list_lru_walk_one+0xbe/0x1c0
[54900.639670]  ? __pfx_inode_lru_isolate+0x10/0x10
[54900.640031]  ? __pfx_inode_lru_isolate+0x10/0x10
[54900.640382]  list_lru_walk_one+0x58/0x80
[54900.640695]  prune_icache_sb+0x39/0x60
[54900.640986]  super_cache_scan+0x167/0x1f0
[54900.641296]  do_shrink_slab+0x163/0x340
[54900.641632]  shrink_slab+0x1d7/0x2a0
[54900.641912]  shrink_node+0x2eb/0x7b0
[54900.642188]  balance_pgdat+0x344/0x780
[54900.642484]  kswapd+0x205/0x410
[54900.642732]  ? __pfx_autoremove_wake_function+0x10/0x10
[54900.643133]  ? __pfx_kswapd+0x10/0x10
[54900.643418]  kthread+0xff/0x130
[54900.643644]  ? __pfx_kthread+0x10/0x10
[54900.643845]  ret_from_fork+0x2d/0x50
[54900.644036]  ? __pfx_kthread+0x10/0x10
[54900.644234]  ret_from_fork_asm+0x1b/0x30
[54900.644445]  
[55136.797168] BTRFS warning (device dm-9): failed to trim 3 block group(s), last error -512
[55143.709726] BTRFS: device fsid 69837c6b-98ec-4a61-9e2c-306f5056e6ab devid 1 transid 119 /dev/mapper/vg0-lv9 scanned by mount (3873449)
[55143.711425] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[55143.711906] BTRFS info (device dm-9): using free space tree
[55143.714576] BTRFS info (device dm-9): auto enabling async discard