[32144.278213] run fstests generic/251 at 2023-08-04 05:47:19
[32144.673155] BTRFS: device fsid 442e5b9d-ccad-458f-8dc7-acd1904d321e devid 1 transid 1384117 /dev/mapper/vg0-lv0 scanned by mount (630322)
[32144.674375] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[32144.674381] BTRFS info (device dm-0): using free space tree
[32144.679467] BTRFS info (device dm-0): auto enabling async discard
[32144.875591] BTRFS: device fsid 83f36381-5683-4002-98b7-c51273e29770 devid 1 transid 6 /dev/mapper/vg0-lv7 scanned by mkfs.btrfs (630370)
[32144.897815] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[32144.897824] BTRFS info (device dm-7): use zlib compression, level 3
[32144.897828] BTRFS info (device dm-7): using free space tree
[32144.906078] BTRFS info (device dm-7): auto enabling async discard
[32144.906249] BTRFS info (device dm-7): checking UUID tree
[32638.417284] ======================================================
[32638.417494] WARNING: possible circular locking dependency detected
[32638.417667] 6.5.0-rc3+ #1260 Not tainted
[32638.417806] ------------------------------------------------------
[32638.417982] kswapd0/47 is trying to acquire lock:
[32638.418134] ffff937a3a0da378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[32638.418413]
but task is already holding lock:
[32638.418615] ffff937a16838600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[32638.418881]
which lock already depends on the new lock.
[32638.419155]
the existing dependency chain (in reverse order) is:
[32638.419390]
-> #3 (sb_internal){++++}-{0:0}:
[32638.419593] start_transaction+0x3f9/0x740
[32638.419747] btrfs_commit_inode_delayed_inode+0x5f/0x120
[32638.419915] btrfs_evict_inode+0x273/0x3c0
[32638.420065] evict+0xcc/0x1d0
[32638.420197] inode_lru_isolate+0x14d/0x1e0
[32638.420353] __list_lru_walk_one+0xbe/0x1c0
[32638.420507] list_lru_walk_one+0x58/0x80
[32638.420656] prune_icache_sb+0x39/0x60
[32638.420798] super_cache_scan+0x161/0x1f0
[32638.420950] do_shrink_slab+0x163/0x340
[32638.421098] shrink_slab+0x1d7/0x2a0
[32638.421240] shrink_node+0x2eb/0x7b0
[32638.421384] balance_pgdat+0x344/0x780
[32638.421530] kswapd+0x205/0x410
[32638.421667] kthread+0xfc/0x130
[32638.421800] ret_from_fork+0x2d/0x50
[32638.421947] ret_from_fork_asm+0x1b/0x30
[32638.422099]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[32638.422301] fs_reclaim_acquire+0xa5/0xe0
[32638.422456] kmem_cache_alloc_lru+0x4e/0x570
[32638.422609] btrfs_alloc_inode+0x2d/0x250
[32638.422758] alloc_inode+0x1a/0xc0
[32638.422896] iget5_locked+0xba/0x110
[32638.423039] btrfs_iget+0x43/0xe0
[32638.423176] create_reloc_inode+0x19d/0x370
[32638.423327] btrfs_relocate_block_group+0x1b7/0x410
[32638.423494] btrfs_relocate_chunk+0x4c/0x1b0
[32638.423651] btrfs_balance+0x8e7/0x11d0
[32638.423797] btrfs_ioctl+0x1d3d/0x2900
[32638.423942] __x64_sys_ioctl+0x8b/0xc0
[32638.424085] do_syscall_64+0x38/0x90
[32638.424231] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[32638.424404]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[32638.424630] join_transaction+0xb4/0x590
[32638.424780] start_transaction+0x187/0x740
[32638.424928] btrfs_dirty_inode+0x40/0xd0
[32638.425075] touch_atime+0x15b/0x280
[32638.425214] filemap_read+0x2de/0x310
[32638.425365] __kernel_read+0xef/0x2a0
[32638.425508] bprm_execve+0x2aa/0x870
[32638.425648] do_execveat_common+0x1b5/0x260
[32638.425801] __x64_sys_execve+0x39/0x50
[32638.425947] do_syscall_64+0x38/0x90
[32638.426089] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[32638.426253]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[32638.426476] __lock_acquire+0x1415/0x2190
[32638.426625] lock_acquire+0xc7/0x2b0
[32638.426764] join_transaction+0x1de/0x590
[32638.426915] start_transaction+0x187/0x740
[32638.427066] btrfs_commit_inode_delayed_inode+0x5f/0x120
[32638.427236] btrfs_evict_inode+0x273/0x3c0
[32638.428162] evict+0xcc/0x1d0
[32638.428298] inode_lru_isolate+0x14d/0x1e0
[32638.428460] __list_lru_walk_one+0xbe/0x1c0
[32638.428615] list_lru_walk_one+0x58/0x80
[32638.428760] prune_icache_sb+0x39/0x60
[32638.428908] super_cache_scan+0x161/0x1f0
[32638.429058] do_shrink_slab+0x163/0x340
[32638.429208] shrink_slab+0x1d7/0x2a0
[32638.429352] shrink_node+0x2eb/0x7b0
[32638.429492] balance_pgdat+0x344/0x780
[32638.429640] kswapd+0x205/0x410
[32638.429775] kthread+0xfc/0x130
[32638.429910] ret_from_fork+0x2d/0x50
[32638.430054] ret_from_fork_asm+0x1b/0x30
[32638.430205]
other info that might help us debug this:
[32638.430480] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal
[32638.430799] Possible unsafe locking scenario:
[32638.431002] CPU0 CPU1
[32638.431151] ---- ----
[32638.431299] rlock(sb_internal);
[32638.431460] lock(fs_reclaim);
[32638.431629] lock(sb_internal);
[32638.431801] rlock(btrfs_trans_num_writers);
[32638.431948]
*** DEADLOCK ***
[32638.432191] 4 locks held by kswapd0/47:
[32638.432327] #0: ffffffff8de62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[32638.432581] #1: ffffffff8de507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[32638.432831] #2: ffff937a168380e0 (&type->s_umount_key#35){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[32638.433101] #3: ffff937a16838600 (sb_internal){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[32638.433376]
stack backtrace:
[32638.433559] CPU: 1 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc3+ #1260
[32638.433739] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[32638.433987] Call Trace:
[32638.434105]
[32638.434214] dump_stack_lvl+0x58/0x90
[32638.434356] check_noncircular+0x101/0x110
[32638.434500] __lock_acquire+0x1415/0x2190
[32638.434644] lock_acquire+0xc7/0x2b0
[32638.434780] ? join_transaction+0x1af/0x590
[32638.434927] ? lock_release+0x134/0x270
[32638.435065] join_transaction+0x1de/0x590
[32638.435203] ? join_transaction+0x1af/0x590
[32638.435354] start_transaction+0x187/0x740
[32638.435502] btrfs_commit_inode_delayed_inode+0x5f/0x120
[32638.435665] btrfs_evict_inode+0x273/0x3c0
[32638.435806] ? lock_release+0x134/0x270
[32638.435946] ? __pfx_wake_bit_function+0x10/0x10
[32638.436100] evict+0xcc/0x1d0
[32638.436224] inode_lru_isolate+0x14d/0x1e0
[32638.436373] __list_lru_walk_one+0xbe/0x1c0
[32638.436519] ? __pfx_inode_lru_isolate+0x10/0x10
[32638.436671] ? __pfx_inode_lru_isolate+0x10/0x10
[32638.436819] list_lru_walk_one+0x58/0x80
[32638.436963] prune_icache_sb+0x39/0x60
[32638.437103] super_cache_scan+0x161/0x1f0
[32638.437244] do_shrink_slab+0x163/0x340
[32638.437386] ? lock_is_held_type+0xe2/0x140
[32638.437533] shrink_slab+0x1d7/0x2a0
[32638.437671] shrink_node+0x2eb/0x7b0
[32638.437805] balance_pgdat+0x344/0x780
[32638.437945] kswapd+0x205/0x410
[32638.438076] ? __pfx_autoremove_wake_function+0x10/0x10
[32638.438235] ? __pfx_kswapd+0x10/0x10
[32638.438372] kthread+0xfc/0x130
[32638.438500] ? __pfx_kthread+0x10/0x10
[32638.438639] ret_from_fork+0x2d/0x50
[32638.438774] ? __pfx_kthread+0x10/0x10
[32638.438913] ret_from_fork_asm+0x1b/0x30
[32638.441335] RIP: 0000:0x0
[32638.441469] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[32638.441652] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[32638.441884] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[32638.442071] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[32638.442260] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[32638.442451] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[32638.442643] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[32638.442835]
[33083.060852] BTRFS warning (device dm-7): failed to trim 2 block group(s), last error -512
[33087.628334] BTRFS: device fsid 83f36381-5683-4002-98b7-c51273e29770 devid 1 transid 61 /dev/mapper/vg0-lv7 scanned by mount (643619)
[33087.629126] BTRFS info (device dm-7): using crc32c (crc32c-intel) checksum algorithm
[33087.629377] BTRFS info (device dm-7): use zlib compression, level 3
[33087.629560] BTRFS info (device dm-7): using free space tree
[33087.633005] BTRFS info (device dm-7): auto enabling async discard