[10806.581776] run fstests generic/251 at 2023-07-23 23:52:16
[10806.991485] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1333798 /dev/mapper/vg0-lv0 scanned by mount (1543974)
[10806.992091] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[10806.992097] BTRFS info (device dm-0): using free space tree
[10806.996498] BTRFS info (device dm-0): auto enabling async discard
[10807.244653] BTRFS: device fsid e889d543-3d5a-4520-ab06-56715123aa20 devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mkfs.btrfs (1544022)
[10807.263961] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[10807.263971] BTRFS info (device dm-7): using free space tree
[10807.267478] BTRFS info (device dm-7): auto enabling async discard
[10807.267587] BTRFS info (device dm-7): checking UUID tree
[11505.534638] ======================================================
[11505.534861] WARNING: possible circular locking dependency detected
[11505.535093] 6.5.0-rc2+ #1249 Not tainted
[11505.535263] ------------------------------------------------------
[11505.535483] kswapd0/47 is trying to acquire lock:
[11505.535676] ffff9b15432a6378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x19f/0x550
[11505.536058]
but task is already holding lock:
[11505.536314] ffff9b15934ea600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11505.536660]
which lock already depends on the new lock.
[11505.537017]
the existing dependency chain (in reverse order) is:
[11505.537310]
-> #3 (sb_internal){++++}-{0:0}:
[11505.537566] start_transaction+0x401/0x730
[11505.537760] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11505.537978] btrfs_evict_inode+0x273/0x3c0
[11505.538182] evict+0xcc/0x1d0
[11505.538355] inode_lru_isolate+0x14d/0x1e0
[11505.538545] __list_lru_walk_one+0xbe/0x1c0
[11505.538744] list_lru_walk_one+0x58/0x80
[11505.538935] prune_icache_sb+0x39/0x60
[11505.539115] super_cache_scan+0x161/0x1f0
[11505.539307] do_shrink_slab+0x163/0x340
[11505.539494] shrink_slab+0x1d7/0x2a0
[11505.539673] shrink_node+0x2eb/0x7b0
[11505.539853] balance_pgdat+0x344/0x780
[11505.540050] kswapd+0x205/0x410
[11505.540224] kthread+0xfc/0x130
[11505.540395] ret_from_fork+0x2d/0x50
[11505.540576] ret_from_fork_asm+0x1b/0x30
[11505.540768]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[11505.541026] fs_reclaim_acquire+0xa5/0xe0
[11505.541225] kmem_cache_alloc_lru+0x4e/0x570
[11505.541422] btrfs_alloc_inode+0x2d/0x250
[11505.541611] alloc_inode+0x1a/0xc0
[11505.541788] iget5_locked+0xba/0x110
[11505.541982] btrfs_iget+0x43/0xe0
[11505.542161] create_reloc_inode+0x19d/0x370
[11505.542352] btrfs_relocate_block_group+0x1b7/0x410
[11505.542558] btrfs_relocate_chunk+0x4c/0x190
[11505.542759] btrfs_balance+0x8e7/0x11d0
[11505.542951] btrfs_ioctl+0x1d3d/0x2900
[11505.543137] __x64_sys_ioctl+0x8b/0xc0
[11505.543317] do_syscall_64+0x38/0x90
[11505.543506] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11505.543723]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[11505.544016] join_transaction+0xdb/0x550
[11505.544206] start_transaction+0x24f/0x730
[11505.544398] btrfs_dirty_inode+0x40/0xd0
[11505.544585] touch_atime+0x15b/0x280
[11505.544763] iterate_dir+0x129/0x200
[11505.544953] __x64_sys_getdents64+0x6a/0x120
[11505.545142] do_syscall_64+0x38/0x90
[11505.545321] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11505.545525]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[11505.545800] __lock_acquire+0x1415/0x2190
[11505.545993] lock_acquire+0xc7/0x2b0
[11505.546173] join_transaction+0x1cd/0x550
[11505.546361] start_transaction+0x24f/0x730
[11505.546547] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11505.546759] btrfs_evict_inode+0x273/0x3c0
[11505.546949] evict+0xcc/0x1d0
[11505.547117] inode_lru_isolate+0x14d/0x1e0
[11505.547307] __list_lru_walk_one+0xbe/0x1c0
[11505.547497] list_lru_walk_one+0x58/0x80
[11505.547679] prune_icache_sb+0x39/0x60
[11505.547869] super_cache_scan+0x161/0x1f0
[11505.548847] do_shrink_slab+0x163/0x340
[11505.549041] shrink_slab+0x1d7/0x2a0
[11505.549217] shrink_node+0x2eb/0x7b0
[11505.549397] balance_pgdat+0x344/0x780
[11505.549584] kswapd+0x205/0x410
[11505.549753] kthread+0xfc/0x130
[11505.549926] ret_from_fork+0x2d/0x50
[11505.550104] ret_from_fork_asm+0x1b/0x30
[11505.550290]
other info that might help us debug this:
[11505.550630] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal
[11505.551033] Possible unsafe locking scenario:
[11505.551289] CPU0 CPU1
[11505.551474] ---- ----
[11505.551659] rlock(sb_internal);
[11505.551820] lock(fs_reclaim);
[11505.552032] lock(sb_internal);
[11505.552246] rlock(btrfs_trans_num_writers);
[11505.552426]
*** DEADLOCK ***
[11505.552722] 4 locks held by kswapd0/47:
[11505.552900] #0: ffffffffb2e62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[11505.553213] #1: ffffffffb2e507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[11505.553536] #2: ffff9b15934ea0e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[11505.553876] #3: ffff9b15934ea600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11505.554214]
stack backtrace:
[11505.554437] CPU: 1 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc2+ #1249
[11505.554664] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[11505.554983] Call Trace:
[11505.555128]
[11505.555270] dump_stack_lvl+0x58/0x90
[11505.555444] check_noncircular+0x101/0x110
[11505.555623] __lock_acquire+0x1415/0x2190
[11505.555811] lock_acquire+0xc7/0x2b0
[11505.555985] ? join_transaction+0x19f/0x550
[11505.556165] ? lock_release+0x134/0x270
[11505.556336] join_transaction+0x1cd/0x550
[11505.556516] ? join_transaction+0x19f/0x550
[11505.556699] start_transaction+0x24f/0x730
[11505.556881] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11505.557083] btrfs_evict_inode+0x273/0x3c0
[11505.557263] ? lock_release+0x134/0x270
[11505.557441] ? __pfx_wake_bit_function+0x10/0x10
[11505.557632] evict+0xcc/0x1d0
[11505.557790] inode_lru_isolate+0x14d/0x1e0
[11505.557976] __list_lru_walk_one+0xbe/0x1c0
[11505.558152] ? __pfx_inode_lru_isolate+0x10/0x10
[11505.558341] ? __pfx_inode_lru_isolate+0x10/0x10
[11505.558530] list_lru_walk_one+0x58/0x80
[11505.558710] prune_icache_sb+0x39/0x60
[11505.558885] super_cache_scan+0x161/0x1f0
[11505.559061] do_shrink_slab+0x163/0x340
[11505.559237] ? lock_is_held_type+0xe2/0x140
[11505.559425] shrink_slab+0x1d7/0x2a0
[11505.559626] shrink_node+0x2eb/0x7b0
[11505.559796] balance_pgdat+0x344/0x780
[11505.559978] kswapd+0x205/0x410
[11505.560140] ? __pfx_autoremove_wake_function+0x10/0x10
[11505.560337] ? __pfx_kswapd+0x10/0x10
[11505.560509] kthread+0xfc/0x130
[11505.560671] ? __pfx_kthread+0x10/0x10
[11505.560843] ret_from_fork+0x2d/0x50
[11505.561015] ? __pfx_kthread+0x10/0x10
[11505.561191] ret_from_fork_asm+0x1b/0x30
[11505.561369] RIP: 0000:0x0
[11505.561534] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[11505.561763] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[11505.562060] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[11505.562297] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[11505.562531] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[11505.562771] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[11505.563016] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[11505.563258]
[11715.575383] BTRFS: device fsid e889d543-3d5a-4520-ab06-56715123aa20 devid 1 transid 80 /dev/mapper/vg0-lv7 scanned by mount (1553218)
[11715.576706] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[11715.577033] BTRFS info (device dm-7): using free space tree
[11715.583878] BTRFS info (device dm-7): auto enabling async discard