[54995.277510] run fstests generic/251 at 2023-08-05 12:11:07
[54995.751295] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2482490 /dev/mapper/vg0-lv0 scanned by mount (3781535)
[54995.752418] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[54995.752425] BTRFS info (device dm-0): using free space tree
[54995.755855] BTRFS info (device dm-0): auto enabling async discard
[54996.024085] BTRFS: device fsid 5878e4c5-ec49-4d7f-8509-61da16dec432 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (3781583)
[54996.077418] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[54996.077430] BTRFS info (device dm-9): turning on sync discard
[54996.077435] BTRFS info (device dm-9): enabling free space tree
[54996.077437] BTRFS info (device dm-9): using free space tree
[54996.106617] BTRFS info (device dm-9): creating free space tree
[54996.107683] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[54996.107689] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[54996.117109] BTRFS info (device dm-9): cleaning free space cache v1
[54996.129278] BTRFS info (device dm-9): checking UUID tree

[55363.366347] ======================================================
[55363.366600] WARNING: possible circular locking dependency detected
[55363.366853] 6.5.0-rc3+ #1261 Not tainted
[55363.367017] ------------------------------------------------------
[55363.367274] kswapd0/47 is trying to acquire lock:
[55363.367509] ffff9d05c5ade378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[55363.367961] 
               but task is already holding lock:
[55363.368200] ffff9d062f5f4600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[55363.368599] 
               which lock already depends on the new lock.

[55363.369127] 
               the existing dependency chain (in reverse order) is:
[55363.369438] 
               -> #3 (sb_internal#2){++++}-{0:0}:
[55363.369704]        start_transaction+0x3f9/0x740
[55363.369899]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[55363.370156]        btrfs_evict_inode+0x273/0x3c0
[55363.370357]        evict+0xcc/0x1d0
[55363.370508]        inode_lru_isolate+0x14d/0x1e0
[55363.370730]        __list_lru_walk_one+0xbe/0x1c0
[55363.370928]        list_lru_walk_one+0x58/0x80
[55363.371114]        prune_icache_sb+0x39/0x60
[55363.371301]        super_cache_scan+0x161/0x1f0
[55363.371490]        do_shrink_slab+0x163/0x340
[55363.371676]        shrink_slab+0x1d7/0x2a0
[55363.371847]        shrink_node+0x2eb/0x7b0
[55363.372018]        balance_pgdat+0x344/0x780
[55363.372196]        kswapd+0x205/0x410
[55363.372357]        kthread+0xfc/0x130
[55363.372517]        ret_from_fork+0x2d/0x50
[55363.372692]        ret_from_fork_asm+0x1b/0x30
[55363.372900] 
               -> #2 (fs_reclaim){+.+.}-{0:0}:
[55363.373194]        fs_reclaim_acquire+0xa5/0xe0
[55363.373417]        kmem_cache_alloc_lru+0x4e/0x570
[55363.373635]        btrfs_alloc_inode+0x2d/0x250
[55363.373877]        alloc_inode+0x1a/0xc0
[55363.374065]        iget5_locked+0xba/0x110
[55363.374239]        btrfs_iget+0x43/0xe0
[55363.374471]        create_reloc_inode+0x19d/0x370
[55363.374688]        btrfs_relocate_block_group+0x1b7/0x410
[55363.374916]        btrfs_relocate_chunk+0x4c/0x1b0
[55363.375120]        btrfs_balance+0x8e7/0x11d0
[55363.375316]        btrfs_ioctl+0x1d3d/0x2900
[55363.375503]        __x64_sys_ioctl+0x8b/0xc0
[55363.375689]        do_syscall_64+0x38/0x90
[55363.375868]        entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[55363.376104] 
               -> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[55363.376408]        join_transaction+0xb4/0x590
[55363.376601]        start_transaction+0x187/0x740
[55363.376801]        btrfs_uuid_scan_kthread+0x2bc/0x3d0
[55363.377020]        kthread+0xfc/0x130
[55363.377184]        ret_from_fork+0x2d/0x50
[55363.377368]        ret_from_fork_asm+0x1b/0x30
[55363.377564] 
               -> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[55363.377849]        __lock_acquire+0x1415/0x2190
[55363.378048]        lock_acquire+0xc7/0x2b0
[55363.378224]        join_transaction+0x1de/0x590
[55363.378428]        start_transaction+0x187/0x740
[55363.378631]        btrfs_commit_inode_delayed_inode+0x5f/0x120
[55363.378881]        btrfs_evict_inode+0x273/0x3c0
[55363.379084]        evict+0xcc/0x1d0
[55363.379241]        inode_lru_isolate+0x14d/0x1e0
[55363.379451]        __list_lru_walk_one+0xbe/0x1c0
[55363.379658]        list_lru_walk_one+0x58/0x80
[55363.379853]        prune_icache_sb+0x39/0x60
[55363.380040]        super_cache_scan+0x161/0x1f0
[55363.380238]        do_shrink_slab+0x163/0x340
[55363.380438]        shrink_slab+0x1d7/0x2a0
[55363.380616]        shrink_node+0x2eb/0x7b0
[55363.380792]        balance_pgdat+0x344/0x780
[55363.380979]        kswapd+0x205/0x410
[55363.381140]        kthread+0xfc/0x130
[55363.381309]        ret_from_fork+0x2d/0x50
[55363.381490]        ret_from_fork_asm+0x1b/0x30
[55363.381688] 
               other info that might help us debug this:

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

[55363.382486]  Possible unsafe locking scenario:

[55363.382738]        CPU0                    CPU1
[55363.382935]        ----                    ----
[55363.383130]   rlock(sb_internal#2);
[55363.383295]                                lock(fs_reclaim);
[55363.383540]                                lock(sb_internal#2);
[55363.383794]   rlock(btrfs_trans_num_writers);
[55363.383984] 
                *** DEADLOCK ***

[55363.384237] 4 locks held by kswapd0/47:
[55363.384416]  #0: ffffffffaee62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[55363.385021]  #1: ffffffffaee507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[55363.385481]  #2: ffff9d062f5f40e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[55363.385876]  #3: ffff9d062f5f4600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[55363.386303] 
               stack backtrace:
[55363.386491] CPU: 0 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc3+ #1261
[55363.386762] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[55363.387116] Call Trace:
[55363.387229]  
[55363.387338]  dump_stack_lvl+0x58/0x90
[55363.387504]  check_noncircular+0x101/0x110
[55363.387688]  __lock_acquire+0x1415/0x2190
[55363.387872]  lock_acquire+0xc7/0x2b0
[55363.388031]  ? join_transaction+0x1af/0x590
[55363.388215]  ? lock_release+0x134/0x270
[55363.388393]  join_transaction+0x1de/0x590
[55363.388571]  ? join_transaction+0x1af/0x590
[55363.388756]  start_transaction+0x187/0x740
[55363.388939]  btrfs_commit_inode_delayed_inode+0x5f/0x120
[55363.389174]  btrfs_evict_inode+0x273/0x3c0
[55363.389361]  ? lock_release+0x134/0x270
[55363.389532]  ? __pfx_wake_bit_function+0x10/0x10
[55363.389736]  evict+0xcc/0x1d0
[55363.389873]  inode_lru_isolate+0x14d/0x1e0
[55363.390057]  __list_lru_walk_one+0xbe/0x1c0
[55363.390239]  ? __pfx_inode_lru_isolate+0x10/0x10
[55363.390449]  ? __pfx_inode_lru_isolate+0x10/0x10
[55363.390654]  list_lru_walk_one+0x58/0x80
[55363.390827]  prune_icache_sb+0x39/0x60
[55363.390995]  super_cache_scan+0x161/0x1f0
[55363.391171]  do_shrink_slab+0x163/0x340
[55363.391352]  shrink_slab+0x1d7/0x2a0
[55363.391513]  shrink_node+0x2eb/0x7b0
[55363.391674]  balance_pgdat+0x344/0x780
[55363.391842]  kswapd+0x205/0x410
[55363.391983]  ? __pfx_autoremove_wake_function+0x10/0x10
[55363.392208]  ? __pfx_kswapd+0x10/0x10
[55363.392377]  kthread+0xfc/0x130
[55363.392520]  ? __pfx_kthread+0x10/0x10
[55363.392686]  ret_from_fork+0x2d/0x50
[55363.392847]  ? __pfx_kthread+0x10/0x10
[55363.393013]  ret_from_fork_asm+0x1b/0x30
[55363.393186] RIP: 0000:0x0
[55363.393325] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[55363.393603] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[55363.393923] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[55363.394223] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[55363.394538] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[55363.394837] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[55363.395134] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[55363.395440]  
[55709.358935] BTRFS warning (device dm-9): failed to trim 6 block group(s), last error -512
[55712.849433] BTRFS: device fsid 5878e4c5-ec49-4d7f-8509-61da16dec432 devid 1 transid 131 /dev/mapper/vg0-lv9 scanned by mount (3790513)
[55712.850864] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[55712.851144] BTRFS info (device dm-9): turning on sync discard
[55712.851347] BTRFS info (device dm-9): using free space tree