[57104.837091] run fstests generic/251 at 2023-09-22 12:44:09
[57105.613885] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2774960 /dev/mapper/vg0-lv0 scanned by mount (3763519)
[57105.614593] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[57105.614600] BTRFS info (device dm-0): using free space tree
[57105.618812] BTRFS info (device dm-0): auto enabling async discard
[57105.829747] BTRFS: device fsid 20fcab3c-176b-4c2b-a316-c05727c677c2 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (3763577)
[57105.830290] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[57105.830298] BTRFS info (device dm-9): turning on sync discard
[57105.830300] BTRFS info (device dm-9): enabling free space tree
[57105.830302] BTRFS info (device dm-9): using free space tree
[57105.838773] BTRFS info (device dm-9): creating free space tree
[57105.839916] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[57105.839920] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[57105.851835] BTRFS info (device dm-9): cleaning free space cache v1
[57105.864538] BTRFS info (device dm-9): checking UUID tree
[57271.961435] ======================================================
[57271.961670] WARNING: possible circular locking dependency detected
[57271.961909] 6.6.0-rc2+ #1309 Not tainted
[57271.962062] ------------------------------------------------------
[57271.962299] kswapd0/50 is trying to acquire lock:
[57271.962480] ffff989d02e0a398 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[57271.964980]
but task is already holding lock:
[57271.965203] ffff989d2d207600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[57271.965790]
which lock already depends on the new lock.
[57271.966099]
the existing dependency chain (in reverse order) is:
[57271.966380]
-> #3 (sb_internal#2){++++}-{0:0}:
[57271.966609] start_transaction+0x493/0xad0
[57271.966821] btrfs_commit_inode_delayed_inode+0x5f/0x120
[57271.967050] btrfs_evict_inode+0x273/0x3c0
[57271.967237] evict+0xcc/0x1d0
[57271.967688] inode_lru_isolate+0x14d/0x1e0
[57271.967872] __list_lru_walk_one+0xbe/0x1c0
[57271.968325] list_lru_walk_one+0x58/0x80
[57271.968500] prune_icache_sb+0x39/0x60
[57271.968669] super_cache_scan+0x167/0x1f0
[57271.969097] do_shrink_slab+0x163/0x340
[57271.969452] shrink_slab+0x1d7/0x2a0
[57271.969613] shrink_node+0x2eb/0x7b0
[57271.969887] balance_pgdat+0x344/0x780
[57271.970056] kswapd+0x205/0x410
[57271.970201] kthread+0xff/0x130
[57271.970347] ret_from_fork+0x2d/0x50
[57271.970507] ret_from_fork_asm+0x1b/0x30
[57271.970683]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[57271.970905] fs_reclaim_acquire+0xa2/0xe0
[57271.971650] kmem_cache_alloc_lru+0x4e/0x600
[57271.972042] btrfs_alloc_inode+0x2d/0x250
[57271.972220] alloc_inode+0x1a/0xc0
[57271.972373] iget5_locked+0xba/0x110
[57271.972534] btrfs_iget+0x43/0xe0
[57271.972685] create_reloc_inode+0x1a0/0x370
[57271.972874] btrfs_relocate_block_group+0x1b7/0x410
[57271.973079] btrfs_relocate_chunk+0x4c/0x1b0
[57271.973560] btrfs_balance+0x8e7/0x11d0
[57271.973732] btrfs_ioctl+0x1bb4/0x28b0
[57271.973911] __x64_sys_ioctl+0x8b/0xc0
[57271.974330] do_syscall_64+0x38/0x90
[57271.974722] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[57271.975131]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[57271.975400] join_transaction+0xaf/0x580
[57271.975573] start_transaction+0x1a0/0xad0
[57271.975752] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[57271.976189] kthread+0xff/0x130
[57271.976337] ret_from_fork+0x2d/0x50
[57271.976497] ret_from_fork_asm+0x1b/0x30
[57271.976671]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[57271.976933] __lock_acquire+0x1415/0x2190
[57271.977111] lock_acquire+0xc7/0x2b0
[57271.977271] join_transaction+0x1e4/0x580
[57271.977464] start_transaction+0x1a0/0xad0
[57271.977638] btrfs_commit_inode_delayed_inode+0x5f/0x120
[57271.977857] btrfs_evict_inode+0x273/0x3c0
[57271.978034] evict+0xcc/0x1d0
[57271.978169] inode_lru_isolate+0x14d/0x1e0
[57271.978344] __list_lru_walk_one+0xbe/0x1c0
[57271.978523] list_lru_walk_one+0x58/0x80
[57271.978693] prune_icache_sb+0x39/0x60
[57271.978860] super_cache_scan+0x167/0x1f0
[57271.979035] do_shrink_slab+0x163/0x340
[57271.979204] shrink_slab+0x1d7/0x2a0
[57271.979361] shrink_node+0x2eb/0x7b0
[57271.979518] balance_pgdat+0x344/0x780
[57271.979684] kswapd+0x205/0x410
[57271.979834] kthread+0xff/0x130
[57271.979978] ret_from_fork+0x2d/0x50
[57271.980136] ret_from_fork_asm+0x1b/0x30
[57271.980310]
other info that might help us debug this:
[57271.980609] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[57271.981014] Possible unsafe locking scenario:
[57271.981238] CPU0 CPU1
[57271.981411] ---- ----
[57271.981586] rlock(sb_internal#2);
[57271.981724] lock(fs_reclaim);
[57271.981941] lock(sb_internal#2);
[57271.982166] rlock(btrfs_trans_num_writers);
[57271.982333]
*** DEADLOCK ***
[57271.982558] 4 locks held by kswapd0/50:
[57271.982706] #0: ffffffff85e62e40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[57271.983021] #1: ffffffff85e51350 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[57271.983331] #2: ffff989d2d2070e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[57271.983679] #3: ffff989d2d207600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[57271.984053]
stack backtrace:
[57271.984228] CPU: 0 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc2+ #1309
[57271.984471] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[57271.984784] Call Trace:
[57271.984889]
[57271.984978] dump_stack_lvl+0x58/0x90
[57271.985399] check_noncircular+0x101/0x110
[57271.985557] __lock_acquire+0x1415/0x2190
[57271.985711] lock_acquire+0xc7/0x2b0
[57271.985855] ? join_transaction+0x1d0/0x580
[57271.986016] ? lock_release+0x134/0x270
[57271.986163] ? join_transaction+0x1d0/0x580
[57271.986320] ? join_transaction+0x3d/0x580
[57271.986477] join_transaction+0x1e4/0x580
[57271.986629] ? join_transaction+0x1d0/0x580
[57271.986789] start_transaction+0x1a0/0xad0
[57271.986950] btrfs_commit_inode_delayed_inode+0x5f/0x120
[57271.987148] btrfs_evict_inode+0x273/0x3c0
[57271.987307] ? lock_release+0x134/0x270
[57271.987454] ? __pfx_wake_bit_function+0x10/0x10
[57271.987690] evict+0xcc/0x1d0
[57271.987811] inode_lru_isolate+0x14d/0x1e0
[57271.987974] __list_lru_walk_one+0xbe/0x1c0
[57271.988132] ? __pfx_inode_lru_isolate+0x10/0x10
[57271.988311] ? __pfx_inode_lru_isolate+0x10/0x10
[57271.988486] list_lru_walk_one+0x58/0x80
[57271.988637] prune_icache_sb+0x39/0x60
[57271.988781] super_cache_scan+0x167/0x1f0
[57271.988939] do_shrink_slab+0x163/0x340
[57271.989086] ? lock_is_held_type+0xe2/0x140
[57271.989253] shrink_slab+0x1d7/0x2a0
[57271.989393] shrink_node+0x2eb/0x7b0
[57271.989535] balance_pgdat+0x344/0x780
[57271.989837] kswapd+0x205/0x410
[57271.989964] ? __pfx_autoremove_wake_function+0x10/0x10
[57271.990159] ? __pfx_kswapd+0x10/0x10
[57271.990300] kthread+0xff/0x130
[57271.990425] ? __pfx_kthread+0x10/0x10
[57271.990568] ret_from_fork+0x2d/0x50
[57271.990705] ? __pfx_kthread+0x10/0x10
[57271.990853] ret_from_fork_asm+0x1b/0x30
[57271.991005]
[57717.773165] BTRFS: device fsid 20fcab3c-176b-4c2b-a316-c05727c677c2 devid 1 transid 97 /dev/mapper/vg0-lv9 scanned by mount (3772914)
[57717.774309] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[57717.774622] BTRFS info (device dm-9): turning on sync discard
[57717.774864] BTRFS info (device dm-9): using free space tree