[51855.273570] run fstests generic/251 at 2023-05-03 11:18:19
[51855.654714] BTRFS: device fsid ec3e1159-917e-46d6-82d2-6d36aac552b0 devid 1 transid 1834419 /dev/mapper/vg0-lv0 scanned by mount (3798774)
[51855.656049] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[51855.656056] BTRFS info (device dm-0): using free space tree
[51855.659231] BTRFS info (device dm-0): auto enabling async discard
[51855.861516] BTRFS: device fsid e12feb80-ede5-4c88-89ef-9ba41e741cbd devid 1 transid 6 /dev/mapper/vg0-lv9 scanned by mkfs.btrfs (3798823)
[51855.877233] BTRFS info: devid 1 device path /dev/mapper/vg0-lv9 changed to /dev/dm-9 scanned by systemd-udevd (3797664)
[51855.877867] BTRFS info: devid 1 device path /dev/dm-9 changed to /dev/mapper/vg0-lv9 scanned by systemd-udevd (3797664)
[51855.877869] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[51855.877876] BTRFS info (device dm-9): turning on sync discard
[51855.877879] BTRFS info (device dm-9): enabling free space tree
[51855.877881] BTRFS info (device dm-9): using free space tree
[51855.882301] BTRFS info (device dm-9): creating free space tree
[51855.883515] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
[51855.883519] BTRFS info (device dm-9): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
[51855.892624] BTRFS info (device dm-9): cleaning free space cache v1
[51855.903810] BTRFS info (device dm-9): checking UUID tree
[52222.184813] ======================================================
[52222.185120] WARNING: possible circular locking dependency detected
[52222.185341] 6.3.0-rc7+ #1167 Not tainted
[52222.185506] ------------------------------------------------------
[52222.185737] kswapd0/46 is trying to acquire lock:
[52222.185958] ffff8c6543abd650 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120
[52222.186341]
but task is already holding lock:
[52222.186547] ffffffffabe61b40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x4aa/0x7a0
[52222.186831]
which lock already depends on the new lock.
[52222.187117]
the existing dependency chain (in reverse order) is:
[52222.187378]
-> #1 (fs_reclaim){+.+.}-{0:0}:
[52222.187581] fs_reclaim_acquire+0xa5/0xe0
[52222.187754] kmem_cache_alloc+0x31/0x2c0
[52222.187920] alloc_extent_state+0x1d/0xd0
[52222.188096] __clear_extent_bit+0x2e0/0x4f0
[52222.188266] try_release_extent_mapping+0x216/0x280
[52222.188464] btrfs_release_folio+0x2e/0x90
[52222.188634] invalidate_inode_pages2_range+0x397/0x470
[52222.188842] btrfs_cleanup_dirty_bgs+0x9e/0x210
[52222.189027] btrfs_cleanup_one_transaction+0x22/0x760
[52222.189229] btrfs_commit_transaction+0x3b7/0x13a0
[52222.189418] create_subvol+0x59b/0x970
[52222.189584] btrfs_mksubvol+0x435/0x4f0
[52222.189743] __btrfs_ioctl_snap_create+0x11e/0x1b0
[52222.189932] btrfs_ioctl_snap_create_v2+0xbf/0x140
[52222.190134] btrfs_ioctl+0xa45/0x28f0
[52222.190287] __x64_sys_ioctl+0x88/0xc0
[52222.190449] do_syscall_64+0x38/0x90
[52222.190621] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[52222.190845]
-> #0 (sb_internal#2){++++}-{0:0}:
[52222.191084] __lock_acquire+0x1435/0x21a0
[52222.191260] lock_acquire+0xc2/0x2b0
[52222.191410] start_transaction+0x401/0x730
[52222.191579] btrfs_commit_inode_delayed_inode+0x5f/0x120
[52222.191788] btrfs_evict_inode+0x292/0x3d0
[52222.191956] evict+0xcc/0x1d0
[52222.192096] inode_lru_isolate+0x14d/0x1e0
[52222.192264] __list_lru_walk_one+0xbe/0x1c0
[52222.192441] list_lru_walk_one+0x58/0x80
[52222.192605] prune_icache_sb+0x39/0x60
[52222.192761] super_cache_scan+0x161/0x1f0
[52222.192933] do_shrink_slab+0x163/0x340
[52222.193097] shrink_slab+0x1d3/0x290
[52222.193247] shrink_node+0x300/0x720
[52222.193397] balance_pgdat+0x35c/0x7a0
[52222.193554] kswapd+0x205/0x410
[52222.193689] kthread+0xf0/0x120
[52222.193833] ret_from_fork+0x29/0x50
[52222.193990]
other info that might help us debug this:
[52222.194272] Possible unsafe locking scenario:
[52222.194483] CPU0 CPU1
[52222.194648] ---- ----
[52222.194812] lock(fs_reclaim);
[52222.194930] lock(sb_internal#2);
[52222.195146] lock(fs_reclaim);
[52222.195350] lock(sb_internal#2);
[52222.195477]
*** DEADLOCK ***
[52222.195686] 3 locks held by kswapd0/46:
[52222.195828] #0: ffffffffabe61b40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x4aa/0x7a0
[52222.196120] #1: ffffffffabe50270 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x290
[52222.196443] #2: ffff8c6543abd0e0 (&type->s_umount_key#44){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0
[52222.196771]
stack backtrace:
[52222.196933] CPU: 0 PID: 46 Comm: kswapd0 Not tainted 6.3.0-rc7+ #1167
[52222.197163] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
[52222.197460] Call Trace:
[52222.197553]
[52222.197637] dump_stack_lvl+0x58/0x90
[52222.197779] check_noncircular+0xd6/0x100
[52222.197925] ? save_trace+0x3f/0x310
[52222.198061] ? add_lock_to_list+0x97/0x120
[52222.198211] __lock_acquire+0x1435/0x21a0
[52222.198359] lock_acquire+0xc2/0x2b0
[52222.198491] ? btrfs_commit_inode_delayed_inode+0x5f/0x120
[52222.198686] start_transaction+0x401/0x730
[52222.198836] ? btrfs_commit_inode_delayed_inode+0x5f/0x120
[52222.199030] btrfs_commit_inode_delayed_inode+0x5f/0x120
[52222.199223] btrfs_evict_inode+0x292/0x3d0
[52222.199372] ? lock_release+0x134/0x270
[52222.199513] ? __pfx_wake_bit_function+0x10/0x10
[52222.199687] evict+0xcc/0x1d0
[52222.199800] inode_lru_isolate+0x14d/0x1e0
[52222.199948] __list_lru_walk_one+0xbe/0x1c0
[52222.200103] ? __pfx_inode_lru_isolate+0x10/0x10
[52222.200272] ? __pfx_inode_lru_isolate+0x10/0x10
[52222.200439] list_lru_walk_one+0x58/0x80
[52222.200586] prune_icache_sb+0x39/0x60
[52222.200724] super_cache_scan+0x161/0x1f0
[52222.200872] do_shrink_slab+0x163/0x340
[52222.201013] shrink_slab+0x1d3/0x290
[52222.201150] shrink_node+0x300/0x720
[52222.201284] balance_pgdat+0x35c/0x7a0
[52222.201424] kswapd+0x205/0x410
[52222.201543] ? __pfx_autoremove_wake_function+0x10/0x10
[52222.201730] ? __pfx_kswapd+0x10/0x10
[52222.201865] kthread+0xf0/0x120
[52222.201984] ? __pfx_kthread+0x10/0x10
[52222.202126] ret_from_fork+0x29/0x50
[52222.202260]
[52531.483376] BTRFS warning (device dm-9): failed to trim 11 block group(s), last error -512
[52536.007655] BTRFS: device fsid e12feb80-ede5-4c88-89ef-9ba41e741cbd devid 1 transid 116 /dev/mapper/vg0-lv9 scanned by mount (3806939)
[52536.009256] BTRFS info (device dm-9): using crc32c (crc32c-intel) checksum algorithm
[52536.009976] BTRFS info (device dm-9): turning on sync discard
[52536.010334] BTRFS info (device dm-9): using free space tree