[11930.721969] run fstests generic/251 at 2023-10-13 00:14:06
[11931.174651] BTRFS: device fsid 13921637-4436-40f4-9cb4-e48f1103a380 devid 1 transid 2605608 /dev/mapper/vg0-lv0 scanned by mount (1625747)
[11931.175452] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[11931.175459] BTRFS info (device dm-0): using free space tree
[11931.179594] BTRFS info (device dm-0): auto enabling async discard
[11931.389527] BTRFS: device fsid 863b1f00-559f-4246-82d2-9287f0754b05 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (1625805)
[11931.390000] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[11931.390006] BTRFS info (device dm-9): disk space caching is enabled
[11931.393256] BTRFS info (device dm-9): auto enabling async discard
[11931.393381] BTRFS info (device dm-9): checking UUID tree

[12283.243281] ======================================================
[12283.243680] WARNING: possible circular locking dependency detected
[12283.244129] 6.6.0-rc5+ #1326 Not tainted
[12283.244405] ------------------------------------------------------
[12283.244810] kswapd0/50 is trying to acquire lock:
[12283.245139] ffff89b744ede390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[12283.247555] 
               but task is already holding lock:
[12283.247991] ffff89b78db20600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[12283.248814] 
               which lock already depends on the new lock.

[12283.249486] 
               the existing dependency chain (in reverse order) is:
[12283.250158] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[12283.250658]        start_transaction+0x493/0xad0
[12283.251047]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[12283.251628]        btrfs_evict_inode+0x273/0x3c0
[12283.251999]        evict+0xcc/0x1d0
[12283.252335]        inode_lru_isolate+0x14d/0x1e0
[12283.252718]        __list_lru_walk_one+0xbe/0x1c0
[12283.253107]        list_lru_walk_one+0x58/0x80
[12283.253495]        prune_icache_sb+0x39/0x60
[12283.253854]        super_cache_scan+0x167/0x1f0
[12283.254222]        do_shrink_slab+0x163/0x340
[12283.254573]        shrink_slab+0x1d7/0x2a0
[12283.254942]        shrink_node+0x2eb/0x7b0
[12283.255363]        balance_pgdat+0x344/0x780
[12283.255754]        kswapd+0x205/0x410
[12283.256054]        kthread+0xff/0x130
[12283.256356]        ret_from_fork+0x2d/0x50
[12283.256858]        ret_from_fork_asm+0x1b/0x30
[12283.257322] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[12283.257787]        fs_reclaim_acquire+0xa2/0xe0
[12283.258156]        kmem_cache_alloc_lru+0x4e/0x600
[12283.258603]        btrfs_alloc_inode+0x2d/0x250
[12283.259066]        alloc_inode+0x1a/0xc0
[12283.259399]        iget5_locked+0xba/0x110
[12283.259743]        btrfs_iget+0x43/0xe0
[12283.260079]        create_reloc_inode+0x1a0/0x360
[12283.260527]        btrfs_relocate_block_group+0x1d2/0x3d0
[12283.260960]        btrfs_relocate_chunk+0x4c/0x1b0
[12283.261433]        btrfs_balance+0x8e7/0x11d0
[12283.261895]        btrfs_ioctl+0x1c25/0x2860
[12283.262315]        __x64_sys_ioctl+0x8b/0xc0
[12283.262871]        do_syscall_64+0x38/0x90
[12283.263343]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[12283.263819] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[12283.264455]        join_transaction+0xaf/0x580
[12283.264863]        start_transaction+0x1a0/0xad0
[12283.265258]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[12283.265684]        kthread+0xff/0x130
[12283.266106]        ret_from_fork+0x2d/0x50
[12283.266616]        ret_from_fork_asm+0x1b/0x30
[12283.267186] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[12283.268088]        __lock_acquire+0x1415/0x2190
[12283.268523]        lock_acquire+0xc7/0x2b0
[12283.268847]        join_transaction+0x1e4/0x580
[12283.269377]        start_transaction+0x1a0/0xad0
[12283.269984]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[12283.270727]        btrfs_evict_inode+0x273/0x3c0
[12283.271351]        evict+0xcc/0x1d0
[12283.271792]        inode_lru_isolate+0x14d/0x1e0
[12283.272427]        __list_lru_walk_one+0xbe/0x1c0
[12283.273049]        list_lru_walk_one+0x58/0x80
[12283.273626]        prune_icache_sb+0x39/0x60
[12283.274210]        super_cache_scan+0x167/0x1f0
[12283.274807]        do_shrink_slab+0x163/0x340
[12283.275380]        shrink_slab+0x1d7/0x2a0
[12283.275943]        shrink_node+0x2eb/0x7b0
[12283.276490]        balance_pgdat+0x344/0x780
[12283.277077]        kswapd+0x205/0x410
[12283.277540]        kthread+0xff/0x130
[12283.278154]        ret_from_fork+0x2d/0x50
[12283.278726]        ret_from_fork_asm+0x1b/0x30
[12283.279324] 
               other info that might help us debug this:

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

[12283.281776]  Possible unsafe locking scenario:

[12283.282549]        CPU0                    CPU1
[12283.283144]        ----                    ----
[12283.283737]   rlock(sb_internal#2);
[12283.284218]                                lock(fs_reclaim);
[12283.284992]                                lock(sb_internal#2);
[12283.285815]   rlock(btrfs_trans_num_writers);
[12283.286394] 
                *** DEADLOCK ***

[12283.287078] 4 locks held by kswapd0/50:
[12283.287439]  #0: ffffffff84e62ea0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[12283.288228]  #1: ffffffff84e513b0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[12283.289019]  #2: ffff89b78db200e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[12283.289886]  #3: ffff89b78db20600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[12283.290908] 
               stack backtrace:
[12283.291326] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc5+ #1326
[12283.291957] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[12283.292860] Call Trace:
[12283.293219]  
[12283.293521]  dump_stack_lvl+0x58/0x90
[12283.294046]  check_noncircular+0x101/0x110
[12283.294599]  __lock_acquire+0x1415/0x2190
[12283.295182]  lock_acquire+0xc7/0x2b0
[12283.295681]  ? join_transaction+0x1d0/0x580
[12283.296268]  ? lock_release+0x134/0x270
[12283.296812]  ? join_transaction+0x1d0/0x580
[12283.297395]  ? join_transaction+0x3d/0x580
[12283.297977]  join_transaction+0x1e4/0x580
[12283.298533]  ? join_transaction+0x1d0/0x580
[12283.299121]  start_transaction+0x1a0/0xad0
[12283.299699]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[12283.300392]  btrfs_evict_inode+0x273/0x3c0
[12283.300820]  ? lock_release+0x134/0x270
[12283.301185]  ? __pfx_wake_bit_function+0x10/0x10
[12283.301638]  evict+0xcc/0x1d0
[12283.301931]  inode_lru_isolate+0x14d/0x1e0
[12283.302326]  __list_lru_walk_one+0xbe/0x1c0
[12283.302697]  ? __pfx_inode_lru_isolate+0x10/0x10
[12283.303139]  ? __pfx_inode_lru_isolate+0x10/0x10
[12283.303582]  list_lru_walk_one+0x58/0x80
[12283.303968]  prune_icache_sb+0x39/0x60
[12283.304307]  super_cache_scan+0x167/0x1f0
[12283.304691]  do_shrink_slab+0x163/0x340
[12283.305065]  shrink_slab+0x1d7/0x2a0
[12283.305410]  shrink_node+0x2eb/0x7b0
[12283.305751]  balance_pgdat+0x344/0x780
[12283.306130]  kswapd+0x205/0x410
[12283.306487]  ? __pfx_autoremove_wake_function+0x10/0x10
[12283.306970]  ? __pfx_kswapd+0x10/0x10
[12283.307309]  kthread+0xff/0x130
[12283.307609]  ? __pfx_kthread+0x10/0x10
[12283.307951]  ret_from_fork+0x2d/0x50
[12283.308402]  ? __pfx_kthread+0x10/0x10
[12283.308946]  ret_from_fork_asm+0x1b/0x30
[12283.309502]  
[12871.959224] BTRFS: device fsid 863b1f00-559f-4246-82d2-9287f0754b05 devid 1 transid 73 /dev/mapper/vg0-lv9 scanned by mount (1634865)
[12871.961563] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[12871.962061] BTRFS info (device dm-9): disk space caching is enabled
[12871.964843] BTRFS info (device dm-9): auto enabling async discard
[12872.064753] BTRFS warning (device dm-9): block group 4593811456 has wrong amount of free space
[12872.065324] BTRFS warning (device dm-9): failed to load free space cache for block group 4593811456, rebuilding it now
[12872.066630] BTRFS warning (device dm-9): block group 5935988736 has wrong amount of free space
[12872.067306] BTRFS warning (device dm-9): failed to load free space cache for block group 5935988736, rebuilding it now
[12872.068434] BTRFS warning (device dm-9): block group 7009730560 has wrong amount of free space
[12872.068964] BTRFS warning (device dm-9): failed to load free space cache for block group 7009730560, rebuilding it now
[12872.070060] BTRFS warning (device dm-9): block group 8351907840 has wrong amount of free space
[12872.070611] BTRFS warning (device dm-9): failed to load free space cache for block group 8351907840, rebuilding it now
[12872.071607] BTRFS warning (device dm-9): block group 9425649664 has wrong amount of free space
[12872.072052] BTRFS warning (device dm-9): failed to load free space cache for block group 9425649664, rebuilding it now