[53613.055717] run fstests generic/251 at 2023-09-02 11:48:31
[53613.490668] BTRFS: device fsid 13921637-4436-40f4-9cb4-e48f1103a380 devid 1 transid 2379422 /dev/mapper/vg0-lv0 scanned by mount (3743961)
[53613.491322] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[53613.491329] BTRFS info (device dm-0): using free space tree
[53613.494951] BTRFS info (device dm-0): auto enabling async discard
[53613.699704] BTRFS: device fsid 9b6b5c52-9dc5-4b08-ba93-32ebbacc2c4a devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (3744009)
[53613.717726] BTRFS info: devid 1 device path /dev/mapper/vg0-lv9 changed to /dev/dm-9 scanned by systemd-udevd (3743825)
[53613.718421] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[53613.718430] BTRFS info (device dm-9): using free space tree
[53613.719143] BTRFS info: devid 1 device path /dev/dm-9 changed to /dev/mapper/vg0-lv9 scanned by systemd-udevd (3743825)
[53613.722051] BTRFS info (device dm-9): auto enabling async discard
[53613.722167] BTRFS info (device dm-9): checking UUID tree
[54495.696222] ======================================================
[54495.696731] WARNING: possible circular locking dependency detected
[54495.697089] 6.5.0-rc7+ #1289 Not tainted
[54495.697321] ------------------------------------------------------
[54495.697682] kswapd0/47 is trying to acquire lock:
[54495.697964] ffff8b008707e388 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[54495.698529]
but task is already holding lock:
[54495.698873] ffff8b00c2543600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[54495.699429]
which lock already depends on the new lock.
[54495.699908]
the existing dependency chain (in reverse order) is:
[54495.700345]
-> #3 (sb_internal#2){++++}-{0:0}:
[54495.700706] start_transaction+0x3f9/0x740
[54495.700982] btrfs_commit_inode_delayed_inode+0x5f/0x120
[54495.701339] btrfs_evict_inode+0x273/0x3c0
[54495.701803] evict+0xcc/0x1d0
[54495.702196] inode_lru_isolate+0x14d/0x1e0
[54495.702694] __list_lru_walk_one+0xbe/0x1c0
[54495.703094] list_lru_walk_one+0x58/0x80
[54495.703417] prune_icache_sb+0x39/0x60
[54495.703835] super_cache_scan+0x161/0x1f0
[54495.704456] do_shrink_slab+0x163/0x340
[54495.704820] shrink_slab+0x1d7/0x2a0
[54495.705316] shrink_node+0x2eb/0x7b0
[54495.705589] balance_pgdat+0x344/0x780
[54495.705899] kswapd+0x205/0x410
[54495.706150] kthread+0xfc/0x130
[54495.706421] ret_from_fork+0x2d/0x50
[54495.706734] ret_from_fork_asm+0x1b/0x30
[54495.707053]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[54495.707583] fs_reclaim_acquire+0xa5/0xe0
[54495.707868] kmem_cache_alloc_lru+0x4e/0x570
[54495.708179] btrfs_alloc_inode+0x2d/0x250
[54495.708455] alloc_inode+0x1a/0xc0
[54495.708745] iget5_locked+0xba/0x110
[54495.708987] btrfs_iget+0x43/0xe0
[54495.709333] create_reloc_inode+0x19d/0x370
[54495.709722] btrfs_relocate_block_group+0x1b7/0x410
[54495.710091] btrfs_relocate_chunk+0x4c/0x1b0
[54495.710526] btrfs_balance+0x8e7/0x11d0
[54495.710830] btrfs_ioctl+0x1d3d/0x2900
[54495.711251] __x64_sys_ioctl+0x8b/0xc0
[54495.711514] do_syscall_64+0x38/0x90
[54495.711910] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[54495.712319]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[54495.712836] join_transaction+0xb4/0x590
[54495.713249] start_transaction+0x187/0x740
[54495.713528] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[54495.713964] kthread+0xfc/0x130
[54495.714269] ret_from_fork+0x2d/0x50
[54495.714569] ret_from_fork_asm+0x1b/0x30
[54495.714907]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[54495.715407] __lock_acquire+0x1415/0x2190
[54495.715798] lock_acquire+0xc7/0x2b0
[54495.716075] join_transaction+0x1de/0x590
[54495.716560] start_transaction+0x187/0x740
[54495.716947] btrfs_commit_inode_delayed_inode+0x5f/0x120
[54495.717353] btrfs_evict_inode+0x273/0x3c0
[54495.717757] evict+0xcc/0x1d0
[54495.718018] inode_lru_isolate+0x14d/0x1e0
[54495.718375] __list_lru_walk_one+0xbe/0x1c0
[54495.718655] list_lru_walk_one+0x58/0x80
[54495.718993] prune_icache_sb+0x39/0x60
[54495.719287] super_cache_scan+0x161/0x1f0
[54495.719683] do_shrink_slab+0x163/0x340
[54495.719951] shrink_slab+0x1d7/0x2a0
[54495.720318] shrink_node+0x2eb/0x7b0
[54495.720627] balance_pgdat+0x344/0x780
[54495.720889] kswapd+0x205/0x410
[54495.721282] kthread+0xfc/0x130
[54495.721628] ret_from_fork+0x2d/0x50
[54495.722049] ret_from_fork_asm+0x1b/0x30
[54495.722362]
other info that might help us debug this:
[54495.723058] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[54495.724013] Possible unsafe locking scenario:
[54495.724424] CPU0 CPU1
[54495.724942] ---- ----
[54495.725382] rlock(sb_internal#2);
[54495.725658] lock(fs_reclaim);
[54495.726055] lock(sb_internal#2);
[54495.726463] rlock(btrfs_trans_num_writers);
[54495.726765]
*** DEADLOCK ***
[54495.727151] 4 locks held by kswapd0/47:
[54495.727385] #0: ffffffff8ae62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[54495.727894] #1: ffffffff8ae507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[54495.728447] #2: ffff8b00c25430e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[54495.729491] #3: ffff8b00c2543600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[54495.730601]
stack backtrace:
[54495.731145] CPU: 1 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc7+ #1289
[54495.731790] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[54495.732587] Call Trace:
[54495.732856]
[54495.733086] dump_stack_lvl+0x58/0x90
[54495.733517] check_noncircular+0x101/0x110
[54495.734000] __lock_acquire+0x1415/0x2190
[54495.734508] lock_acquire+0xc7/0x2b0
[54495.734961] ? join_transaction+0x1af/0x590
[54495.735511] ? lock_release+0x134/0x270
[54495.736040] join_transaction+0x1de/0x590
[54495.736533] ? join_transaction+0x1af/0x590
[54495.737044] start_transaction+0x187/0x740
[54495.737543] btrfs_commit_inode_delayed_inode+0x5f/0x120
[54495.738202] btrfs_evict_inode+0x273/0x3c0
[54495.738722] ? lock_release+0x134/0x270
[54495.739188] ? __pfx_wake_bit_function+0x10/0x10
[54495.739741] evict+0xcc/0x1d0
[54495.740150] inode_lru_isolate+0x14d/0x1e0
[54495.740722] __list_lru_walk_one+0xbe/0x1c0
[54495.741304] ? __pfx_inode_lru_isolate+0x10/0x10
[54495.741903] ? __pfx_inode_lru_isolate+0x10/0x10
[54495.742538] list_lru_walk_one+0x58/0x80
[54495.743088] prune_icache_sb+0x39/0x60
[54495.743601] super_cache_scan+0x161/0x1f0
[54495.744152] do_shrink_slab+0x163/0x340
[54495.744686] ? lock_is_held_type+0xe2/0x140
[54495.745293] shrink_slab+0x1d7/0x2a0
[54495.745789] shrink_node+0x2eb/0x7b0
[54495.746246] balance_pgdat+0x344/0x780
[54495.746784] kswapd+0x205/0x410
[54495.747216] ? __pfx_autoremove_wake_function+0x10/0x10
[54495.747916] ? __pfx_kswapd+0x10/0x10
[54495.748421] kthread+0xfc/0x130
[54495.748859] ? __pfx_kthread+0x10/0x10
[54495.749378] ret_from_fork+0x2d/0x50
[54495.749843] ? __pfx_kthread+0x10/0x10
[54495.750470] ret_from_fork_asm+0x1b/0x30
[54495.750983]
[54638.671366] BTRFS: device fsid 9b6b5c52-9dc5-4b08-ba93-32ebbacc2c4a devid 1 transid 137 /dev/mapper/vg0-lv9 scanned by mount (3754692)
[54638.672605] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[54638.673126] BTRFS info (device dm-9): using free space tree
[54638.676677] BTRFS info (device dm-9): auto enabling async discard