[55054.982522] run fstests generic/251 at 2023-07-30 12:11:31
[55055.418616] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2434578 /dev/mapper/vg0-lv0 scanned by mount (3766961)
[55055.419989] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[55055.419995] BTRFS info (device dm-0): using free space tree
[55055.423453] BTRFS info (device dm-0): auto enabling async discard
[55055.626691] BTRFS: device fsid 7a254c38-d71a-4663-849f-c2161480182b devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (3767009)
[55055.646623] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[55055.646633] BTRFS info (device dm-9): turning on sync discard
[55055.646636] BTRFS info (device dm-9): enabling free space tree
[55055.646638] BTRFS info (device dm-9): using free space tree
[55055.658848] BTRFS info (device dm-9): creating free space tree
[55055.660241] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[55055.660246] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[55055.676488] BTRFS info (device dm-9): cleaning free space cache v1
[55055.684156] BTRFS info (device dm-9): checking UUID tree

[55511.897804] ======================================================
[55511.898175] WARNING: possible circular locking dependency detected
[55511.898523] 6.5.0-rc3+ #1255 Not tainted
[55511.898754] ------------------------------------------------------
[55511.899092] kswapd0/47 is trying to acquire lock:
[55511.899361] ffff9d2eafb4a378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[55511.899910] 
               but task is already holding lock:
[55511.900249] ffff9d2e43afd600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[55511.900787] 
               which lock already depends on the new lock.

[55511.901224] 
               the existing dependency chain (in reverse order) is:
[55511.901643] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[55511.901972]        start_transaction+0x3f9/0x740
[55511.902235]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[55511.902586]        btrfs_evict_inode+0x273/0x3c0
[55511.902872]        evict+0xcc/0x1d0
[55511.903092]        inode_lru_isolate+0x14d/0x1e0
[55511.903376]        __list_lru_walk_one+0xbe/0x1c0
[55511.903657]        list_lru_walk_one+0x58/0x80
[55511.903908]        prune_icache_sb+0x39/0x60
[55511.904155]        super_cache_scan+0x161/0x1f0
[55511.904422]        do_shrink_slab+0x163/0x340
[55511.904681]        shrink_slab+0x1d7/0x2a0
[55511.904919]        shrink_node+0x2eb/0x7b0
[55511.905155]        balance_pgdat+0x344/0x780
[55511.905410]        kswapd+0x205/0x410
[55511.905631]        kthread+0xfc/0x130
[55511.905852]        ret_from_fork+0x2d/0x50
[55511.906107]        ret_from_fork_asm+0x1b/0x30
[55511.906371] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[55511.906713]        fs_reclaim_acquire+0xa5/0xe0
[55511.906989]        kmem_cache_alloc_lru+0x4e/0x570
[55511.907263]        btrfs_alloc_inode+0x2d/0x250
[55511.907517]        alloc_inode+0x1a/0xc0
[55511.907759]        iget5_locked+0xba/0x110
[55511.907993]        btrfs_iget+0x43/0xe0
[55511.908219]        create_reloc_inode+0x19d/0x370
[55511.908480]        btrfs_relocate_block_group+0x1b7/0x410
[55511.908803]        btrfs_relocate_chunk+0x4c/0x1b0
[55511.909084]        btrfs_balance+0x8e7/0x11d0
[55511.909345]        btrfs_ioctl+0x1d3d/0x2900
[55511.909604]        __x64_sys_ioctl+0x8b/0xc0
[55511.909854]        do_syscall_64+0x38/0x90
[55511.910094]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[55511.910415] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[55511.910830]        join_transaction+0xb4/0x590
[55511.911089]        start_transaction+0x187/0x740
[55511.911374]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[55511.911675]        kthread+0xfc/0x130
[55511.911891]        ret_from_fork+0x2d/0x50
[55511.912122]        ret_from_fork_asm+0x1b/0x30
[55511.912392] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[55511.912785]        __lock_acquire+0x1415/0x2190
[55511.913050]        lock_acquire+0xc7/0x2b0
[55511.913293]        join_transaction+0x1de/0x590
[55511.913558]        start_transaction+0x187/0x740
[55511.913828]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[55511.914165]        btrfs_evict_inode+0x273/0x3c0
[55511.914440]        evict+0xcc/0x1d0
[55511.914656]        inode_lru_isolate+0x14d/0x1e0
[55511.914933]        __list_lru_walk_one+0xbe/0x1c0
[55511.915199]        list_lru_walk_one+0x58/0x80
[55511.915454]        prune_icache_sb+0x39/0x60
[55511.915713]        super_cache_scan+0x161/0x1f0
[55511.915981]        do_shrink_slab+0x163/0x340
[55511.916230]        shrink_slab+0x1d7/0x2a0
[55511.916466]        shrink_node+0x2eb/0x7b0
[55511.916707]        balance_pgdat+0x344/0x780
[55511.916957]        kswapd+0x205/0x410
[55511.917186]        kthread+0xfc/0x130
[55511.917394]        ret_from_fork+0x2d/0x50
[55511.917639]        ret_from_fork_asm+0x1b/0x30
[55511.917897] 
               other info that might help us debug this:

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

[55511.918954]  Possible unsafe locking scenario:

[55511.919302]        CPU0                    CPU1
[55511.919561]        ----                    ----
[55511.919818]   rlock(sb_internal#2);
[55511.920034]                                lock(fs_reclaim);
[55511.920366]                                lock(sb_internal#2);
[55511.920710]   rlock(btrfs_trans_num_writers);
[55511.920947] 
                *** DEADLOCK ***

[55511.921294] 4 locks held by kswapd0/47:
[55511.921512]  #0: ffffffff97e62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[55511.922005]  #1: ffffffff97e507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[55511.922483]  #2: ffff9d2e43afd0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[55511.923024]  #3: ffff9d2e43afd600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[55511.923605] 
               stack backtrace:
[55511.923857] CPU: 1 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc3+ #1255
[55511.924235] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[55511.924728] Call Trace:
[55511.924881]  
[55511.925018]  dump_stack_lvl+0x58/0x90
[55511.925236]  check_noncircular+0x101/0x110
[55511.925477]  __lock_acquire+0x1415/0x2190
[55511.925728]  lock_acquire+0xc7/0x2b0
[55511.925958]  ? join_transaction+0x1af/0x590
[55511.926209]  ? lock_release+0x134/0x270
[55511.926430]  join_transaction+0x1de/0x590
[55511.926666]  ? join_transaction+0x1af/0x590
[55511.926908]  start_transaction+0x187/0x740
[55511.927155]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[55511.927468]  btrfs_evict_inode+0x273/0x3c0
[55511.927729]  ? lock_release+0x134/0x270
[55511.927945]  ? __pfx_wake_bit_function+0x10/0x10
[55511.928215]  evict+0xcc/0x1d0
[55511.928391]  inode_lru_isolate+0x14d/0x1e0
[55511.928639]  __list_lru_walk_one+0xbe/0x1c0
[55511.928869]  ? __pfx_inode_lru_isolate+0x10/0x10
[55511.929139]  ? __pfx_inode_lru_isolate+0x10/0x10
[55511.929421]  list_lru_walk_one+0x58/0x80
[55511.929692]  prune_icache_sb+0x39/0x60
[55511.929855]  super_cache_scan+0x161/0x1f0
[55511.930117]  do_shrink_slab+0x163/0x340
[55511.930362]  ? lock_is_held_type+0xe2/0x140
[55511.930628]  shrink_slab+0x1d7/0x2a0
[55511.930856]  shrink_node+0x2eb/0x7b0
[55511.931081]  balance_pgdat+0x344/0x780
[55511.931325]  kswapd+0x205/0x410
[55511.931533]  ? __pfx_autoremove_wake_function+0x10/0x10
[55511.931847]  ? __pfx_kswapd+0x10/0x10
[55511.932088]  kthread+0xfc/0x130
[55511.932295]  ? __pfx_kthread+0x10/0x10
[55511.932538]  ret_from_fork+0x2d/0x50
[55511.932766]  ? __pfx_kthread+0x10/0x10
[55511.933016]  ret_from_fork_asm+0x1b/0x30
[55511.933262] RIP: 0000:0x0
[55511.933447] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[55511.933820] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[55511.934271] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[55511.934691] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[55511.935108] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[55511.935540] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[55511.935889] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[55511.936298]  
[55824.360315] BTRFS warning (device dm-9): failed to trim 12 block group(s), last error -512
[55828.297555] BTRFS: device fsid 7a254c38-d71a-4663-849f-c2161480182b devid 1 transid 239 /dev/mapper/vg0-lv9 scanned by mount (3776077)
[55828.299037] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[55828.299321] BTRFS info (device dm-9): turning on sync discard
[55828.299548] BTRFS info (device dm-9): using free space tree