[10940.180225] run fstests generic/251 at 2023-08-07 00:00:44
[10940.594775] BTRFS: device fsid 13921637-4436-40f4-9cb4-e48f1103a380 devid 1 transid 2259601 /dev/mapper/vg0-lv0 scanned by mount (1589382)
[10940.595993] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[10940.596000] BTRFS info (device dm-0): using free space tree
[10940.599491] BTRFS info (device dm-0): auto enabling async discard
[10940.900286] BTRFS: device fsid 8ff5591a-5c7e-4379-8bbe-c4206a6bdae4 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (1589430)
[10940.917281] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[10940.917289] BTRFS info (device dm-9): disk space caching is enabled
[10940.918567] BTRFS info: devid 1 device path /dev/mapper/vg0-lv9 changed to /dev/dm-9 scanned by systemd-udevd (1588294)
[10940.919433] BTRFS info: devid 1 device path /dev/dm-9 changed to /dev/mapper/vg0-lv9 scanned by systemd-udevd (1588294)
[10940.920291] BTRFS info (device dm-9): auto enabling async discard
[10940.920418] BTRFS info (device dm-9): checking UUID tree
[11166.600697] ======================================================
[11166.601085] WARNING: possible circular locking dependency detected
[11166.601497] 6.5.0-rc3+ #1263 Not tainted
[11166.601789] ------------------------------------------------------
[11166.602201] kswapd0/47 is trying to acquire lock:
[11166.602595] ffff8cbc9c0ee378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[11166.603310]
but task is already holding lock:
[11166.603770] ffff8cbc47077600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11166.604515]
which lock already depends on the new lock.
[11166.605161]
the existing dependency chain (in reverse order) is:
[11166.606024]
-> #3 (sb_internal#2){++++}-{0:0}:
[11166.606582] start_transaction+0x3f9/0x740
[11166.606979] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11166.607456] btrfs_evict_inode+0x273/0x3c0
[11166.607840] evict+0xcc/0x1d0
[11166.608131] inode_lru_isolate+0x14d/0x1e0
[11166.608510] __list_lru_walk_one+0xbe/0x1c0
[11166.608898] list_lru_walk_one+0x58/0x80
[11166.609266] prune_icache_sb+0x39/0x60
[11166.609623] super_cache_scan+0x161/0x1f0
[11166.609997] do_shrink_slab+0x163/0x340
[11166.610359] shrink_slab+0x1d7/0x2a0
[11166.610689] shrink_node+0x2eb/0x7b0
[11166.611065] balance_pgdat+0x344/0x780
[11166.611412] kswapd+0x205/0x410
[11166.611725] kthread+0xfc/0x130
[11166.612030] ret_from_fork+0x2d/0x50
[11166.612365] ret_from_fork_asm+0x1b/0x30
[11166.612737]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[11166.613201] fs_reclaim_acquire+0xa5/0xe0
[11166.613578] kmem_cache_alloc_lru+0x4e/0x570
[11166.613967] btrfs_alloc_inode+0x2d/0x250
[11166.614385] alloc_inode+0x1a/0xc0
[11166.614735] iget5_locked+0xba/0x110
[11166.615066] btrfs_iget+0x43/0xe0
[11166.615384] create_reloc_inode+0x19d/0x370
[11166.615768] btrfs_relocate_block_group+0x1b7/0x410
[11166.616206] btrfs_relocate_chunk+0x4c/0x1b0
[11166.616604] btrfs_balance+0x8e7/0x11d0
[11166.616960] btrfs_ioctl+0x1d3d/0x2900
[11166.617310] __x64_sys_ioctl+0x8b/0xc0
[11166.617665] do_syscall_64+0x38/0x90
[11166.618002] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11166.618440]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[11166.619005] join_transaction+0xb4/0x590
[11166.619365] start_transaction+0x187/0x740
[11166.619743] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[11166.620155] kthread+0xfc/0x130
[11166.620455] ret_from_fork+0x2d/0x50
[11166.620789] ret_from_fork_asm+0x1b/0x30
[11166.621151]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[11166.621692] __lock_acquire+0x1415/0x2190
[11166.622141] lock_acquire+0xc7/0x2b0
[11166.622476] join_transaction+0x1de/0x590
[11166.622877] start_transaction+0x187/0x740
[11166.623261] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11166.623775] btrfs_evict_inode+0x273/0x3c0
[11166.624153] evict+0xcc/0x1d0
[11166.624445] inode_lru_isolate+0x14d/0x1e0
[11166.624826] __list_lru_walk_one+0xbe/0x1c0
[11166.625217] list_lru_walk_one+0x58/0x80
[11166.625586] prune_icache_sb+0x39/0x60
[11166.625937] super_cache_scan+0x161/0x1f0
[11166.626306] do_shrink_slab+0x163/0x340
[11166.626670] shrink_slab+0x1d7/0x2a0
[11166.627005] shrink_node+0x2eb/0x7b0
[11166.627341] balance_pgdat+0x344/0x780
[11166.627696] kswapd+0x205/0x410
[11166.627997] kthread+0xfc/0x130
[11166.628298] ret_from_fork+0x2d/0x50
[11166.628637] ret_from_fork_asm+0x1b/0x30
[11166.629001]
other info that might help us debug this:
[11166.629630] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[11166.630378] Possible unsafe locking scenario:
[11166.630740] CPU0 CPU1
[11166.631004] ---- ----
[11166.631268] rlock(sb_internal#2);
[11166.631475] lock(fs_reclaim);
[11166.631816] lock(sb_internal#2);
[11166.632170] rlock(btrfs_trans_num_writers);
[11166.632429]
*** DEADLOCK ***
[11166.632846] 4 locks held by kswapd0/47:
[11166.633079] #0: ffffffff9be62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[11166.633560] #1: ffffffff9be507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[11166.634042] #2: ffff8cbc470770e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[11166.634594] #3: ffff8cbc47077600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11166.635172]
stack backtrace:
[11166.635428] CPU: 0 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc3+ #1263
[11166.635806] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[11166.636296] Call Trace:
[11166.636448]
[11166.636604] dump_stack_lvl+0x58/0x90
[11166.636829] check_noncircular+0x101/0x110
[11166.637077] __lock_acquire+0x1415/0x2190
[11166.637315] lock_acquire+0xc7/0x2b0
[11166.637535] ? join_transaction+0x1af/0x590
[11166.637786] ? lock_release+0x134/0x270
[11166.638013] join_transaction+0x1de/0x590
[11166.638248] ? join_transaction+0x1af/0x590
[11166.638497] start_transaction+0x187/0x740
[11166.638747] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11166.639058] btrfs_evict_inode+0x273/0x3c0
[11166.639304] ? lock_release+0x134/0x270
[11166.639546] ? __pfx_wake_bit_function+0x10/0x10
[11166.639821] evict+0xcc/0x1d0
[11166.640001] inode_lru_isolate+0x14d/0x1e0
[11166.640243] __list_lru_walk_one+0xbe/0x1c0
[11166.640536] ? __pfx_inode_lru_isolate+0x10/0x10
[11166.640812] ? __pfx_inode_lru_isolate+0x10/0x10
[11166.641085] list_lru_walk_one+0x58/0x80
[11166.641318] prune_icache_sb+0x39/0x60
[11166.641553] super_cache_scan+0x161/0x1f0
[11166.641792] do_shrink_slab+0x163/0x340
[11166.642023] ? lock_is_held_type+0xe2/0x140
[11166.642308] shrink_slab+0x1d7/0x2a0
[11166.642568] shrink_node+0x2eb/0x7b0
[11166.642783] balance_pgdat+0x344/0x780
[11166.643008] kswapd+0x205/0x410
[11166.643199] ? __pfx_autoremove_wake_function+0x10/0x10
[11166.643508] ? __pfx_kswapd+0x10/0x10
[11166.643732] kthread+0xfc/0x130
[11166.643924] ? __pfx_kthread+0x10/0x10
[11166.644148] ret_from_fork+0x2d/0x50
[11166.644363] ? __pfx_kthread+0x10/0x10
[11166.644601] ret_from_fork_asm+0x1b/0x30
[11166.644834] RIP: 0000:0x0
[11166.645012] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[11166.645386] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[11166.645840] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[11166.646250] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[11166.646673] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[11166.647084] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[11166.647500] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[11166.647924]
[11860.735860] BTRFS: device fsid 8ff5591a-5c7e-4379-8bbe-c4206a6bdae4 devid 1 transid 66 /dev/mapper/vg0-lv9 scanned by mount (1601892)
[11860.739299] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[11860.739857] BTRFS info (device dm-9): disk space caching is enabled
[11860.744514] BTRFS info (device dm-9): auto enabling async discard