[12472.311448] run fstests generic/251 at 2023-11-19 00:20:26
[12472.842181] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1817714 /dev/mapper/vg0-lv0 scanned by mount (1561984)
[12472.843134] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[12472.843140] BTRFS info (device dm-0): using free space tree
[12472.848529] BTRFS info (device dm-0): auto enabling async discard
[12473.483076] BTRFS: device fsid 3255b54c-dbfa-414c-8749-a56f16aff4e9 devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mount (1562042)
[12473.484276] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[12473.484283] BTRFS info (device dm-7): using free space tree
[12473.488261] BTRFS info (device dm-7): auto enabling async discard
[12473.488403] BTRFS info (device dm-7): checking UUID tree
[13387.659041] ======================================================
[13387.659259] WARNING: possible circular locking dependency detected
[13387.659499] 6.7.0-rc1+ #1363 Not tainted
[13387.659672] ------------------------------------------------------
[13387.659885] kswapd0/50 is trying to acquire lock:
[13387.660067] ffffa0a454892390 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1d0/0x580
[13387.660409]
but task is already holding lock:
[13387.660664] ffffa0a4a0ca7608 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[13387.660998]
which lock already depends on the new lock.
[13387.661354]
the existing dependency chain (in reverse order) is:
[13387.661650]
-> #3 (sb_internal){++++}-{0:0}:
[13387.661900] start_transaction+0x493/0xad0
[13387.662089] btrfs_commit_inode_delayed_inode+0x5f/0x120
[13387.662306] btrfs_evict_inode+0x273/0x3c0
[13387.662493] evict+0xcc/0x1d0
[13387.662662] inode_lru_isolate+0x14d/0x1e0
[13387.662846] __list_lru_walk_one+0xbe/0x1c0
[13387.663036] list_lru_walk_one+0x58/0x80
[13387.663220] prune_icache_sb+0x39/0x60
[13387.663402] super_cache_scan+0x151/0x1d0
[13387.663583] do_shrink_slab+0x164/0x670
[13387.663796] shrink_slab+0x54a/0x8b0
[13387.664001] shrink_node+0x2eb/0x7b0
[13387.664189] balance_pgdat+0x359/0x790
[13387.664377] kswapd+0x205/0x410
[13387.664572] kthread+0xff/0x130
[13387.664780] ret_from_fork+0x2d/0x50
[13387.664979] ret_from_fork_asm+0x1b/0x30
[13387.665186]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[13387.665498] fs_reclaim_acquire+0xa2/0xe0
[13387.665692] kmem_cache_alloc_lru+0x4e/0x720
[13387.665894] btrfs_alloc_inode+0x2d/0x250
[13387.666085] alloc_inode+0x1a/0xc0
[13387.666264] iget5_locked+0xba/0x110
[13387.666469] btrfs_iget+0x43/0xe0
[13387.666656] create_reloc_inode+0x1a0/0x360
[13387.666866] btrfs_relocate_block_group+0x1d2/0x3d0
[13387.667101] btrfs_relocate_chunk+0x4c/0x1b0
[13387.667315] btrfs_balance+0x8e7/0x11d0
[13387.667499] btrfs_ioctl+0x1c06/0x2840
[13387.667690] __x64_sys_ioctl+0x8b/0xc0
[13387.667881] do_syscall_64+0x3e/0xf0
[13387.668057] entry_SYSCALL_64_after_hwframe+0x6e/0x76
[13387.668303]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[13387.668631] join_transaction+0xaf/0x580
[13387.668824] start_transaction+0x1a0/0xad0
[13387.669012] btrfs_dirty_inode+0x40/0xd0
[13387.669206] touch_atime+0x133/0x220
[13387.669459] filemap_read+0x2f0/0x300
[13387.669674] __kernel_read+0xef/0x280
[13387.669898] bprm_execve+0x2c7/0x880
[13387.670130] do_execveat_common+0x1b5/0x260
[13387.670364] __x64_sys_execve+0x39/0x50
[13387.670577] do_syscall_64+0x3e/0xf0
[13387.670784] entry_SYSCALL_64_after_hwframe+0x6e/0x76
[13387.671013]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[13387.671302] __lock_acquire+0x1415/0x2190
[13387.671505] lock_acquire+0xc7/0x2b0
[13387.671716] join_transaction+0x1e4/0x580
[13387.671912] start_transaction+0x1a0/0xad0
[13387.672108] btrfs_commit_inode_delayed_inode+0x5f/0x120
[13387.672328] btrfs_evict_inode+0x273/0x3c0
[13387.672528] evict+0xcc/0x1d0
[13387.672710] inode_lru_isolate+0x14d/0x1e0
[13387.672948] __list_lru_walk_one+0xbe/0x1c0
[13387.673150] list_lru_walk_one+0x58/0x80
[13387.673364] prune_icache_sb+0x39/0x60
[13387.673542] super_cache_scan+0x151/0x1d0
[13387.673742] do_shrink_slab+0x164/0x670
[13387.673925] shrink_slab+0x54a/0x8b0
[13387.674140] shrink_node+0x2eb/0x7b0
[13387.674345] balance_pgdat+0x359/0x790
[13387.674533] kswapd+0x205/0x410
[13387.674714] kthread+0xff/0x130
[13387.674895] ret_from_fork+0x2d/0x50
[13387.675104] ret_from_fork_asm+0x1b/0x30
[13387.675306]
other info that might help us debug this:
[13387.675673] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal
[13387.676084] Possible unsafe locking scenario:
[13387.676373] CPU0 CPU1
[13387.676569] ---- ----
[13387.676753] rlock(sb_internal);
[13387.676928] lock(fs_reclaim);
[13387.677173] lock(sb_internal);
[13387.677430] rlock(btrfs_trans_num_writers);
[13387.677626]
*** DEADLOCK ***
[13387.677934] 3 locks held by kswapd0/50:
[13387.678102] #0: ffffffffa8e64880 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x400/0x790
[13387.678442] #1: ffffa0a4a0ca70e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x33/0x1d0
[13387.678796] #2: ffffa0a4a0ca7608 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[13387.679162]
stack backtrace:
[13387.679406] CPU: 0 PID: 50 Comm: kswapd0 Not tainted 6.7.0-rc1+ #1363
[13387.679640] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[13387.679971] Call Trace:
[13387.680136]
[13387.680315] dump_stack_lvl+0x58/0x90
[13387.680501] check_noncircular+0x101/0x110
[13387.680690] __lock_acquire+0x1415/0x2190
[13387.680871] lock_acquire+0xc7/0x2b0
[13387.683990] ? join_transaction+0x1d0/0x580
[13387.684200] ? lock_release+0x134/0x270
[13387.684404] ? join_transaction+0x1d0/0x580
[13387.684618] ? join_transaction+0x3d/0x580
[13387.684831] join_transaction+0x1e4/0x580
[13387.685006] ? join_transaction+0x1d0/0x580
[13387.685192] start_transaction+0x1a0/0xad0
[13387.685406] btrfs_commit_inode_delayed_inode+0x5f/0x120
[13387.685662] btrfs_evict_inode+0x273/0x3c0
[13387.685847] ? lock_release+0x134/0x270
[13387.686017] ? __pfx_wake_bit_function+0x10/0x10
[13387.686207] evict+0xcc/0x1d0
[13387.686388] inode_lru_isolate+0x14d/0x1e0
[13387.686584] __list_lru_walk_one+0xbe/0x1c0
[13387.686801] ? __pfx_inode_lru_isolate+0x10/0x10
[13387.687002] ? __pfx_inode_lru_isolate+0x10/0x10
[13387.687225] list_lru_walk_one+0x58/0x80
[13387.687428] prune_icache_sb+0x39/0x60
[13387.687604] super_cache_scan+0x151/0x1d0
[13387.687807] do_shrink_slab+0x164/0x670
[13387.687992] shrink_slab+0x54a/0x8b0
[13387.688182] ? shrink_slab+0x420/0x8b0
[13387.688380] ? shrink_slab+0x371/0x8b0
[13387.688555] shrink_node+0x2eb/0x7b0
[13387.688749] balance_pgdat+0x359/0x790
[13387.688974] kswapd+0x205/0x410
[13387.689178] ? __pfx_autoremove_wake_function+0x10/0x10
[13387.689419] ? __pfx_kswapd+0x10/0x10
[13387.689630] kthread+0xff/0x130
[13387.689818] ? __pfx_kthread+0x10/0x10
[13387.690019] ret_from_fork+0x2d/0x50
[13387.690232] ? __pfx_kthread+0x10/0x10
[13387.690434] ret_from_fork_asm+0x1b/0x30
[13387.690649]
[13520.616577] BTRFS: device fsid 3255b54c-dbfa-414c-8749-a56f16aff4e9 devid 1 transid 144 /dev/mapper/vg0-lv7 scanned by mount (1602611)
[13520.618079] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[13520.618537] BTRFS info (device dm-7): using free space tree
[13520.623522] BTRFS info (device dm-7): auto enabling async discard