[11323.413511] run fstests generic/251 at 2023-08-02 00:03:09
[11323.883190] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2453125 /dev/mapper/vg0-lv0 scanned by mount (1581830)
[11323.884572] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[11323.884578] BTRFS info (device dm-0): using free space tree
[11323.888293] BTRFS info (device dm-0): auto enabling async discard
[11324.091267] BTRFS: device fsid 6d6e214c-010c-4e99-9ebe-f72b1a32d730 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (1581878)
[11324.108068] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[11324.108080] BTRFS info (device dm-9): turning on async discard
[11324.108083] BTRFS info (device dm-9): disk space caching is enabled
[11324.111742] BTRFS info (device dm-9): checking UUID tree

[11540.585093] ======================================================
[11540.585362] WARNING: possible circular locking dependency detected
[11540.585635] 6.5.0-rc3+ #1258 Not tainted
[11540.585809] ------------------------------------------------------
[11540.586082] kswapd0/47 is trying to acquire lock:
[11540.586311] ffff903a3bc22378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[11540.586712] 
               but task is already holding lock:
[11540.586966] ffff903a3569a600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11540.587384] 
               which lock already depends on the new lock.

[11540.587736] 
               the existing dependency chain (in reverse order) is:
[11540.588055] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[11540.588316]        start_transaction+0x3f9/0x740
[11540.588522]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[11540.588785]        btrfs_evict_inode+0x273/0x3c0
[11540.588990]        evict+0xcc/0x1d0
[11540.589150]        inode_lru_isolate+0x14d/0x1e0
[11540.589354]        __list_lru_walk_one+0xbe/0x1c0
[11540.589569]        list_lru_walk_one+0x58/0x80
[11540.589767]        prune_icache_sb+0x39/0x60
[11540.589957]        super_cache_scan+0x161/0x1f0
[11540.590168]        do_shrink_slab+0x163/0x340
[11540.590364]        shrink_slab+0x1d7/0x2a0
[11540.590550]        shrink_node+0x2eb/0x7b0
[11540.590757]        balance_pgdat+0x344/0x780
[11540.590973]        kswapd+0x205/0x410
[11540.591141]        kthread+0xfc/0x130
[11540.591326]        ret_from_fork+0x2d/0x50
[11540.591507]        ret_from_fork_asm+0x1b/0x30
[11540.591733] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[11540.591995]        fs_reclaim_acquire+0xa5/0xe0
[11540.592208]        kmem_cache_alloc_lru+0x4e/0x570
[11540.592440]        btrfs_alloc_inode+0x2d/0x250
[11540.592649]        alloc_inode+0x1a/0xc0
[11540.592890]        iget5_locked+0xba/0x110
[11540.593107]        btrfs_iget+0x43/0xe0
[11540.593349]        create_reloc_inode+0x19d/0x370
[11540.593617]        btrfs_relocate_block_group+0x1b7/0x410
[11540.593850]        btrfs_relocate_chunk+0x4c/0x1b0
[11540.594062]        btrfs_balance+0x8e7/0x11d0
[11540.594280]        btrfs_ioctl+0x1d3d/0x2900
[11540.594489]        __x64_sys_ioctl+0x8b/0xc0
[11540.594686]        do_syscall_64+0x38/0x90
[11540.594866]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11540.595125] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[11540.595441]        join_transaction+0xb4/0x590
[11540.595650]        start_transaction+0x187/0x740
[11540.595853]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[11540.596073]        kthread+0xfc/0x130
[11540.596238]        ret_from_fork+0x2d/0x50
[11540.596752]        ret_from_fork_asm+0x1b/0x30
[11540.597006] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[11540.597303]        __lock_acquire+0x1415/0x2190
[11540.597507]        lock_acquire+0xc7/0x2b0
[11540.597696]        join_transaction+0x1de/0x590
[11540.597899]        start_transaction+0x187/0x740
[11540.598104]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[11540.598357]        btrfs_evict_inode+0x273/0x3c0
[11540.598567]        evict+0xcc/0x1d0
[11540.598726]        inode_lru_isolate+0x14d/0x1e0
[11540.598931]        __list_lru_walk_one+0xbe/0x1c0
[11540.599138]        list_lru_walk_one+0x58/0x80
[11540.599336]        prune_icache_sb+0x39/0x60
[11540.599528]        super_cache_scan+0x161/0x1f0
[11540.599739]        do_shrink_slab+0x163/0x340
[11540.599935]        shrink_slab+0x1d7/0x2a0
[11540.600117]        shrink_node+0x2eb/0x7b0
[11540.600297]        balance_pgdat+0x344/0x780
[11540.600520]        kswapd+0x205/0x410
[11540.600770]        kthread+0xfc/0x130
[11540.600970]        ret_from_fork+0x2d/0x50
[11540.601153]        ret_from_fork_asm+0x1b/0x30
[11540.601353] 
               other info that might help us debug this:

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

[11540.602168]  Possible unsafe locking scenario:

[11540.602427]        CPU0                    CPU1
[11540.602630]        ----                    ----
[11540.602830]   rlock(sb_internal#2);
[11540.602989]                                lock(fs_reclaim);
[11540.603240]                                lock(sb_internal#2);
[11540.603499]   rlock(btrfs_trans_num_writers);
[11540.603697] 
                *** DEADLOCK ***

[11540.603956] 4 locks held by kswapd0/47:
[11540.604128]  #0: ffffffffa9e62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[11540.604483]  #1: ffffffffa9e507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[11540.604845]  #2: ffff903a3569a0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[11540.605250]  #3: ffff903a3569a600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11540.605685] 
               stack backtrace:
[11540.605879] CPU: 1 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc3+ #1258
[11540.606161] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[11540.606527] Call Trace:
[11540.606647]  
[11540.606751]  dump_stack_lvl+0x58/0x90
[11540.606924]  check_noncircular+0x101/0x110
[11540.607121]  __lock_acquire+0x1415/0x2190
[11540.607318]  lock_acquire+0xc7/0x2b0
[11540.607483]  ? join_transaction+0x1af/0x590
[11540.607678]  ? lock_release+0x134/0x270
[11540.607854]  join_transaction+0x1de/0x590
[11540.608038]  ? join_transaction+0x1af/0x590
[11540.608227]  start_transaction+0x187/0x740
[11540.608412]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[11540.608652]  btrfs_evict_inode+0x273/0x3c0
[11540.608836]  ? lock_release+0x134/0x270
[11540.609010]  ? __pfx_wake_bit_function+0x10/0x10
[11540.609217]  evict+0xcc/0x1d0
[11540.609356]  inode_lru_isolate+0x14d/0x1e0
[11540.609541]  __list_lru_walk_one+0xbe/0x1c0
[11540.609734]  ? __pfx_inode_lru_isolate+0x10/0x10
[11540.609942]  ? __pfx_inode_lru_isolate+0x10/0x10
[11540.610150]  list_lru_walk_one+0x58/0x80
[11540.610327]  prune_icache_sb+0x39/0x60
[11540.610498]  super_cache_scan+0x161/0x1f0
[11540.610682]  do_shrink_slab+0x163/0x340
[11540.610856]  ? lock_is_held_type+0xe2/0x140
[11540.611046]  shrink_slab+0x1d7/0x2a0
[11540.611210]  shrink_node+0x2eb/0x7b0
[11540.611375]  balance_pgdat+0x344/0x780
[11540.611546]  kswapd+0x205/0x410
[11540.611697]  ? __pfx_autoremove_wake_function+0x10/0x10
[11540.611927]  ? __pfx_kswapd+0x10/0x10
[11540.612093]  kthread+0xfc/0x130
[11540.612240]  ? __pfx_kthread+0x10/0x10
[11540.612410]  ret_from_fork+0x2d/0x50
[11540.612578]  ? __pfx_kthread+0x10/0x10
[11540.612748]  ret_from_fork_asm+0x1b/0x30
[11540.612924] RIP: 0000:0x0
[11540.613060] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[11540.613344] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[11540.613764] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[11540.614072] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[11540.614379] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[11540.614697] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[11540.615004] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[11540.615314]  
[12138.052187] BTRFS: device fsid 6d6e214c-010c-4e99-9ebe-f72b1a32d730 devid 1 transid 71 /dev/mapper/vg0-lv9 scanned by mount (1589050)
[12138.053306] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[12138.053673] BTRFS info (device dm-9): turning on async discard
[12138.053915] BTRFS info (device dm-9): disk space caching is enabled