[38141.963936] run fstests generic/251 at 2023-10-24 07:28:03
[38142.422241] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1717331 /dev/mapper/vg0-lv0 scanned by mount (649932)
[38142.423191] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[38142.423199] BTRFS info (device dm-0): using free space tree
[38142.429058] BTRFS info (device dm-0): auto enabling async discard
[38142.696510] BTRFS: device fsid 9275aaef-55e2-457c-9cd9-10eb775683ac devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mount (649990)
[38142.697324] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[38142.697331] BTRFS info (device dm-7): use zlib compression, level 3
[38142.697336] BTRFS info (device dm-7): using free space tree
[38142.715121] BTRFS info (device dm-7): auto enabling async discard
[38142.715330] BTRFS info (device dm-7): checking UUID tree

[38391.904003] ======================================================
[38391.904744] WARNING: possible circular locking dependency detected
[38391.904988] 6.6.0-rc7+ #1337 Not tainted
[38391.909080] ------------------------------------------------------
[38391.909301] kswapd0/50 is trying to acquire lock:
[38391.909513] ffff92f3f8f3e390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[38391.911821] 
               but task is already holding lock:
[38391.912086] ffff92f390fe1600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[38391.912566] 
               which lock already depends on the new lock.

[38391.912923] 
               the existing dependency chain (in reverse order) is:
[38391.913297] 
               -> #3 (sb_internal){++++}-{0:0}:
[38391.913699]        start_transaction+0x493/0xad0
[38391.913899]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[38391.914143]        btrfs_evict_inode+0x273/0x3c0
[38391.914356]        evict+0xcc/0x1d0
[38391.915491]        inode_lru_isolate+0x14d/0x1e0
[38391.915695]        __list_lru_walk_one+0xbe/0x1c0
[38391.916396]        list_lru_walk_one+0x58/0x80
[38391.916671]        prune_icache_sb+0x39/0x60
[38391.916935]        super_cache_scan+0x167/0x1f0
[38391.917280]        do_shrink_slab+0x163/0x340
[38391.917870]        shrink_slab+0x1d7/0x2a0
[38391.918075]        shrink_node+0x2eb/0x7b0
[38391.918263]        balance_pgdat+0x344/0x780
[38391.918480]        kswapd+0x205/0x410
[38391.918672]        kthread+0xff/0x130
[38391.919875]        ret_from_fork+0x2d/0x50
[38391.920664]        ret_from_fork_asm+0x1b/0x30
[38391.921264] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[38391.921528]        fs_reclaim_acquire+0xa2/0xe0
[38391.921880]        kmem_cache_alloc_lru+0x4e/0x600
[38391.922439]        btrfs_alloc_inode+0x2d/0x250
[38391.922656]        alloc_inode+0x1a/0xc0
[38391.922887]        iget5_locked+0xba/0x110
[38391.923131]        btrfs_iget+0x43/0xe0
[38391.923306]        create_reloc_inode+0x1a0/0x360
[38391.923495]        btrfs_relocate_block_group+0x1d2/0x3d0
[38391.923701]        btrfs_relocate_chunk+0x4c/0x1b0
[38391.924105]        btrfs_balance+0x8e7/0x11d0
[38391.924275]        btrfs_ioctl+0x1c25/0x2860
[38391.924449]        __x64_sys_ioctl+0x8b/0xc0
[38391.924781]        do_syscall_64+0x38/0x90
[38391.926380]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[38391.927607] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[38391.927862]        join_transaction+0xaf/0x580
[38391.928030]        start_transaction+0x1a0/0xad0
[38391.928226]        btrfs_dirty_inode+0x40/0xd0
[38391.928394]        touch_atime+0x133/0x220
[38391.928575]        filemap_read+0x2f0/0x300
[38391.929056]        __kernel_read+0xef/0x2a0
[38391.929278]        bprm_execve+0x2b0/0x870
[38391.929473]        do_execveat_common+0x1b5/0x260
[38391.929668]        __x64_sys_execve+0x39/0x50
[38391.929848]        do_syscall_64+0x38/0x90
[38391.930026]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[38391.933190] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[38391.933468]        __lock_acquire+0x1415/0x2190
[38391.933810]        lock_acquire+0xc7/0x2b0
[38391.934309]        join_transaction+0x1e4/0x580
[38391.934488]        start_transaction+0x1a0/0xad0
[38391.934722]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[38391.934959]        btrfs_evict_inode+0x273/0x3c0
[38391.935214]        evict+0xcc/0x1d0
[38391.935451]        inode_lru_isolate+0x14d/0x1e0
[38391.935699]        __list_lru_walk_one+0xbe/0x1c0
[38391.935893]        list_lru_walk_one+0x58/0x80
[38391.936060]        prune_icache_sb+0x39/0x60
[38391.936248]        super_cache_scan+0x167/0x1f0
[38391.936435]        do_shrink_slab+0x163/0x340
[38391.936616]        shrink_slab+0x1d7/0x2a0
[38391.936775]        shrink_node+0x2eb/0x7b0
[38391.936940]        balance_pgdat+0x344/0x780
[38391.937116]        kswapd+0x205/0x410
[38391.937272]        kthread+0xff/0x130
[38391.937444]        ret_from_fork+0x2d/0x50
[38391.937631]        ret_from_fork_asm+0x1b/0x30
[38391.937809] 
               other info that might help us debug this:

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

[38391.938560]  Possible unsafe locking scenario:

[38391.938837]        CPU0                    CPU1
[38391.939023]        ----                    ----
[38391.939229]   rlock(sb_internal);
[38391.939479]                                lock(fs_reclaim);
[38391.939757]                                lock(sb_internal);
[38391.939961]   rlock(btrfs_trans_num_writers);
[38391.940138] 
                *** DEADLOCK ***

[38391.940428] 4 locks held by kswapd0/50:
[38391.940611]  #0: ffffffffb2e62ea0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[38391.940912]  #1: ffffffffb2e513b0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[38391.941203]  #2: ffff92f390fe10e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[38391.941524]  #3: ffff92f390fe1600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[38391.941860] 
               stack backtrace:
[38391.942324] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc7+ #1337
[38391.942552] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[38391.942846] Call Trace:
[38391.943000]  
[38391.943257]  dump_stack_lvl+0x58/0x90
[38391.943690]  check_noncircular+0x101/0x110
[38391.943870]  __lock_acquire+0x1415/0x2190
[38391.944057]  lock_acquire+0xc7/0x2b0
[38391.944219]  ? join_transaction+0x1d0/0x580
[38391.944402]  ? lock_release+0x134/0x270
[38391.944586]  ? join_transaction+0x1d0/0x580
[38391.944778]  ? join_transaction+0x3d/0x580
[38391.944954]  join_transaction+0x1e4/0x580
[38391.945133]  ? join_transaction+0x1d0/0x580
[38391.945309]  start_transaction+0x1a0/0xad0
[38391.945481]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[38391.945708]  btrfs_evict_inode+0x273/0x3c0
[38391.945935]  ? lock_release+0x134/0x270
[38391.946185]  ? __pfx_wake_bit_function+0x10/0x10
[38391.946459]  evict+0xcc/0x1d0
[38391.946657]  inode_lru_isolate+0x14d/0x1e0
[38391.946847]  __list_lru_walk_one+0xbe/0x1c0
[38391.947025]  ? __pfx_inode_lru_isolate+0x10/0x10
[38391.947196]  ? __pfx_inode_lru_isolate+0x10/0x10
[38391.947374]  list_lru_walk_one+0x58/0x80
[38391.947566]  prune_icache_sb+0x39/0x60
[38391.947734]  super_cache_scan+0x167/0x1f0
[38391.947907]  do_shrink_slab+0x163/0x340
[38391.948070]  ? lock_is_held_type+0xe2/0x140
[38391.948240]  shrink_slab+0x1d7/0x2a0
[38391.948410]  shrink_node+0x2eb/0x7b0
[38391.948586]  balance_pgdat+0x344/0x780
[38391.948763]  kswapd+0x205/0x410
[38391.948919]  ? __pfx_autoremove_wake_function+0x10/0x10
[38391.949117]  ? __pfx_kswapd+0x10/0x10
[38391.949308]  kthread+0xff/0x130
[38391.949512]  ? __pfx_kthread+0x10/0x10
[38391.949753]  ret_from_fork+0x2d/0x50
[38391.949963]  ? __pfx_kthread+0x10/0x10
[38391.950129]  ret_from_fork_asm+0x1b/0x30
[38391.950291]  
[39042.423103] BTRFS warning (device dm-7): failed to trim 4 block group(s), last error -512
[39046.030561] BTRFS: device fsid 9275aaef-55e2-457c-9cd9-10eb775683ac devid 1 transid 94 /dev/mapper/vg0-lv7 scanned by mount (667244)
[39046.031562] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[39046.031869] BTRFS info (device dm-7): use zlib compression, level 3
[39046.032056] BTRFS info (device dm-7): using free space tree
[39046.034606] BTRFS info (device dm-7): auto enabling async discard