[50932.564293] run fstests generic/251 at 2023-07-19 11:07:10
[50933.078791] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2347475 /dev/mapper/vg0-lv0 scanned by mount (3760436)
[50933.079479] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[50933.079486] BTRFS info (device dm-0): using free space tree
[50933.083808] BTRFS info (device dm-0): auto enabling async discard
[50933.309303] BTRFS: device fsid 83a291ac-a47c-4c26-873d-d929f8d216b1 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (3760484)
[50933.336138] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[50933.336147] BTRFS info (device dm-9): turning on sync discard
[50933.336150] BTRFS info (device dm-9): enabling free space tree
[50933.336152] BTRFS info (device dm-9): using free space tree
[50933.339889] BTRFS info (device dm-9): creating free space tree
[50933.341304] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[50933.341311] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[50933.349640] BTRFS info (device dm-9): cleaning free space cache v1
[50933.357704] BTRFS info (device dm-9): checking UUID tree

[51127.073783] ======================================================
[51127.074004] WARNING: possible circular locking dependency detected
[51127.074225] 6.5.0-rc2+ #1244 Not tainted
[51127.074368] ------------------------------------------------------
[51127.074588] kswapd0/47 is trying to acquire lock:
[51127.074763] ffff9b00d6e8e378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x19f/0x550
[51127.075106] 
               but task is already holding lock:
[51127.075313] ffff9b012b309600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[51127.075657] 
               which lock already depends on the new lock.

[51127.075947] 
               the existing dependency chain (in reverse order) is:
[51127.076209] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[51127.076423]        start_transaction+0x401/0x730
[51127.076593]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[51127.076808]        btrfs_evict_inode+0x273/0x3c0
[51127.076979]        evict+0xcc/0x1d0
[51127.077114]        inode_lru_isolate+0x14d/0x1e0
[51127.077281]        __list_lru_walk_one+0xbe/0x1c0
[51127.077458]        list_lru_walk_one+0x58/0x80
[51127.077620]        prune_icache_sb+0x39/0x60
[51127.077781]        super_cache_scan+0x161/0x1f0
[51127.077949]        do_shrink_slab+0x163/0x340
[51127.078109]        shrink_slab+0x1d7/0x2a0
[51127.078259]        shrink_node+0x2eb/0x7b0
[51127.078408]        balance_pgdat+0x344/0x780
[51127.078567]        kswapd+0x205/0x410
[51127.079174]        kthread+0xfc/0x130
[51127.079424]        ret_from_fork+0x2d/0x50
[51127.079642]        ret_from_fork_asm+0x1b/0x30
[51127.079886] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[51127.080178]        fs_reclaim_acquire+0xa5/0xe0
[51127.080420]        kmem_cache_alloc_lru+0x4e/0x570
[51127.080675]        btrfs_alloc_inode+0x2d/0x250
[51127.080917]        alloc_inode+0x1a/0xc0
[51127.081123]        iget5_locked+0xba/0x110
[51127.081338]        btrfs_iget+0x43/0xe0
[51127.081540]        create_reloc_inode+0x19d/0x370
[51127.081788]        btrfs_relocate_block_group+0x1b7/0x410
[51127.082063]        btrfs_relocate_chunk+0x4c/0x190
[51127.082318]        btrfs_balance+0x8e7/0x11d0
[51127.082548]        btrfs_ioctl+0x1d3d/0x2900
[51127.082781]        __x64_sys_ioctl+0x8b/0xc0
[51127.083008]        do_syscall_64+0x38/0x90
[51127.083231]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[51127.083521] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[51127.083881]        join_transaction+0xdb/0x550
[51127.084113]        start_transaction+0x24f/0x730
[51127.084354]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[51127.084616]        kthread+0xfc/0x130
[51127.084813]        ret_from_fork+0x2d/0x50
[51127.085027]        ret_from_fork_asm+0x1b/0x30
[51127.085260] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[51127.085603]        __lock_acquire+0x1415/0x2190
[51127.085861]        lock_acquire+0xc7/0x2b0
[51127.086008]        join_transaction+0x1cd/0x550
[51127.086166]        start_transaction+0x24f/0x730
[51127.086335]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[51127.086555]        btrfs_evict_inode+0x273/0x3c0
[51127.086724]        evict+0xcc/0x1d0
[51127.086849]        inode_lru_isolate+0x14d/0x1e0
[51127.087009]        __list_lru_walk_one+0xbe/0x1c0
[51127.087172]        list_lru_walk_one+0x58/0x80
[51127.087326]        prune_icache_sb+0x39/0x60
[51127.087476]        super_cache_scan+0x161/0x1f0
[51127.087634]        do_shrink_slab+0x163/0x340
[51127.087793]        shrink_slab+0x1d7/0x2a0
[51127.087935]        shrink_node+0x2eb/0x7b0
[51127.088078]        balance_pgdat+0x344/0x780
[51127.088228]        kswapd+0x205/0x410
[51127.088356]        kthread+0xfc/0x130
[51127.088486]        ret_from_fork+0x2d/0x50
[51127.088627]        ret_from_fork_asm+0x1b/0x30
[51127.088789] 
               other info that might help us debug this:

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

[51127.089432]  Possible unsafe locking scenario:

[51127.089633]        CPU0                    CPU1
[51127.089796]        ----                    ----
[51127.089952]   rlock(sb_internal#2);
[51127.090088]                                lock(fs_reclaim);
[51127.090284]                                lock(sb_internal#2);
[51127.090487]   rlock(btrfs_trans_num_writers);
[51127.090640] 
                *** DEADLOCK ***

[51127.090864] 4 locks held by kswapd0/47:
[51127.090999]  #0: ffffffff91e62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[51127.091293]  #1: ffffffff91e507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[51127.091579]  #2: ffff9b012b3090e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[51127.091909]  #3: ffff9b012b309600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[51127.092248] 
               stack backtrace:
[51127.092401] CPU: 0 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc2+ #1244
[51127.092621] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[51127.092911] Call Trace:
[51127.093003]  
[51127.093101]  dump_stack_lvl+0x58/0x90
[51127.093234]  check_noncircular+0x101/0x110
[51127.093481]  __lock_acquire+0x1415/0x2190
[51127.093695]  lock_acquire+0xc7/0x2b0
[51127.093862]  ? join_transaction+0x19f/0x550
[51127.094046]  ? lock_release+0x134/0x270
[51127.094188]  join_transaction+0x1cd/0x550
[51127.094337]  ? join_transaction+0x19f/0x550
[51127.094493]  start_transaction+0x24f/0x730
[51127.094667]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[51127.094874]  btrfs_evict_inode+0x273/0x3c0
[51127.095028]  ? lock_release+0x134/0x270
[51127.095168]  ? __pfx_wake_bit_function+0x10/0x10
[51127.095340]  evict+0xcc/0x1d0
[51127.095453]  inode_lru_isolate+0x14d/0x1e0
[51127.095604]  __list_lru_walk_one+0xbe/0x1c0
[51127.095767]  ? __pfx_inode_lru_isolate+0x10/0x10
[51127.095938]  ? __pfx_inode_lru_isolate+0x10/0x10
[51127.096110]  list_lru_walk_one+0x58/0x80
[51127.096254]  prune_icache_sb+0x39/0x60
[51127.096393]  super_cache_scan+0x161/0x1f0
[51127.096541]  do_shrink_slab+0x163/0x340
[51127.096691]  ? lock_is_held_type+0xe2/0x140
[51127.096857]  shrink_slab+0x1d7/0x2a0
[51127.096992]  shrink_node+0x2eb/0x7b0
[51127.097128]  balance_pgdat+0x344/0x780
[51127.097269]  kswapd+0x205/0x410
[51127.097390]  ? __pfx_autoremove_wake_function+0x10/0x10
[51127.097577]  ? __pfx_kswapd+0x10/0x10
[51127.097721]  kthread+0xfc/0x130
[51127.097843]  ? __pfx_kthread+0x10/0x10
[51127.097982]  ret_from_fork+0x2d/0x50
[51127.098117]  ? __pfx_kthread+0x10/0x10
[51127.098255]  ret_from_fork_asm+0x1b/0x30
[51127.098400] RIP: 0000:0x0
[51127.098511] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[51127.098757] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[51127.099025] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[51127.099279] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[51127.099532] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[51127.099794] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[51127.100047] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[51127.100302]  
[51594.877388] BTRFS: device fsid 83a291ac-a47c-4c26-873d-d929f8d216b1 devid 1 transid 82 /dev/mapper/vg0-lv9 scanned by mount (3768263)
[51594.879251] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[51594.879701] BTRFS info (device dm-9): turning on sync discard
[51594.879921] BTRFS info (device dm-9): using free space tree