[12658.349161] run fstests generic/251 at 2023-10-25 00:24:12
[12658.847647] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 3016020 /dev/mapper/vg0-lv0 scanned by mount (1648002)
[12658.848415] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[12658.848423] BTRFS info (device dm-0): using free space tree
[12658.852722] BTRFS info (device dm-0): auto enabling async discard
[12659.116045] BTRFS: device fsid 72fd48b5-f662-430b-9ae7-45aa19d01022 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (1648060)
[12659.117885] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[12659.117896] BTRFS info (device dm-9): turning on async discard
[12659.117899] BTRFS info (device dm-9): disk space caching is enabled
[12659.125365] BTRFS info (device dm-9): checking UUID tree

[13760.320253] ======================================================
[13760.320472] WARNING: possible circular locking dependency detected
[13760.320696] 6.6.0-rc7+ #1338 Not tainted
[13760.320838] ------------------------------------------------------
[13760.321054] kswapd0/50 is trying to acquire lock:
[13760.321223] ffffa0d7029c6390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[13760.323327] 
               but task is already holding lock:
[13760.323541] ffffa0d7231ee600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[13760.324065] 
               which lock already depends on the new lock.

[13760.324351] 
               the existing dependency chain (in reverse order) is:
[13760.324760] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[13760.324971]        start_transaction+0x493/0xad0
[13760.325137]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[13760.325343]        btrfs_evict_inode+0x273/0x3c0
[13760.325767]        evict+0xcc/0x1d0
[13760.326120]        inode_lru_isolate+0x14d/0x1e0
[13760.326289]        __list_lru_walk_one+0xbe/0x1c0
[13760.326709]        list_lru_walk_one+0x58/0x80
[13760.326871]        prune_icache_sb+0x39/0x60
[13760.327026]        super_cache_scan+0x167/0x1f0
[13760.327406]        do_shrink_slab+0x163/0x340
[13760.327816]        shrink_slab+0x1d7/0x2a0
[13760.327964]        shrink_node+0x2eb/0x7b0
[13760.328113]        balance_pgdat+0x344/0x780
[13760.328290]        kswapd+0x205/0x410
[13760.328426]        kthread+0xff/0x130
[13760.328572]        ret_from_fork+0x2d/0x50
[13760.328727]        ret_from_fork_asm+0x1b/0x30
[13760.328890] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[13760.329092]        fs_reclaim_acquire+0xa2/0xe0
[13760.329529]        kmem_cache_alloc_lru+0x4e/0x600
[13760.329900]        btrfs_alloc_inode+0x2d/0x250
[13760.330064]        alloc_inode+0x1a/0xc0
[13760.330208]        iget5_locked+0xba/0x110
[13760.330355]        btrfs_iget+0x43/0xe0
[13760.330495]        create_reloc_inode+0x1a0/0x360
[13760.330671]        btrfs_relocate_block_group+0x1d2/0x3d0
[13760.330862]        btrfs_relocate_chunk+0x4c/0x1b0
[13760.331038]        btrfs_balance+0x8e7/0x11d0
[13760.331195]        btrfs_ioctl+0x1c25/0x2860
[13760.331356]        __x64_sys_ioctl+0x8b/0xc0
[13760.331766]        do_syscall_64+0x38/0x90
[13760.332123]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[13760.332558] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[13760.332807]        join_transaction+0xaf/0x580
[13760.332970]        start_transaction+0x1a0/0xad0
[13760.333136]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[13760.333325]        kthread+0xff/0x130
[13760.333460]        ret_from_fork+0x2d/0x50
[13760.333612]        ret_from_fork_asm+0x1b/0x30
[13760.333825] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[13760.334066]        __lock_acquire+0x1415/0x2190
[13760.334231]        lock_acquire+0xc7/0x2b0
[13760.334381]        join_transaction+0x1e4/0x580
[13760.334553]        start_transaction+0x1a0/0xad0
[13760.334721]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[13760.334928]        btrfs_evict_inode+0x273/0x3c0
[13760.335096]        evict+0xcc/0x1d0
[13760.335225]        inode_lru_isolate+0x14d/0x1e0
[13760.335391]        __list_lru_walk_one+0xbe/0x1c0
[13760.335562]        list_lru_walk_one+0x58/0x80
[13760.335723]        prune_icache_sb+0x39/0x60
[13760.335959]        super_cache_scan+0x167/0x1f0
[13760.336185]        do_shrink_slab+0x163/0x340
[13760.336345]        shrink_slab+0x1d7/0x2a0
[13760.336492]        shrink_node+0x2eb/0x7b0
[13760.336648]        balance_pgdat+0x344/0x780
[13760.336802]        kswapd+0x205/0x410
[13760.336935]        kthread+0xff/0x130
[13760.337070]        ret_from_fork+0x2d/0x50
[13760.337217]        ret_from_fork_asm+0x1b/0x30
[13760.337378] 
               other info that might help us debug this:

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

[13760.338029]  Possible unsafe locking scenario:

[13760.338235]        CPU0                    CPU1
[13760.338398]        ----                    ----
[13760.338563]   rlock(sb_internal#2);
[13760.338761]                                lock(fs_reclaim);
[13760.339025]                                lock(sb_internal#2);
[13760.339646]   rlock(btrfs_trans_num_writers);
[13760.339870] 
                *** DEADLOCK ***

[13760.340109] 4 locks held by kswapd0/50:
[13760.340250]  #0: ffffffffb0e62ea0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[13760.340547]  #1: ffffffffb0e513b0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[13760.340839]  #2: ffffa0d7231ee0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[13760.341167]  #3: ffffa0d7231ee600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[13760.341520] 
               stack backtrace:
[13760.341680] CPU: 0 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc7+ #1338
[13760.341909] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[13760.342205] Call Trace:
[13760.342301]  
[13760.342385]  dump_stack_lvl+0x58/0x90
[13760.342847]  check_noncircular+0x101/0x110
[13760.342999]  __lock_acquire+0x1415/0x2190
[13760.343164]  lock_acquire+0xc7/0x2b0
[13760.343300]  ? join_transaction+0x1d0/0x580
[13760.343459]  ? lock_release+0x134/0x270
[13760.343799]  ? join_transaction+0x1d0/0x580
[13760.344065]  ? join_transaction+0x3d/0x580
[13760.344222]  join_transaction+0x1e4/0x580
[13760.344388]  ? join_transaction+0x1d0/0x580
[13760.344546]  start_transaction+0x1a0/0xad0
[13760.344696]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[13760.344937]  btrfs_evict_inode+0x273/0x3c0
[13760.345162]  ? lock_release+0x134/0x270
[13760.345401]  ? __pfx_wake_bit_function+0x10/0x10
[13760.345588]  evict+0xcc/0x1d0
[13760.345705]  inode_lru_isolate+0x14d/0x1e0
[13760.345859]  __list_lru_walk_one+0xbe/0x1c0
[13760.346016]  ? __pfx_inode_lru_isolate+0x10/0x10
[13760.346189]  ? __pfx_inode_lru_isolate+0x10/0x10
[13760.346361]  list_lru_walk_one+0x58/0x80
[13760.346515]  prune_icache_sb+0x39/0x60
[13760.346658]  super_cache_scan+0x167/0x1f0
[13760.346809]  do_shrink_slab+0x163/0x340
[13760.346955]  shrink_slab+0x1d7/0x2a0
[13760.347093]  shrink_node+0x2eb/0x7b0
[13760.347246]  balance_pgdat+0x344/0x780
[13760.347389]  kswapd+0x205/0x410
[13760.347510]  ? __pfx_autoremove_wake_function+0x10/0x10
[13760.347698]  ? __pfx_kswapd+0x10/0x10
[13760.347833]  kthread+0xff/0x130
[13760.347961]  ? __pfx_kthread+0x10/0x10
[13760.348100]  ret_from_fork+0x2d/0x50
[13760.348234]  ? __pfx_kthread+0x10/0x10
[13760.348394]  ret_from_fork_asm+0x1b/0x30
[13760.348550]  
[13814.607647] BTRFS warning (device dm-9): failed to trim 4 block group(s), last error -512
[13822.503685] BTRFS: device fsid 72fd48b5-f662-430b-9ae7-45aa19d01022 devid 1 transid 149 /dev/mapper/vg0-lv9 scanned by mount (1661595)
[13822.504672] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[13822.505077] BTRFS info (device dm-9): turning on async discard
[13822.505407] BTRFS info (device dm-9): disk space caching is enabled