[34754.043098] run fstests generic/251 at 2023-08-07 06:33:41
[34754.584589] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2495897 /dev/mapper/vg0-lv0 scanned by mount (761996)
[34754.585563] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[34754.585572] BTRFS info (device dm-0): using free space tree
[34754.590144] BTRFS info (device dm-0): auto enabling async discard
[34754.823259] BTRFS: device fsid 39389284-b701-411f-b799-8a75360f7f77 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (762044)
[34754.871940] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[34754.871955] BTRFS info (device dm-9): setting incompat feature flag for COMPRESS_ZSTD (0x10)
[34754.871959] BTRFS info (device dm-9): use zstd compression, level 3
[34754.871965] BTRFS info (device dm-9): turning on async discard
[34754.871969] BTRFS info (device dm-9): disk space caching is enabled
[34754.876977] BTRFS info (device dm-9): checking UUID tree
[35180.828144] ======================================================
[35180.828413] WARNING: possible circular locking dependency detected
[35180.828670] 6.5.0-rc3+ #1263 Not tainted
[35180.828835] ------------------------------------------------------
[35180.829089] kswapd0/47 is trying to acquire lock:
[35180.829309] ffff93c8745e6378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[35180.831461]
but task is already holding lock:
[35180.831700] ffff93c8147ab600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[35180.832105]
which lock already depends on the new lock.
[35180.832450]
the existing dependency chain (in reverse order) is:
[35180.832777]
-> #3 (sb_internal#2){++++}-{0:0}:
[35180.833162] start_transaction+0x3f9/0x740
[35180.833438] btrfs_commit_inode_delayed_inode+0x5f/0x120
[35180.833750] btrfs_evict_inode+0x273/0x3c0
[35180.834104] evict+0xcc/0x1d0
[35180.834261] inode_lru_isolate+0x14d/0x1e0
[35180.834478] __list_lru_walk_one+0xbe/0x1c0
[35180.834816] list_lru_walk_one+0x58/0x80
[35180.835004] prune_icache_sb+0x39/0x60
[35180.835188] super_cache_scan+0x161/0x1f0
[35180.835401] do_shrink_slab+0x163/0x340
[35180.835822] shrink_slab+0x1d7/0x2a0
[35180.836002] shrink_node+0x2eb/0x7b0
[35180.836179] balance_pgdat+0x344/0x780
[35180.836462] kswapd+0x205/0x410
[35180.836653] kthread+0xfc/0x130
[35180.836869] ret_from_fork+0x2d/0x50
[35180.837094] ret_from_fork_asm+0x1b/0x30
[35180.837293]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[35180.837543] fs_reclaim_acquire+0xa5/0xe0
[35180.837738] kmem_cache_alloc_lru+0x4e/0x570
[35180.838180] btrfs_alloc_inode+0x2d/0x250
[35180.838386] alloc_inode+0x1a/0xc0
[35180.838551] iget5_locked+0xba/0x110
[35180.838723] btrfs_iget+0x43/0xe0
[35180.838884] create_reloc_inode+0x19d/0x370
[35180.839080] btrfs_relocate_block_group+0x1b7/0x410
[35180.839315] btrfs_relocate_chunk+0x4c/0x1b0
[35180.839680] btrfs_balance+0x8e7/0x11d0
[35180.839859] btrfs_ioctl+0x1d3d/0x2900
[35180.840042] __x64_sys_ioctl+0x8b/0xc0
[35180.840213] do_syscall_64+0x38/0x90
[35180.840395] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[35180.840625]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[35180.840905] join_transaction+0xb4/0x590
[35180.841086] start_transaction+0x187/0x740
[35180.841271] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[35180.841483] kthread+0xfc/0x130
[35180.841639] ret_from_fork+0x2d/0x50
[35180.841803] ret_from_fork_asm+0x1b/0x30
[35180.841983]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[35180.842249] __lock_acquire+0x1415/0x2190
[35180.842440] lock_acquire+0xc7/0x2b0
[35180.842610] join_transaction+0x1de/0x590
[35180.842794] start_transaction+0x187/0x740
[35180.842978] btrfs_commit_inode_delayed_inode+0x5f/0x120
[35180.843209] btrfs_evict_inode+0x273/0x3c0
[35180.843399] evict+0xcc/0x1d0
[35180.843558] inode_lru_isolate+0x14d/0x1e0
[35180.843910] __list_lru_walk_one+0xbe/0x1c0
[35180.844110] list_lru_walk_one+0x58/0x80
[35180.844312] prune_icache_sb+0x39/0x60
[35180.844493] super_cache_scan+0x161/0x1f0
[35180.844685] do_shrink_slab+0x163/0x340
[35180.844871] shrink_slab+0x1d7/0x2a0
[35180.845042] shrink_node+0x2eb/0x7b0
[35180.845212] balance_pgdat+0x344/0x780
[35180.845401] kswapd+0x205/0x410
[35180.845569] kthread+0xfc/0x130
[35180.845739] ret_from_fork+0x2d/0x50
[35180.845911] ret_from_fork_asm+0x1b/0x30
[35180.846100]
other info that might help us debug this:
[35180.846561] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[35180.846999] Possible unsafe locking scenario:
[35180.847239] CPU0 CPU1
[35180.847436] ---- ----
[35180.847622] rlock(sb_internal#2);
[35180.847772] lock(fs_reclaim);
[35180.848003] lock(sb_internal#2);
[35180.848244] rlock(btrfs_trans_num_writers);
[35180.848432]
*** DEADLOCK ***
[35180.848675] 4 locks held by kswapd0/47:
[35180.848835] #0: ffffffff9ee62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[35180.849169] #1: ffffffff9ee507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[35180.849702] #2: ffff93c8147ab0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[35180.850234] #3: ffff93c8147ab600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[35180.850675]
stack backtrace:
[35180.850858] CPU: 0 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc3+ #1263
[35180.851120] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[35180.851475] Call Trace:
[35180.851585]
[35180.851681] dump_stack_lvl+0x58/0x90
[35180.851838] check_noncircular+0x101/0x110
[35180.852012] __lock_acquire+0x1415/0x2190
[35180.852191] lock_acquire+0xc7/0x2b0
[35180.852408] ? join_transaction+0x1af/0x590
[35180.852827] ? lock_release+0x134/0x270
[35180.853057] join_transaction+0x1de/0x590
[35180.853250] ? join_transaction+0x1af/0x590
[35180.853448] start_transaction+0x187/0x740
[35180.853621] btrfs_commit_inode_delayed_inode+0x5f/0x120
[35180.853842] btrfs_evict_inode+0x273/0x3c0
[35180.854015] ? lock_release+0x134/0x270
[35180.854177] ? __pfx_wake_bit_function+0x10/0x10
[35180.854387] evict+0xcc/0x1d0
[35180.854517] inode_lru_isolate+0x14d/0x1e0
[35180.854691] __list_lru_walk_one+0xbe/0x1c0
[35180.854865] ? __pfx_inode_lru_isolate+0x10/0x10
[35180.855061] ? __pfx_inode_lru_isolate+0x10/0x10
[35180.855255] list_lru_walk_one+0x58/0x80
[35180.855441] prune_icache_sb+0x39/0x60
[35180.855633] super_cache_scan+0x161/0x1f0
[35180.855874] do_shrink_slab+0x163/0x340
[35180.856104] ? lock_is_held_type+0xe2/0x140
[35180.856369] shrink_slab+0x1d7/0x2a0
[35180.856547] shrink_node+0x2eb/0x7b0
[35180.856702] balance_pgdat+0x344/0x780
[35180.856865] kswapd+0x205/0x410
[35180.857002] ? __pfx_autoremove_wake_function+0x10/0x10
[35180.857219] ? __pfx_kswapd+0x10/0x10
[35180.857386] kthread+0xfc/0x130
[35180.857526] ? __pfx_kthread+0x10/0x10
[35180.857685] ret_from_fork+0x2d/0x50
[35180.857838] ? __pfx_kthread+0x10/0x10
[35180.857997] ret_from_fork_asm+0x1b/0x30
[35180.858165] RIP: 0000:0x0
[35180.858304] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[35180.858572] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[35180.858908] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[35180.859319] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[35180.859728] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[35180.860021] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[35180.860333] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[35180.860628]
[35644.467729] BTRFS: device fsid 39389284-b701-411f-b799-8a75360f7f77 devid 1 transid 71 /dev/mapper/vg0-lv9 scanned by mount (799480)
[35644.469225] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[35644.469533] BTRFS info (device dm-9): use zstd compression, level 3
[35644.469759] BTRFS info (device dm-9): turning on async discard
[35644.469966] BTRFS info (device dm-9): disk space caching is enabled