[33448.115161] run fstests generic/251 at 2023-08-08 06:10:23
[33448.593346] BTRFS: device fsid 13921637-4436-40f4-9cb4-e48f1103a380 devid 1 transid 2268183 /dev/mapper/vg0-lv0 scanned by mount (770648)
[33448.594561] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[33448.594568] BTRFS info (device dm-0): using free space tree
[33448.598381] BTRFS info (device dm-0): auto enabling async discard
[33448.841877] BTRFS: device fsid 703019a6-2112-4c7c-aa3c-0d0c4d6291c8 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (770696)
[33448.870299] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[33448.870309] BTRFS info (device dm-9): setting incompat feature flag for COMPRESS_LZO (0x8)
[33448.870312] BTRFS info (device dm-9): use lzo compression, level 0
[33448.870315] BTRFS info (device dm-9): disk space caching is enabled
[33448.881103] BTRFS info (device dm-9): auto enabling async discard
[33448.881261] BTRFS info (device dm-9): checking UUID tree
[34058.293589] ======================================================
[34058.294021] WARNING: possible circular locking dependency detected
[34058.294462] 6.5.0-rc3+ #1264 Not tainted
[34058.294787] ------------------------------------------------------
[34058.295293] kswapd0/47 is trying to acquire lock:
[34058.295684] ffff9f17c7f5a378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[34058.296439]
but task is already holding lock:
[34058.296907] ffff9f17d2065600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[34058.297694]
which lock already depends on the new lock.
[34058.298405]
the existing dependency chain (in reverse order) is:
[34058.299013]
-> #3 (sb_internal#2){++++}-{0:0}:
[34058.299495] start_transaction+0x3f9/0x740
[34058.299870] btrfs_commit_inode_delayed_inode+0x5f/0x120
[34058.300357] btrfs_evict_inode+0x273/0x3c0
[34058.300736] evict+0xcc/0x1d0
[34058.301033] inode_lru_isolate+0x14d/0x1e0
[34058.301420] __list_lru_walk_one+0xbe/0x1c0
[34058.301808] list_lru_walk_one+0x58/0x80
[34058.302185] prune_icache_sb+0x39/0x60
[34058.302547] super_cache_scan+0x161/0x1f0
[34058.302919] do_shrink_slab+0x163/0x340
[34058.303282] shrink_slab+0x1d7/0x2a0
[34058.303630] shrink_node+0x2eb/0x7b0
[34058.303975] balance_pgdat+0x344/0x780
[34058.304336] kswapd+0x205/0x410
[34058.304637] kthread+0xfc/0x130
[34058.304935] ret_from_fork+0x2d/0x50
[34058.305276] ret_from_fork_asm+0x1b/0x30
[34058.305653]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[34058.306123] fs_reclaim_acquire+0xa5/0xe0
[34058.306546] kmem_cache_alloc_lru+0x4e/0x570
[34058.306944] btrfs_alloc_inode+0x2d/0x250
[34058.307330] alloc_inode+0x1a/0xc0
[34058.307650] iget5_locked+0xba/0x110
[34058.307986] btrfs_iget+0x43/0xe0
[34058.308303] create_reloc_inode+0x19d/0x370
[34058.308694] btrfs_relocate_block_group+0x1b7/0x410
[34058.309138] btrfs_relocate_chunk+0x4c/0x1b0
[34058.309535] btrfs_balance+0x8e7/0x11d0
[34058.309892] btrfs_ioctl+0x1d3d/0x2900
[34058.310247] __x64_sys_ioctl+0x8b/0xc0
[34058.310601] do_syscall_64+0x38/0x90
[34058.310944] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[34058.311399]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[34058.311978] join_transaction+0xb4/0x590
[34058.312357] start_transaction+0x187/0x740
[34058.312738] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[34058.313157] kthread+0xfc/0x130
[34058.313468] ret_from_fork+0x2d/0x50
[34058.313800] ret_from_fork_asm+0x1b/0x30
[34058.314170]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[34058.314720] __lock_acquire+0x1415/0x2190
[34058.315101] lock_acquire+0xc7/0x2b0
[34058.315442] join_transaction+0x1de/0x590
[34058.315807] start_transaction+0x187/0x740
[34058.316186] btrfs_commit_inode_delayed_inode+0x5f/0x120
[34058.316668] btrfs_evict_inode+0x273/0x3c0
[34058.317049] evict+0xcc/0x1d0
[34058.317347] inode_lru_isolate+0x14d/0x1e0
[34058.317730] __list_lru_walk_one+0xbe/0x1c0
[34058.318123] list_lru_walk_one+0x58/0x80
[34058.318492] prune_icache_sb+0x39/0x60
[34058.318842] super_cache_scan+0x161/0x1f0
[34058.319220] do_shrink_slab+0x163/0x340
[34058.319585] shrink_slab+0x1d7/0x2a0
[34058.319921] shrink_node+0x2eb/0x7b0
[34058.320255] balance_pgdat+0x344/0x780
[34058.320614] kswapd+0x205/0x410
[34058.320920] kthread+0xfc/0x130
[34058.321231] ret_from_fork+0x2d/0x50
[34058.321581] ret_from_fork_asm+0x1b/0x30
[34058.321949]
other info that might help us debug this:
[34058.322598] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[34058.323478] Possible unsafe locking scenario:
[34058.323960] CPU0 CPU1
[34058.324362] ---- ----
[34058.324742] rlock(sb_internal#2);
[34058.325046] lock(fs_reclaim);
[34058.325518] lock(sb_internal#2);
[34058.326010] rlock(btrfs_trans_num_writers);
[34058.326384]
*** DEADLOCK ***
[34058.326868] 4 locks held by kswapd0/47:
[34058.327193] #0: ffffffff8ae62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[34058.327863] #1: ffffffff8ae507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[34058.328561] #2: ffff9f17d20650e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[34058.329332] #3: ffff9f17d2065600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[34058.330169]
stack backtrace:
[34058.330555] CPU: 0 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc3+ #1264
[34058.331097] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[34058.331814] Call Trace:
[34058.332031]
[34058.332219] dump_stack_lvl+0x58/0x90
[34058.332534] check_noncircular+0x101/0x110
[34058.332884] __lock_acquire+0x1415/0x2190
[34058.333239] lock_acquire+0xc7/0x2b0
[34058.333551] ? join_transaction+0x1af/0x590
[34058.333909] ? lock_release+0x134/0x270
[34058.334229] join_transaction+0x1de/0x590
[34058.334566] ? join_transaction+0x1af/0x590
[34058.334922] start_transaction+0x187/0x740
[34058.335270] btrfs_commit_inode_delayed_inode+0x5f/0x120
[34058.335725] btrfs_evict_inode+0x273/0x3c0
[34058.336076] ? lock_release+0x134/0x270
[34058.336454] ? __pfx_wake_bit_function+0x10/0x10
[34058.336847] evict+0xcc/0x1d0
[34058.337108] inode_lru_isolate+0x14d/0x1e0
[34058.337463] __list_lru_walk_one+0xbe/0x1c0
[34058.337819] ? __pfx_inode_lru_isolate+0x10/0x10
[34058.338217] ? __pfx_inode_lru_isolate+0x10/0x10
[34058.338616] list_lru_walk_one+0x58/0x80
[34058.338955] prune_icache_sb+0x39/0x60
[34058.339282] super_cache_scan+0x161/0x1f0
[34058.339635] do_shrink_slab+0x163/0x340
[34058.339959] ? lock_is_held_type+0xe2/0x140
[34058.340328] shrink_slab+0x1d7/0x2a0
[34058.340645] shrink_node+0x2eb/0x7b0
[34058.340958] balance_pgdat+0x344/0x780
[34058.341287] kswapd+0x205/0x410
[34058.341567] ? __pfx_autoremove_wake_function+0x10/0x10
[34058.342014] ? __pfx_kswapd+0x10/0x10
[34058.342328] kthread+0xfc/0x130
[34058.342609] ? __pfx_kthread+0x10/0x10
[34058.342941] ret_from_fork+0x2d/0x50
[34058.343240] ? __pfx_kthread+0x10/0x10
[34058.343498] ret_from_fork_asm+0x1b/0x30
[34058.343740] RIP: 0000:0x0
[34058.343916] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[34058.344341] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[34058.344858] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[34058.345337] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[34058.345822] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[34058.346292] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[34058.346768] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[34058.347246]
[34404.523485] BTRFS warning (device dm-9): failed to trim 2 block group(s), last error -512
[34410.180877] BTRFS: device fsid 703019a6-2112-4c7c-aa3c-0d0c4d6291c8 devid 1 transid 89 /dev/mapper/vg0-lv9 scanned by mount (819631)
[34410.182761] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[34410.183333] BTRFS info (device dm-9): use lzo compression, level 0
[34410.183774] BTRFS info (device dm-9): disk space caching is enabled
[34410.186776] BTRFS info (device dm-9): auto enabling async discard