[55996.932033] run fstests generic/251 at 2023-11-01 12:26:29
[55997.592708] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 3078338 /dev/mapper/vg0-lv0 scanned by mount (3824743)
[55997.593650] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[55997.593660] BTRFS info (device dm-0): using free space tree
[55997.600381] BTRFS info (device dm-0): auto enabling async discard
[55997.855934] BTRFS: device fsid 40826126-e486-401d-8728-620bd2503278 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (3824801)
[55997.856708] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[55997.856716] BTRFS info (device dm-9): turning on sync discard
[55997.856720] BTRFS info (device dm-9): enabling free space tree
[55997.856722] BTRFS info (device dm-9): using free space tree
[55997.863648] BTRFS info (device dm-9): creating free space tree
[55997.865116] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[55997.865122] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[55997.873380] BTRFS info (device dm-9): cleaning free space cache v1
[55997.881218] BTRFS info (device dm-9): checking UUID tree
[56388.443645] ======================================================
[56388.445649] WARNING: possible circular locking dependency detected
[56388.445933] 6.6.0-rc7+ #1345 Not tainted
[56388.446074] ------------------------------------------------------
[56388.446299] kswapd0/50 is trying to acquire lock:
[56388.446467] ffff9f40c3cfe390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[56388.449230]
but task is already holding lock:
[56388.449443] ffff9f40d429f600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[56388.450111]
which lock already depends on the new lock.
[56388.450394]
the existing dependency chain (in reverse order) is:
[56388.450652]
-> #3 (sb_internal#2){++++}-{0:0}:
[56388.450863] start_transaction+0x493/0xad0
[56388.451029] btrfs_commit_inode_delayed_inode+0x5f/0x120
[56388.451235] btrfs_evict_inode+0x273/0x3c0
[56388.451409] evict+0xcc/0x1d0
[56388.452335] inode_lru_isolate+0x14d/0x1e0
[56388.452502] __list_lru_walk_one+0xbe/0x1c0
[56388.453509] list_lru_walk_one+0x58/0x80
[56388.453676] prune_icache_sb+0x39/0x60
[56388.453895] super_cache_scan+0x167/0x1f0
[56388.454248] do_shrink_slab+0x163/0x340
[56388.454808] shrink_slab+0x1d7/0x2a0
[56388.454955] shrink_node+0x2eb/0x7b0
[56388.455103] balance_pgdat+0x344/0x780
[56388.455259] kswapd+0x205/0x410
[56388.455466] kthread+0xff/0x130
[56388.456760] ret_from_fork+0x2d/0x50
[56388.457755] ret_from_fork_asm+0x1b/0x30
[56388.458396]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[56388.458600] fs_reclaim_acquire+0xa2/0xe0
[56388.458946] kmem_cache_alloc_lru+0x4e/0x600
[56388.459473] btrfs_alloc_inode+0x2d/0x250
[56388.459638] alloc_inode+0x1a/0xc0
[56388.459781] iget5_locked+0xba/0x110
[56388.459929] btrfs_iget+0x43/0xe0
[56388.460093] create_reloc_inode+0x1a0/0x360
[56388.460308] btrfs_relocate_block_group+0x1d2/0x3d0
[56388.460499] btrfs_relocate_chunk+0x4c/0x1b0
[56388.460859] btrfs_balance+0x8e7/0x11d0
[56388.461017] btrfs_ioctl+0x1c25/0x2860
[56388.461179] __x64_sys_ioctl+0x8b/0xc0
[56388.461486] do_syscall_64+0x38/0x90
[56388.462501] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[56388.463478]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[56388.463727] join_transaction+0xaf/0x580
[56388.463889] start_transaction+0x1a0/0xad0
[56388.464052] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[56388.464454] kthread+0xff/0x130
[56388.464588] ret_from_fork+0x2d/0x50
[56388.464733] ret_from_fork_asm+0x1b/0x30
[56388.464894]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[56388.465129] __lock_acquire+0x1415/0x2190
[56388.465712] lock_acquire+0xc7/0x2b0
[56388.466163] join_transaction+0x1e4/0x580
[56388.466332] start_transaction+0x1a0/0xad0
[56388.466498] btrfs_commit_inode_delayed_inode+0x5f/0x120
[56388.466703] btrfs_evict_inode+0x273/0x3c0
[56388.466869] evict+0xcc/0x1d0
[56388.466997] inode_lru_isolate+0x14d/0x1e0
[56388.467161] __list_lru_walk_one+0xbe/0x1c0
[56388.467332] list_lru_walk_one+0x58/0x80
[56388.467492] prune_icache_sb+0x39/0x60
[56388.467647] super_cache_scan+0x167/0x1f0
[56388.467808] do_shrink_slab+0x163/0x340
[56388.467967] shrink_slab+0x1d7/0x2a0
[56388.468112] shrink_node+0x2eb/0x7b0
[56388.468260] balance_pgdat+0x344/0x780
[56388.468417] kswapd+0x205/0x410
[56388.468550] kthread+0xff/0x130
[56388.468685] ret_from_fork+0x2d/0x50
[56388.468858] ret_from_fork_asm+0x1b/0x30
[56388.469088]
other info that might help us debug this:
[56388.469387] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[56388.469762] Possible unsafe locking scenario:
[56388.469969] CPU0 CPU1
[56388.470132] ---- ----
[56388.470300] rlock(sb_internal#2);
[56388.470428] lock(fs_reclaim);
[56388.470629] lock(sb_internal#2);
[56388.470837] rlock(btrfs_trans_num_writers);
[56388.470995]
*** DEADLOCK ***
[56388.471203] 4 locks held by kswapd0/50:
[56388.471345] #0: ffffffffa0e62ea0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[56388.471628] #1: ffffffffa0e513b0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[56388.471920] #2: ffff9f40d429f0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[56388.472245] #3: ffff9f40d429f600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[56388.472595]
stack backtrace:
[56388.472756] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc7+ #1345
[56388.472980] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[56388.473278] Call Trace:
[56388.473956]
[56388.474048] dump_stack_lvl+0x58/0x90
[56388.474541] check_noncircular+0x101/0x110
[56388.474756] ? mark_held_locks+0x49/0x80
[56388.474960] __lock_acquire+0x1415/0x2190
[56388.475169] lock_acquire+0xc7/0x2b0
[56388.475363] ? join_transaction+0x1d0/0x580
[56388.475581] ? lock_release+0x134/0x270
[56388.475780] ? join_transaction+0x1d0/0x580
[56388.475995] ? join_transaction+0x3d/0x580
[56388.476208] join_transaction+0x1e4/0x580
[56388.476419] ? join_transaction+0x1d0/0x580
[56388.476636] start_transaction+0x1a0/0xad0
[56388.476847] btrfs_commit_inode_delayed_inode+0x5f/0x120
[56388.477116] btrfs_evict_inode+0x273/0x3c0
[56388.477336] ? lock_release+0x134/0x270
[56388.477535] ? __pfx_wake_bit_function+0x10/0x10
[56388.477982] evict+0xcc/0x1d0
[56388.478142] inode_lru_isolate+0x14d/0x1e0
[56388.478346] __list_lru_walk_one+0xbe/0x1c0
[56388.478497] ? __pfx_inode_lru_isolate+0x10/0x10
[56388.478664] ? __pfx_inode_lru_isolate+0x10/0x10
[56388.478830] list_lru_walk_one+0x58/0x80
[56388.478971] prune_icache_sb+0x39/0x60
[56388.479108] super_cache_scan+0x167/0x1f0
[56388.479295] do_shrink_slab+0x163/0x340
[56388.479469] ? lock_is_held_type+0xe2/0x140
[56388.479626] shrink_slab+0x1d7/0x2a0
[56388.479758] shrink_node+0x2eb/0x7b0
[56388.479891] balance_pgdat+0x344/0x780
[56388.480029] kswapd+0x205/0x410
[56388.480148] ? __pfx_autoremove_wake_function+0x10/0x10
[56388.480337] ? __pfx_kswapd+0x10/0x10
[56388.480471] kthread+0xff/0x130
[56388.480590] ? __pfx_kthread+0x10/0x10
[56388.480726] ret_from_fork+0x2d/0x50
[56388.480857] ? __pfx_kthread+0x10/0x10
[56388.480992] ret_from_fork_asm+0x1b/0x30
[56388.481136]
[56728.404657] BTRFS: device fsid 40826126-e486-401d-8728-620bd2503278 devid 1 transid 168 /dev/mapper/vg0-lv9 scanned by mount (3834982)
[56728.406179] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[56728.406494] BTRFS info (device dm-9): turning on sync discard
[56728.406708] BTRFS info (device dm-9): using free space tree