syzbot


possible deadlock in xfs_icwalk_ag (2)

Status: upstream: reported C repro on 2024/04/16 12:02
Subsystems: xfs
[Documentation on labels]
Reported-by: syzbot+4248e91deb3db78358a2@syzkaller.appspotmail.com
First crash: 222d, last: 6m
Discussions (6)
Title Replies (including bot) Last reply
[syzbot] Monthly xfs report (Oct 2024) 0 (1) 2024/10/16 15:36
[syzbot] Monthly xfs report (Sep 2024) 0 (1) 2024/09/15 14:39
[syzbot] Monthly xfs report (Aug 2024) 0 (1) 2024/08/15 10:40
[syzbot] [xfs?] possible deadlock in xfs_icwalk_ag (2) 0 (2) 2024/08/14 14:12
[syzbot] Monthly xfs report (May 2024) 0 (1) 2024/05/31 06:48
[syzbot] Monthly xfs report (Apr 2024) 0 (1) 2024/04/29 12:34
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in xfs_icwalk_ag xfs 14 225d 242d 0/28 closed as dup on 2024/03/23 08:37
Last patch testing requests (9)
Created Duration User Patch Repo Result
2024/11/08 06:29 19m retest repro upstream OK log
2024/11/08 06:29 19m retest repro upstream OK log
2024/11/08 06:29 19m retest repro upstream OK log
2024/11/08 06:29 19m retest repro upstream OK log
2024/11/08 04:49 19m retest repro upstream OK log
2024/11/08 04:49 19m retest repro upstream OK log
2024/11/08 04:49 19m retest repro upstream OK log
2024/11/08 04:49 19m retest repro upstream OK log
2024/11/08 04:49 19m retest repro upstream OK log

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
6.12.0-rc7-syzkaller-00212-g4a5df3796467 #0 Not tainted
------------------------------------------------------
kswapd0/79 is trying to acquire lock:
ffff888047169098 (&xfs_nondir_ilock_class#3){++++}-{3:3}, at: xfs_reclaim_inode fs/xfs/xfs_icache.c:981 [inline]
ffff888047169098 (&xfs_nondir_ilock_class#3){++++}-{3:3}, at: xfs_icwalk_process_inode fs/xfs/xfs_icache.c:1675 [inline]
ffff888047169098 (&xfs_nondir_ilock_class#3){++++}-{3:3}, at: xfs_icwalk_ag+0x120e/0x1ad0 fs/xfs/xfs_icache.c:1757

but task is already holding lock:
ffffffff8ea37480 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat mm/vmscan.c:6850 [inline]
ffffffff8ea37480 (fs_reclaim){+.+.}-{0:0}, at: kswapd+0xbf1/0x3700 mm/vmscan.c:7232

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (fs_reclaim){+.+.}-{0:0}:
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
       __fs_reclaim_acquire mm/page_alloc.c:3851 [inline]
       fs_reclaim_acquire+0x88/0x130 mm/page_alloc.c:3865
       might_alloc include/linux/sched/mm.h:318 [inline]
       slab_pre_alloc_hook mm/slub.c:4036 [inline]
       slab_alloc_node mm/slub.c:4114 [inline]
       __do_kmalloc_node mm/slub.c:4263 [inline]
       __kmalloc_noprof+0xa9/0x400 mm/slub.c:4276
       kmalloc_noprof include/linux/slab.h:882 [inline]
       xfs_attr_shortform_list+0x753/0x1900 fs/xfs/xfs_attr_list.c:117
       xfs_attr_list+0x1d0/0x270 fs/xfs/xfs_attr_list.c:595
       xfs_vn_listxattr+0x1d2/0x2c0 fs/xfs/xfs_xattr.c:341
       vfs_listxattr fs/xattr.c:493 [inline]
       listxattr+0x107/0x290 fs/xattr.c:841
       path_listxattr fs/xattr.c:865 [inline]
       __do_sys_llistxattr fs/xattr.c:883 [inline]
       __se_sys_llistxattr fs/xattr.c:880 [inline]
       __x64_sys_llistxattr+0x170/0x230 fs/xattr.c:880
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&xfs_nondir_ilock_class#3){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3161 [inline]
       check_prevs_add kernel/locking/lockdep.c:3280 [inline]
       validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904
       __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
       down_write_nested+0xa2/0x220 kernel/locking/rwsem.c:1693
       xfs_reclaim_inode fs/xfs/xfs_icache.c:981 [inline]
       xfs_icwalk_process_inode fs/xfs/xfs_icache.c:1675 [inline]
       xfs_icwalk_ag+0x120e/0x1ad0 fs/xfs/xfs_icache.c:1757
       xfs_icwalk fs/xfs/xfs_icache.c:1805 [inline]
       xfs_reclaim_inodes_nr+0x2ae/0x390 fs/xfs/xfs_icache.c:1047
       super_cache_scan+0x40f/0x4b0 fs/super.c:227
       do_shrink_slab+0x701/0x1160 mm/shrinker.c:437
       shrink_slab+0x1093/0x14d0 mm/shrinker.c:664
       shrink_one+0x43b/0x850 mm/vmscan.c:4824
       shrink_many mm/vmscan.c:4885 [inline]
       lru_gen_shrink_node mm/vmscan.c:4963 [inline]
       shrink_node+0x3791/0x3e20 mm/vmscan.c:5943
       kswapd_shrink_node mm/vmscan.c:6771 [inline]
       balance_pgdat mm/vmscan.c:6963 [inline]
       kswapd+0x1ca9/0x3700 mm/vmscan.c:7232
       kthread+0x2f0/0x390 kernel/kthread.c:389
       ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(fs_reclaim);
                               lock(&xfs_nondir_ilock_class#3);
                               lock(fs_reclaim);
  lock(&xfs_nondir_ilock_class#3);

 *** DEADLOCK ***

2 locks held by kswapd0/79:
 #0: ffffffff8ea37480 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat mm/vmscan.c:6850 [inline]
 #0: ffffffff8ea37480 (fs_reclaim){+.+.}-{0:0}, at: kswapd+0xbf1/0x3700 mm/vmscan.c:7232
 #1: ffff88803ff040e0 (&type->s_umount_key#43){++++}-{3:3}, at: super_trylock_shared fs/super.c:562 [inline]
 #1: ffff88803ff040e0 (&type->s_umount_key#43){++++}-{3:3}, at: super_cache_scan+0x94/0x4b0 fs/super.c:196

stack backtrace:
CPU: 0 UID: 0 PID: 79 Comm: kswapd0 Not tainted 6.12.0-rc7-syzkaller-00212-g4a5df3796467 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2074
 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2206
 check_prev_add kernel/locking/lockdep.c:3161 [inline]
 check_prevs_add kernel/locking/lockdep.c:3280 [inline]
 validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904
 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
 down_write_nested+0xa2/0x220 kernel/locking/rwsem.c:1693
 xfs_reclaim_inode fs/xfs/xfs_icache.c:981 [inline]
 xfs_icwalk_process_inode fs/xfs/xfs_icache.c:1675 [inline]
 xfs_icwalk_ag+0x120e/0x1ad0 fs/xfs/xfs_icache.c:1757
 xfs_icwalk fs/xfs/xfs_icache.c:1805 [inline]
 xfs_reclaim_inodes_nr+0x2ae/0x390 fs/xfs/xfs_icache.c:1047
 super_cache_scan+0x40f/0x4b0 fs/super.c:227
 do_shrink_slab+0x701/0x1160 mm/shrinker.c:437
 shrink_slab+0x1093/0x14d0 mm/shrinker.c:664
 shrink_one+0x43b/0x850 mm/vmscan.c:4824
 shrink_many mm/vmscan.c:4885 [inline]
 lru_gen_shrink_node mm/vmscan.c:4963 [inline]
 shrink_node+0x3791/0x3e20 mm/vmscan.c:5943
 kswapd_shrink_node mm/vmscan.c:6771 [inline]
 balance_pgdat mm/vmscan.c:6963 [inline]
 kswapd+0x1ca9/0x3700 mm/vmscan.c:7232
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Crashes (233):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/17 14:29 upstream 4a5df3796467 cfe3a04a .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/11/08 15:29 upstream 906bd684e4b1 d40c056e .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/11/20 07:35 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in xfs_icwalk_ag
2024/08/27 08:06 upstream 3e9bff3bbe13 9aee4e0b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in xfs_icwalk_ag
2024/05/21 16:13 upstream 8f6a15f095a6 1014eca7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in xfs_icwalk_ag
2024/11/21 06:11 upstream 8f7c8b88bda4 4b25d554 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/11/20 21:36 upstream 8f7c8b88bda4 4fca1650 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/11/20 16:15 upstream bf9aa14fc523 4fca1650 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/11/20 11:15 upstream bf9aa14fc523 7d02db5a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/11/08 14:49 upstream 906bd684e4b1 d40c056e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/25 04:47 upstream 4e46774408d9 c79b8ca5 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/21 23:35 upstream 42f7652d3eb5 14517542 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/18 06:52 upstream 6efbea77b390 666f77ed .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/18 05:19 upstream 6efbea77b390 666f77ed .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/16 14:12 upstream 2f87d0916ce0 bde2d81c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/16 13:00 upstream 2f87d0916ce0 bde2d81c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/16 07:57 upstream 2f87d0916ce0 bde2d81c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/15 17:03 upstream eca631b8fe80 b01b6661 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/15 07:18 upstream eca631b8fe80 484e362f .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/13 17:18 upstream 36c254515dc6 084d8178 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/13 11:12 upstream 7234e2ea0edd 084d8178 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/12 15:41 upstream 09f6b0c8904b 084d8178 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/09 20:09 upstream 75b607fab38d 56fb2cb7 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/09 05:58 upstream 5b7c893ed5ed 402f1df0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/08 18:28 upstream 87d6aab2389e 402f1df0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/08 16:27 upstream 87d6aab2389e 402f1df0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/08 06:36 upstream 87d6aab2389e 402f1df0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/07 10:11 upstream 2a130b7e1fcd d7906eff .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/05 23:24 upstream fc20a3e57247 d7906eff .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/05 12:16 upstream 27cc6fdf7201 d7906eff .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/05 09:25 upstream 27cc6fdf7201 d7906eff .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/05 06:30 upstream 27cc6fdf7201 d7906eff .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/04 18:49 upstream 0c559323bbaa d7906eff .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/04 07:32 upstream 3840cbe24cf0 d7906eff .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/04 02:58 upstream 3840cbe24cf0 d7906eff .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/03 22:17 upstream 7ec462100ef9 d7906eff .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/03 09:52 upstream f23aa4c0761a a4c7fd36 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/03 06:14 upstream f23aa4c0761a a4c7fd36 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/03 03:32 upstream f23aa4c0761a a4c7fd36 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/02 15:54 upstream e32cde8d2bd7 83a2f15f .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/02 15:28 upstream e32cde8d2bd7 83a2f15f .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/02 13:03 upstream e32cde8d2bd7 83a2f15f .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/02 09:55 upstream e32cde8d2bd7 ea2b66a6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/02 06:11 upstream e32cde8d2bd7 ea2b66a6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/02 02:56 upstream e32cde8d2bd7 ea2b66a6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/02 01:38 upstream e32cde8d2bd7 ea2b66a6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/10/01 19:37 upstream e32cde8d2bd7 e9f6e118 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/08/20 17:35 upstream 6e4436539ae1 9f0ab3fb .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/08/19 14:06 upstream 47ac09b91bef 9f0ab3fb .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/08/18 12:02 upstream c3f2d783a459 e1c76ab2 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/08/16 06:03 upstream d7a5aa4b3c00 e4bacdaf .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/08/16 05:11 upstream d7a5aa4b3c00 e4bacdaf .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/08/16 04:18 upstream d7a5aa4b3c00 e4bacdaf .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/08/14 18:27 upstream 6b0f8db921ab 890d2dda .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/08/14 16:50 upstream 6b0f8db921ab 890d2dda .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/08/14 14:11 upstream 6b0f8db921ab 890d2dda .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root possible deadlock in xfs_icwalk_ag
2024/08/02 07:13 linux-next 931a3b3bccc9 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in xfs_icwalk_ag
2024/04/13 15:07 linux-next 9ed46da14b9b c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in xfs_icwalk_ag
2024/04/12 11:58 linux-next 4118d9533ff3 27de0a5c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in xfs_icwalk_ag
* Struck through repros no longer work on HEAD.