[121184.372336] run fstests generic/251 at 2023-08-11 06:34:53
[121184.800543] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 2528007 /dev/mapper/vg0-lv0 scanned by mount (1296750)
[121184.801910] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[121184.801916] BTRFS info (device dm-0): using free space tree
[121184.806105] BTRFS info (device dm-0): auto enabling async discard
[121185.008577] BTRFS: device fsid fb8b6545-64dd-417a-a511-d3af053882d8 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (1296798)
[121185.031967] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[121185.031977] BTRFS info (device dm-9): setting incompat feature flag for COMPRESS_ZSTD (0x10)
[121185.031980] BTRFS info (device dm-9): use zstd compression, level 3
[121185.031983] BTRFS info (device dm-9): turning on async discard
[121185.031985] BTRFS info (device dm-9): disk space caching is enabled
[121185.065454] BTRFS info (device dm-9): checking UUID tree
[121602.013978] ======================================================
[121602.014213] WARNING: possible circular locking dependency detected
[121602.014453] 6.5.0-rc3+ #1266 Not tainted
[121602.014609] ------------------------------------------------------
[121602.014842] kswapd0/47 is trying to acquire lock:
[121602.015025] ffff99d58988a378 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x1af/0x590
[121602.015374]
but task is already holding lock:
[121602.015604] ffff99d583c6a600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[121602.015963]
which lock already depends on the new lock.
[121602.016275]
the existing dependency chain (in reverse order) is:
[121602.016562]
-> #3 (sb_internal#2){++++}-{0:0}:
[121602.016792] start_transaction+0x3f9/0x740
[121602.016974] btrfs_commit_inode_delayed_inode+0x5f/0x120
[121602.017198] btrfs_evict_inode+0x273/0x3c0
[121602.017380] evict+0xcc/0x1d0
[121602.017525] inode_lru_isolate+0x14d/0x1e0
[121602.017706] __list_lru_walk_one+0xbe/0x1c0
[121602.017890] list_lru_walk_one+0x58/0x80
[121602.018065] prune_icache_sb+0x39/0x60
[121602.018234] super_cache_scan+0x161/0x1f0
[121602.018414] do_shrink_slab+0x163/0x340
[121602.018588] shrink_slab+0x1d7/0x2a0
[121602.018749] shrink_node+0x2eb/0x7b0
[121602.018909] balance_pgdat+0x344/0x780
[121602.019077] kswapd+0x205/0x410
[121602.019223] kthread+0xfc/0x130
[121602.019370] ret_from_fork+0x2d/0x50
[121602.019533] ret_from_fork_asm+0x1b/0x30
[121602.019711]
-> #2 (fs_reclaim){+.+.}-{0:0}:
[121602.019938] fs_reclaim_acquire+0xa5/0xe0
[121602.020116] kmem_cache_alloc_lru+0x4e/0x570
[121602.020303] btrfs_alloc_inode+0x2d/0x250
[121602.020573] alloc_inode+0x1a/0xc0
[121602.020732] iget5_locked+0xba/0x110
[121602.020892] btrfs_iget+0x43/0xe0
[121602.021043] create_reloc_inode+0x19d/0x370
[121602.021228] btrfs_relocate_block_group+0x1b7/0x410
[121602.021441] btrfs_relocate_chunk+0x4c/0x1b0
[121602.021629] btrfs_balance+0x8e7/0x11d0
[121602.021801] btrfs_ioctl+0x1d3d/0x2900
[121602.021970] __x64_sys_ioctl+0x8b/0xc0
[121602.022139] do_syscall_64+0x38/0x90
[121602.022300] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[121602.022520]
-> #1 (btrfs_trans_num_extwriters){++++}-{0:0}:
[121602.022792] join_transaction+0xb4/0x590
[121602.022966] start_transaction+0x187/0x740
[121602.023148] btrfs_uuid_scan_kthread+0x2bc/0x3d0
[121602.023346] kthread+0xfc/0x130
[121602.023496] ret_from_fork+0x2d/0x50
[121602.023656] ret_from_fork_asm+0x1b/0x30
[121602.023833]
-> #0 (btrfs_trans_num_writers){++++}-{0:0}:
[121602.024092] __lock_acquire+0x1415/0x2190
[121602.024271] lock_acquire+0xc7/0x2b0
[121602.024437] join_transaction+0x1de/0x590
[121602.024614] start_transaction+0x187/0x740
[121602.024798] btrfs_commit_inode_delayed_inode+0x5f/0x120
[121602.025023] btrfs_evict_inode+0x273/0x3c0
[121602.025303] evict+0xcc/0x1d0
[121602.025519] inode_lru_isolate+0x14d/0x1e0
[121602.025700] __list_lru_walk_one+0xbe/0x1c0
[121602.025884] list_lru_walk_one+0x58/0x80
[121602.026058] prune_icache_sb+0x39/0x60
[121602.026227] super_cache_scan+0x161/0x1f0
[121602.026407] do_shrink_slab+0x163/0x340
[121602.026580] shrink_slab+0x1d7/0x2a0
[121602.026740] shrink_node+0x2eb/0x7b0
[121602.026900] balance_pgdat+0x344/0x780
[121602.027067] kswapd+0x205/0x410
[121602.027212] kthread+0xfc/0x130
[121602.027357] ret_from_fork+0x2d/0x50
[121602.027521] ret_from_fork_asm+0x1b/0x30
[121602.027697]
other info that might help us debug this:
[121602.027999] Chain exists of:
btrfs_trans_num_writers --> fs_reclaim --> sb_internal#2
[121602.028407] Possible unsafe locking scenario:
[121602.028634] CPU0 CPU1
[121602.028809] ---- ----
[121602.028982] rlock(sb_internal#2);
[121602.029123] lock(fs_reclaim);
[121602.029341] lock(sb_internal#2);
[121602.029570] rlock(btrfs_trans_num_writers);
[121602.029743]
*** DEADLOCK ***
[121602.029972] 4 locks held by kswapd0/47:
[121602.030121] #0: ffffffff92e62280 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x492/0x780
[121602.030431] #1: ffffffff92e507d0 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x2a0
[121602.030744] #2: ffff99d583c6a0e0 (&type->s_umount_key#45){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[121602.031097] #3: ffff99d583c6a600 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[121602.031472]
stack backtrace:
[121602.031646] CPU: 0 PID: 47 Comm: kswapd0 Not tainted 6.5.0-rc3+ #1266
[121602.031890] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[121602.032210] Call Trace:
[121602.032312]
[121602.032409] dump_stack_lvl+0x58/0x90
[121602.032558] check_noncircular+0x101/0x110
[121602.032721] __lock_acquire+0x1415/0x2190
[121602.032883] lock_acquire+0xc7/0x2b0
[121602.033026] ? join_transaction+0x1af/0x590
[121602.033193] ? lock_release+0x134/0x270
[121602.033349] join_transaction+0x1de/0x590
[121602.033512] ? join_transaction+0x1af/0x590
[121602.033681] start_transaction+0x187/0x740
[121602.033842] btrfs_commit_inode_delayed_inode+0x5f/0x120
[121602.034049] btrfs_evict_inode+0x273/0x3c0
[121602.034213] ? lock_release+0x134/0x270
[121602.034365] ? __pfx_wake_bit_function+0x10/0x10
[121602.034549] evict+0xcc/0x1d0
[121602.034674] inode_lru_isolate+0x14d/0x1e0
[121602.034836] __list_lru_walk_one+0xbe/0x1c0
[121602.035003] ? __pfx_inode_lru_isolate+0x10/0x10
[121602.035183] ? __pfx_inode_lru_isolate+0x10/0x10
[121602.035365] list_lru_walk_one+0x58/0x80
[121602.035527] prune_icache_sb+0x39/0x60
[121602.035678] super_cache_scan+0x161/0x1f0
[121602.035835] do_shrink_slab+0x163/0x340
[121602.035990] ? lock_is_held_type+0xe2/0x140
[121602.036157] shrink_slab+0x1d7/0x2a0
[121602.036301] shrink_node+0x2eb/0x7b0
[121602.036449] balance_pgdat+0x344/0x780
[121602.036600] kswapd+0x205/0x410
[121602.036730] ? __pfx_autoremove_wake_function+0x10/0x10
[121602.036932] ? __pfx_kswapd+0x10/0x10
[121602.037079] kthread+0xfc/0x130
[121602.037207] ? __pfx_kthread+0x10/0x10
[121602.037357] ret_from_fork+0x2d/0x50
[121602.037506] ? __pfx_kthread+0x10/0x10
[121602.037656] ret_from_fork_asm+0x1b/0x30
[121602.037811] RIP: 0000:0x0
[121602.037936] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
[121602.038183] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[121602.038473] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[121602.038743] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[121602.039012] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[121602.039280] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[121602.039553] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[121602.039827]
[121991.672382] BTRFS warning (device dm-9): failed to trim 3 block group(s), last error -512
[121996.062846] BTRFS: device fsid fb8b6545-64dd-417a-a511-d3af053882d8 devid 1 transid 67 /dev/mapper/vg0-lv9 scanned by mount (1308887)
[121996.064417] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[121996.064866] BTRFS info (device dm-9): use zstd compression, level 3
[121996.065140] BTRFS info (device dm-9): turning on async discard
[121996.065407] BTRFS info (device dm-9): disk space caching is enabled