[10474.934706] run fstests generic/251 at 2023-10-30 23:52:27
[10475.357796] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 3064890 /dev/mapper/vg0-lv0 scanned by mount (1664319)
[10475.358326] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[10475.358332] BTRFS info (device dm-0): using free space tree
[10475.363131] BTRFS info (device dm-0): auto enabling async discard
[10475.610446] BTRFS: device fsid c66d9c3e-44c5-4e0e-b687-708669faa6bb devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mount (1664377)
[10475.611976] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[10475.611984] BTRFS info (device dm-9): turning on async discard
[10475.611987] BTRFS info (device dm-9): disk space caching is enabled
[10475.616450] BTRFS info (device dm-9): checking UUID tree
[11281.392274] ======================================================
[11281.392628] WARNING: possible circular locking dependency detected
[11281.392977] 6.6.0-rc7+ #1344 Not tainted
[11281.393195] ------------------------------------------------------
[11281.393583] kswapd0/50 is trying to acquire lock:
[11281.394113] ffff8e134d79a390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[11281.394482]
but task is already holding lock:
[11281.394731] ffff8e137e6f3600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11281.395299]
which lock already depends on the new lock.
[11281.395759]
the existing dependency chain (in reverse order) is:
[11281.396181]
-> #3 (sb_internal#2){++++}-{0:0}:
[11281.396528] start_transaction+0x493/0xad0
[11281.396810] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11281.397146] btrfs_evict_inode+0x273/0x3c0
[11281.397427] evict+0xcc/0x1d0
[11281.397642] inode_lru_isolate+0x14d/0x1e0
[11281.397908] __list_lru_walk_one+0xbe/0x1c0
[11281.398102] list_lru_walk_one+0x58/0x80
[11281.398262] prune_icache_sb+0x39/0x60
[11281.398416] super_cache_scan+0x167/0x1f0
[11281.398591] do_shrink_slab+0x163/0x340
[11281.398755] shrink_slab+0x1d7/0x2a0
[11281.398902] shrink_node+0x2eb/0x7b0
[11281.399050] balance_pgdat+0x344/0x780
[11281.399204] kswapd+0x205/0x410
[11281.399337] kthread+0xff/0x130
[11281.399471] ret_from_fork+0x2d/0x50
[11281.399625] ret_from_fork_asm+0x1b/0x30
[11281.399787]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[11281.399990] fs_reclaim_acquire+0xa2/0xe0
[11281.400158] kmem_cache_alloc_lru+0x4e/0x600
[11281.400330] btrfs_alloc_inode+0x2d/0x250
[11281.400492] alloc_inode+0x1a/0xc0
[11281.400639] iget5_locked+0xba/0x110
[11281.400785] btrfs_iget+0x43/0xe0
[11281.400925] create_reloc_inode+0x1a0/0x360
[11281.401094] btrfs_relocate_block_group+0x1d2/0x3d0
[11281.401283] btrfs_relocate_chunk+0x4c/0x1b0
[11281.401455] btrfs_balance+0x8e7/0x11d0
[11281.401618] btrfs_ioctl+0x1c25/0x2860
[11281.401774] __x64_sys_ioctl+0x8b/0xc0
[11281.401929] do_syscall_64+0x38/0x90
[11281.403912] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[11281.404446]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[11281.404848] join_transaction+0xaf/0x580
[11281.405033] start_transaction+0x1a0/0xad0
[11281.405199] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[11281.405382] kthread+0xff/0x130
[11281.405516] ret_from_fork+0x2d/0x50
[11281.405666] ret_from_fork_asm+0x1b/0x30
[11281.405827]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[11281.406063] __lock_acquire+0x1415/0x2190
[11281.406227] lock_acquire+0xc7/0x2b0
[11281.406374] join_transaction+0x1e4/0x580
[11281.406538] start_transaction+0x1a0/0xad0
[11281.406711] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11281.406918] btrfs_evict_inode+0x273/0x3c0
[11281.407177] evict+0xcc/0x1d0
[11281.407396] inode_lru_isolate+0x14d/0x1e0
[11281.407681] __list_lru_walk_one+0xbe/0x1c0
[11281.407955] list_lru_walk_one+0x58/0x80
[11281.408210] prune_icache_sb+0x39/0x60
[11281.408364] super_cache_scan+0x167/0x1f0
[11281.408527] do_shrink_slab+0x163/0x340
[11281.408796] shrink_slab+0x1d7/0x2a0
[11281.409034] shrink_node+0x2eb/0x7b0
[11281.409278] balance_pgdat+0x344/0x780
[11281.409537] kswapd+0x205/0x410
[11281.409761] kthread+0xff/0x130
[11281.409975] ret_from_fork+0x2d/0x50
[11281.410218] ret_from_fork_asm+0x1b/0x30
[11281.410475]
other info that might help us debug this:
[11281.410916] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[11281.411597] Possible unsafe locking scenario:
[11281.411972] CPU0 CPU1
[11281.412370] ---- ----
[11281.412558] rlock(sb_internal#2);
[11281.412691] lock(fs_reclaim);
[11281.412905] lock(sb_internal#2);
[11281.413224] rlock(btrfs_trans_num_writers);
[11281.413476]
*** DEADLOCK ***
[11281.413801] 4 locks held by kswapd0/50:
[11281.414027] #0: ffffffffabe62ea0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x3eb/0x780
[11281.414515] #1: ffffffffabe513b0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[11281.414988] #2: ffff8e137e6f30e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[11281.415466] #3: ffff8e137e6f3600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[11281.416009]
stack backtrace:
[11281.416258] CPU: 1 PID: 50 Comm: kswapd0 Not tainted 6.6.0-rc7+ #1344
[11281.416495] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[11281.416793] Call Trace:
[11281.416888]
[11281.416993] dump_stack_lvl+0x58/0x90
[11281.417199] check_noncircular+0x101/0x110
[11281.417395] __lock_acquire+0x1415/0x2190
[11281.417565] lock_acquire+0xc7/0x2b0
[11281.417723] ? join_transaction+0x1d0/0x580
[11281.417954] ? lock_release+0x134/0x270
[11281.418182] ? join_transaction+0x1d0/0x580
[11281.418431] ? join_transaction+0x3d/0x580
[11281.418673] join_transaction+0x1e4/0x580
[11281.418922] ? join_transaction+0x1d0/0x580
[11281.419174] start_transaction+0x1a0/0xad0
[11281.419392] btrfs_commit_inode_delayed_inode+0x5f/0x120
[11281.419627] btrfs_evict_inode+0x273/0x3c0
[11281.419777] ? lock_release+0x134/0x270
[11281.419915] ? __pfx_wake_bit_function+0x10/0x10
[11281.420187] evict+0xcc/0x1d0
[11281.420372] inode_lru_isolate+0x14d/0x1e0
[11281.420617] __list_lru_walk_one+0xbe/0x1c0
[11281.420864] ? __pfx_inode_lru_isolate+0x10/0x10
[11281.421121] ? __pfx_inode_lru_isolate+0x10/0x10
[11281.421401] list_lru_walk_one+0x58/0x80
[11281.421629] prune_icache_sb+0x39/0x60
[11281.421856] super_cache_scan+0x167/0x1f0
[11281.422097] do_shrink_slab+0x163/0x340
[11281.422338] shrink_slab+0x1d7/0x2a0
[11281.422558] shrink_node+0x2eb/0x7b0
[11281.422781] balance_pgdat+0x344/0x780
[11281.423018] kswapd+0x205/0x410
[11281.423156] ? __pfx_autoremove_wake_function+0x10/0x10
[11281.423341] ? __pfx_kswapd+0x10/0x10
[11281.423475] kthread+0xff/0x130
[11281.423598] ? __pfx_kthread+0x10/0x10
[11281.423735] ret_from_fork+0x2d/0x50
[11281.423867] ? __pfx_kthread+0x10/0x10
[11281.424004] ret_from_fork_asm+0x1b/0x30
[11281.424149]
[11404.429113] BTRFS warning (device dm-9): failed to trim 7 block group(s), last error -512
[11409.189142] BTRFS: device fsid c66d9c3e-44c5-4e0e-b687-708669faa6bb devid 1 transid 148 /dev/mapper/vg0-lv9 scanned by mount (1676228)
[11409.190218] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[11409.190567] BTRFS info (device dm-9): turning on async discard
[11409.190819] BTRFS info (device dm-9): disk space caching is enabled