[31982.205748] run fstests generic/251 at 2023-04-23 05:47:21
[31982.596229] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 1750168 /dev/mapper/vg0-lv0 scanned by mount (860850)
[31982.597697] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[31982.597703] BTRFS info (device dm-0): using free space tree
[31982.601482] BTRFS info (device dm-0): auto enabling async discard
[31982.855780] BTRFS: device fsid fdf095e6-8e42-49d0-a071-f895ca37a921 devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (860899)
[31982.881014] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[31982.881027] BTRFS info (device dm-9): setting incompat feature flag for COMPRESS_ZSTD (0x10)
[31982.881031] BTRFS info (device dm-9): use zstd compression, level 3
[31982.881036] BTRFS info (device dm-9): turning on async discard
[31982.881039] BTRFS info (device dm-9): disk space caching is enabled
[31982.918621] BTRFS info (device dm-9): checking UUID tree
[32411.881728] ======================================================
[32411.882060] WARNING: possible circular locking dependency detected
[32411.882342] 6.3.0-rc7+ #1155 Not tainted
[32411.882496] ------------------------------------------------------
[32411.882734] kswapd0/46 is trying to acquire lock:
[32411.882936] ffff974e46bf8650 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[32411.883313]
but task is already holding lock:
[32411.883539] ffffffff9fe61b40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x4aa/0x7a0
[32411.883836]
which lock already depends on the new lock.
[32411.884176]
the existing dependency chain (in reverse order) is:
[32411.884480]
-> #1 (fs_reclaim){+.+.}-{0:0}:
[32411.884713] fs_reclaim_acquire+0xa5/0xe0
[32411.884912] kmem_cache_alloc+0x31/0x2c0
[32411.885106] alloc_extent_state+0x1d/0xd0
[32411.885294] __clear_extent_bit+0x2e0/0x4f0
[32411.885479] try_release_extent_mapping+0x216/0x280
[32411.885687] btrfs_release_folio+0x2e/0x90
[32411.885869] invalidate_inode_pages2_range+0x397/0x470
[32411.886091] btrfs_cleanup_dirty_bgs+0x9e/0x210
[32411.886294] btrfs_cleanup_one_transaction+0x22/0x760
[32411.886534] btrfs_commit_transaction+0x3b7/0x13a0
[32411.886743] create_subvol+0x59b/0x970
[32411.886912] btrfs_mksubvol+0x435/0x4f0
[32411.887134] __btrfs_ioctl_snap_create+0x11e/0x1b0
[32411.887355] btrfs_ioctl_snap_create_v2+0xbf/0x140
[32411.887575] btrfs_ioctl+0xa2e/0x28d0
[32411.887750] __x64_sys_ioctl+0x88/0xc0
[32411.887928] do_syscall_64+0x38/0x90
[32411.888103] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[32411.888327]
-> #0 (sb_internal#2){++++}-{0:0}:
[32411.888559] __lock_acquire+0x1435/0x21a0
[32411.888740] lock_acquire+0xc2/0x2b0
[32411.888933] start_transaction+0x401/0x720
[32411.889119] btrfs_commit_inode_delayed_inode+0x5f/0x120
[32411.889349] btrfs_evict_inode+0x282/0x3c0
[32411.889531] evict+0xcc/0x1d0
[32411.889671] inode_lru_isolate+0x14d/0x1e0
[32411.889852] __list_lru_walk_one+0xbe/0x1c0
[32411.890036] list_lru_walk_one+0x58/0x80
[32411.890212] prune_icache_sb+0x39/0x60
[32411.890385] super_cache_scan+0x161/0x1f0
[32411.890563] do_shrink_slab+0x163/0x340
[32411.890737] shrink_slab+0x1d3/0x290
[32411.890913] shrink_node+0x300/0x720
[32411.891086] balance_pgdat+0x35c/0x7a0
[32411.891268] kswapd+0x205/0x410
[32411.891431] kthread+0xf0/0x120
[32411.891585] ret_from_fork+0x29/0x50
[32411.891754]
other info that might help us debug this:
[32411.892055] Possible unsafe locking scenario:
[32411.892287] CPU0 CPU1
[32411.892465] ---- ----
[32411.892640] lock(fs_reclaim);
[32411.892767] lock(sb_internal#2);
[32411.892995] lock(fs_reclaim);
[32411.893214] lock(sb_internal#2);
[32411.893354]
*** DEADLOCK ***
[32411.893583] 3 locks held by kswapd0/46:
[32411.893735] #0: ffffffff9fe61b40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x4aa/0x7a0
[32411.894047] #1: ffffffff9fe50270 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x290
[32411.894430] #2: ffff974e46bf80e0 (&type->s_umount_key#44){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[32411.894787]
stack backtrace:
[32411.894963] CPU: 0 PID: 46 Comm: kswapd0 Not tainted 6.3.0-rc7+ #1155
[32411.895212] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[32411.895540] Call Trace:
[32411.895645]
[32411.895737] dump_stack_lvl+0x58/0x90
[32411.895885] check_noncircular+0xd6/0x100
[32411.896045] ? save_trace+0x3f/0x310
[32411.896188] ? add_lock_to_list+0x97/0x120
[32411.896353] __lock_acquire+0x1435/0x21a0
[32411.896515] lock_acquire+0xc2/0x2b0
[32411.896667] ? btrfs_commit_inode_delayed_inode+0x5f/0x120
[32411.896936] start_transaction+0x401/0x720
[32411.897100] ? btrfs_commit_inode_delayed_inode+0x5f/0x120
[32411.897315] btrfs_commit_inode_delayed_inode+0x5f/0x120
[32411.897521] btrfs_evict_inode+0x282/0x3c0
[32411.897685] ? lock_release+0x134/0x270
[32411.897838] ? __pfx_wake_bit_function+0x10/0x10
[32411.898023] evict+0xcc/0x1d0
[32411.898144] inode_lru_isolate+0x14d/0x1e0
[32411.898311] __list_lru_walk_one+0xbe/0x1c0
[32411.898518] ? __pfx_inode_lru_isolate+0x10/0x10
[32411.898701] ? __pfx_inode_lru_isolate+0x10/0x10
[32411.898882] list_lru_walk_one+0x58/0x80
[32411.899039] prune_icache_sb+0x39/0x60
[32411.899189] super_cache_scan+0x161/0x1f0
[32411.899353] do_shrink_slab+0x163/0x340
[32411.899507] shrink_slab+0x1d3/0x290
[32411.899651] shrink_node+0x300/0x720
[32411.899796] balance_pgdat+0x35c/0x7a0
[32411.899949] kswapd+0x205/0x410
[32411.900078] ? __pfx_autoremove_wake_function+0x10/0x10
[32411.900285] ? __pfx_kswapd+0x10/0x10
[32411.900432] kthread+0xf0/0x120
[32411.900561] ? __pfx_kthread+0x10/0x10
[32411.900712] ret_from_fork+0x29/0x50
[32411.900859]
[32800.360396] BTRFS warning (device dm-9): failed to trim 1 block group(s), last error -512
[32804.989789] BTRFS: device fsid fdf095e6-8e42-49d0-a071-f895ca37a921 devid 1 transid 70 /dev/mapper/vg0-lv9 scanned by mount (872433)
[32804.992312] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[32804.992616] BTRFS info (device dm-9): use zstd compression, level 3
[32804.992869] BTRFS info (device dm-9): turning on async discard
[32804.993093] BTRFS info (device dm-9): disk space caching is enabled