[12168.694845] run fstests generic/251 at 2023-10-13 00:15:03
[12169.159383] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1667833 /dev/mapper/vg0-lv0 scanned by mount (1571261)
[12169.160637] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[12169.160647] BTRFS info (device dm-0): using free space tree
[12169.167281] BTRFS info (device dm-0): auto enabling async discard
[12169.891678] BTRFS: device fsid b899f911-9889-4272-9224-11b35fca8064 devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mount (1571320)
[12169.892843] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[12169.892851] BTRFS info (device dm-7): using free space tree
[12169.898460] BTRFS info (device dm-7): auto enabling async discard
[12169.898592] BTRFS info (device dm-7): checking UUID tree

[12695.373468] ======================================================
[12695.373653] WARNING: possible circular locking dependency detected
[12695.373838] 6.6.0-rc5+ #1326 Not tainted
[12695.373980] ------------------------------------------------------
[12695.374158] kswapd0/50 is trying to acquire lock:
[12695.374311] ffff9f1fee62e390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[12695.374611] 
               but task is already holding lock:
[12695.374843] ffff9f1ff059b600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[12695.375124] 
               which lock already depends on the new lock.

[12695.375409] 
               the existing dependency chain (in reverse order) is:
[12695.375644] 
               -> #3 (sb_internal){++++}-{0:0}:
[12695.375855]        start_transaction+0x493/0xad0
[12695.376012]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[12695.376188]        btrfs_evict_inode+0x273/0x3c0
[12695.376341]        evict+0xcc/0x1d0
[12695.376487]        inode_lru_isolate+0x14d/0x1e0
[12695.376643]        __list_lru_walk_one+0xbe/0x1c0
[12695.376814]        list_lru_walk_one+0x58/0x80
[12695.376965]        prune_icache_sb+0x39/0x60
[12695.377114]        super_cache_scan+0x167/0x1f0
[12695.377272]        do_shrink_slab+0x163/0x340
[12695.377429]        shrink_slab+0x1d7/0x2a0
[12695.377573]        shrink_node+0x2eb/0x7b0
[12695.377723]        balance_pgdat+0x344/0x780
[12695.377873]        kswapd+0x205/0x410
[12695.378013]        kthread+0xff/0x130
[12695.378163]        ret_from_fork+0x2d/0x50
[12695.378318]        ret_from_fork_asm+0x1b/0x30
[12695.378477] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[12695.378717]        fs_reclaim_acquire+0xa2/0xe0
[12695.378878]        kmem_cache_alloc_lru+0x4e/0x600
[12695.379037]        btrfs_alloc_inode+0x2d/0x250
[12695.379189]        alloc_inode+0x1a/0xc0
[12695.379330]        iget5_locked+0xba/0x110
[12695.379478]        btrfs_iget+0x43/0xe0
[12695.379623]        create_reloc_inode+0x1a0/0x360
[12695.379782]        btrfs_relocate_block_group+0x1d2/0x3d0
[12695.379949]        btrfs_relocate_chunk+0x4c/0x1b0
[12695.380107]        btrfs_balance+0x8e7/0x11d0
[12695.380276]        btrfs_ioctl+0x1c25/0x2860
[12695.380422]        __x64_sys_ioctl+0x8b/0xc0
[12695.380572]        do_syscall_64+0x38/0x90
[12695.380741]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[12695.380925] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[12695.381149]        join_transaction+0xaf/0x580
[12695.381304]        start_transaction+0x1a0/0xad0
[12695.381458]        btrfs_dirty_inode+0x40/0xd0
[12695.381608]        touch_atime+0x133/0x220
[12695.381758]        filemap_read+0x2f0/0x300
[12695.381909]        __kernel_read+0xef/0x2a0
[12695.382061]        bprm_execve+0x2b0/0x870
[12695.382204]        do_execveat_common+0x1b5/0x260
[12695.382359]        __x64_sys_execve+0x39/0x50
[12695.382508]        do_syscall_64+0x38/0x90
[12695.382658]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[12695.382830] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[12695.383056]        __lock_acquire+0x1415/0x2190
[12695.383216]        lock_acquire+0xc7/0x2b0
[12695.383360]        join_transaction+0x1e4/0x580
[12695.383512]        start_transaction+0x1a0/0xad0
[12695.383666]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[12695.383848]        btrfs_evict_inode+0x273/0x3c0
[12695.384002]        evict+0xcc/0x1d0
[12695.384137]        inode_lru_isolate+0x14d/0x1e0
[12695.384293]        __list_lru_walk_one+0xbe/0x1c0
[12695.384532]        list_lru_walk_one+0x58/0x80
[12695.384684]        prune_icache_sb+0x39/0x60
[12695.384839]        super_cache_scan+0x167/0x1f0
[12695.384992]        do_shrink_slab+0x163/0x340
[12695.385145]        shrink_slab+0x1d7/0x2a0
[12695.385288]        shrink_node+0x2eb/0x7b0
[12695.385432]        balance_pgdat+0x344/0x780
[12695.385583]        kswapd+0x205/0x410
[12695.385726]        kthread+0xff/0x130
[12695.385863]        ret_from_fork+0x2d/0x50
[12695.386006]        ret_from_fork_asm+0x1b/0x30
[12695.386161] 
               other info that might help us debug this:

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

[12695.386764]  Possible unsafe locking scenario:

[12695.386972]        CPU0                    CPU1
[12695.387125]        ----                    ----
[12695.387278]   rlock(sb_internal);
[12695.387409]                                lock(fs_reclaim);
[12695.387577]                                lock(sb_internal);
[12695.387754]   rlock(btrfs_trans_num_writers);
[12695.387904] 
                *** DEADLOCK ***

[12695.388146] 4 locks held by kswapd0/50:
[12695.388286]  #0: fffffffface62ea0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[12695.388619]  #1: fffffffface513b0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[12695.388879]  #2: ffff9f1ff059b0e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[12695.389155]  #3: ffff9f1ff059b600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[12695.389432] 
               stack backtrace:
[12695.389618] CPU: 0 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc5+ #1326
[12695.389805] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[12695.390058] Call Trace:
[12695.390178]  
[12695.390291]  dump_stack_lvl+0x58/0x90
[12695.390436]  check_noncircular+0x101/0x110
[12695.390586]  __lock_acquire+0x1415/0x2190
[12695.390736]  lock_acquire+0xc7/0x2b0
[12695.390873]  ? join_transaction+0x1d0/0x580
[12695.391132]  ? lock_release+0x134/0x270
[12695.391273]  ? join_transaction+0x1d0/0x580
[12695.391418]  ? join_transaction+0x3d/0x580
[12695.391567]  join_transaction+0x1e4/0x580
[12695.391722]  ? join_transaction+0x1d0/0x580
[12695.391870]  start_transaction+0x1a0/0xad0
[12695.392015]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[12695.392185]  btrfs_evict_inode+0x273/0x3c0
[12695.392404]  ? lock_release+0x134/0x270
[12695.392544]  ? __pfx_wake_bit_function+0x10/0x10
[12695.392709]  evict+0xcc/0x1d0
[12695.392841]  inode_lru_isolate+0x14d/0x1e0
[12695.392990]  __list_lru_walk_one+0xbe/0x1c0
[12695.393139]  ? __pfx_inode_lru_isolate+0x10/0x10
[12695.393292]  ? __pfx_inode_lru_isolate+0x10/0x10
[12695.393615]  list_lru_walk_one+0x58/0x80
[12695.393812]  prune_icache_sb+0x39/0x60
[12695.393953]  super_cache_scan+0x167/0x1f0
[12695.394098]  do_shrink_slab+0x163/0x340
[12695.394243]  ? lock_is_held_type+0xe2/0x140
[12695.394399]  shrink_slab+0x1d7/0x2a0
[12695.394537]  shrink_node+0x2eb/0x7b0
[12695.394754]  balance_pgdat+0x344/0x780
[12695.394902]  kswapd+0x205/0x410
[12695.395031]  ? __pfx_autoremove_wake_function+0x10/0x10
[12695.395199]  ? __pfx_kswapd+0x10/0x10
[12695.395342]  kthread+0xff/0x130
[12695.395473]  ? __pfx_kthread+0x10/0x10
[12695.395634]  ret_from_fork+0x2d/0x50
[12695.395780]  ? __pfx_kthread+0x10/0x10
[12695.395922]  ret_from_fork_asm+0x1b/0x30
[12695.396068]  
[13034.355487] BTRFS warning (device dm-7): failed to trim 11 block group(s), last error -512
[13050.520268] BTRFS: device fsid b899f911-9889-4272-9224-11b35fca8064 devid 1 transid 77 /dev/mapper/vg0-lv7 scanned by mount (1580420)
[13050.520980] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[13050.521254] BTRFS info (device dm-7): using free space tree
[13050.524250] BTRFS info (device dm-7): auto enabling async discard