syzbot


possible deadlock in evict (3)

Status: upstream: reported on 2023/02/28 17:25
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+dd426ae4af71f1e74729@syzkaller.appspotmail.com
First crash: 372d, last: 1d08h
Discussions (9)
Title Replies (including bot) Last reply
[syzbot] Monthly ext4 report (Feb 2024) 0 (1) 2024/02/09 20:57
[syzbot] Monthly ext4 report (Jan 2024) 0 (1) 2024/01/09 18:20
[syzbot] Monthly ext4 report (Dec 2023) 0 (1) 2023/12/10 10:05
[syzbot] Monthly ext4 report (Nov 2023) 0 (1) 2023/11/08 23:44
[syzbot] Monthly ext4 report (Oct 2023) 0 (1) 2023/10/09 09:23
[syzbot] Monthly ext4 report (Sep 2023) 0 (1) 2023/09/07 09:25
[syzbot] Monthly ext4 report (Aug 2023) 0 (1) 2023/08/07 07:27
[syzbot] Monthly ext4 report (Jul 2023) 0 (1) 2023/07/06 14:18
[syzbot] [ext4?] possible deadlock in evict (3) 3 (4) 2023/03/01 21:55
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in evict (2) ext4 39 378d 681d 0/26 closed as dup on 2022/04/21 19:37
upstream possible deadlock in evict ext4 3 1085d 1113d 0/26 auto-closed as invalid on 2021/07/11 09:40

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
6.8.0-rc3-syzkaller #0 Not tainted
------------------------------------------------------
kswapd0/109 is trying to acquire lock:
ffff8880258e0610 (sb_internal){.+.+}-{0:0}, at: evict+0x2ed/0x6c0 fs/inode.c:665

but task is already holding lock:
ffffffff8d91dee0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x160/0x1a90 mm/vmscan.c:6771

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (fs_reclaim){+.+.}-{0:0}:
       __fs_reclaim_acquire mm/page_alloc.c:3692 [inline]
       fs_reclaim_acquire+0x104/0x150 mm/page_alloc.c:3706
       might_alloc include/linux/sched/mm.h:303 [inline]
       slab_pre_alloc_hook mm/slub.c:3761 [inline]
       slab_alloc_node mm/slub.c:3842 [inline]
       kmem_cache_alloc+0x4f/0x320 mm/slub.c:3867
       kmem_cache_zalloc include/linux/slab.h:701 [inline]
       __es_alloc_extent fs/ext4/extents_status.c:483 [inline]
       ext4_es_insert_delayed_block+0x546/0x760 fs/ext4/extents_status.c:2090
       ext4_insert_delayed_block fs/ext4/inode.c:1676 [inline]
       ext4_da_map_blocks fs/ext4/inode.c:1777 [inline]
       ext4_da_get_block_prep+0x850/0x1320 fs/ext4/inode.c:1817
       __block_write_begin_int+0x4fb/0x16e0 fs/buffer.c:2103
       ext4_da_convert_inline_data_to_extent fs/ext4/inline.c:859 [inline]
       ext4_da_write_inline_data_begin+0x3ad/0xc00 fs/ext4/inline.c:920
       ext4_da_write_begin+0x6f0/0x8c0 fs/ext4/inode.c:2876
       generic_perform_write+0x273/0x620 mm/filemap.c:3930
       ext4_buffered_write_iter+0x11f/0x3d0 fs/ext4/file.c:299
       ext4_file_write_iter+0x819/0x1960 fs/ext4/file.c:698
       call_write_iter include/linux/fs.h:2085 [inline]
       iter_file_splice_write+0x908/0x10b0 fs/splice.c:743
       do_splice_from fs/splice.c:941 [inline]
       direct_splice_actor+0x19b/0x6d0 fs/splice.c:1164
       splice_direct_to_actor+0x347/0xa40 fs/splice.c:1108
       do_splice_direct_actor fs/splice.c:1207 [inline]
       do_splice_direct+0x17e/0x250 fs/splice.c:1233
       do_sendfile+0xaac/0xdb0 fs/read_write.c:1295
       __do_sys_sendfile64 fs/read_write.c:1362 [inline]
       __se_sys_sendfile64 fs/read_write.c:1348 [inline]
       __x64_sys_sendfile64+0x1da/0x220 fs/read_write.c:1348
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x6f/0x77

-> #1 (&ei->i_data_sem){++++}-{3:3}:
       down_write+0x3a/0x50 kernel/locking/rwsem.c:1579
       ext4_truncate+0xd21/0x1310 fs/ext4/inode.c:4141
       ext4_evict_inode+0x7a7/0x1a40 fs/ext4/inode.c:258
       evict+0x2ed/0x6c0 fs/inode.c:665
       iput_final fs/inode.c:1739 [inline]
       iput.part.0+0x563/0x7b0 fs/inode.c:1765
       iput+0x5c/0x80 fs/inode.c:1755
       ext4_orphan_cleanup+0x713/0x11d0 fs/ext4/orphan.c:474
       __ext4_fill_super fs/ext4/super.c:5582 [inline]
       ext4_fill_super+0x80f1/0xaf00 fs/ext4/super.c:5703
       get_tree_bdev+0x36f/0x610 fs/super.c:1619
       vfs_get_tree+0x8f/0x380 fs/super.c:1784
       do_new_mount fs/namespace.c:3352 [inline]
       path_mount+0x14ea/0x1f20 fs/namespace.c:3679
       do_mount fs/namespace.c:3692 [inline]
       __do_sys_mount fs/namespace.c:3898 [inline]
       __se_sys_mount fs/namespace.c:3875 [inline]
       __x64_sys_mount+0x297/0x320 fs/namespace.c:3875
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x6f/0x77

-> #0 (sb_internal){.+.+}-{0:0}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3869 [inline]
       __lock_acquire+0x244f/0x3b40 kernel/locking/lockdep.c:5137
       lock_acquire kernel/locking/lockdep.c:5754 [inline]
       lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1639 [inline]
       sb_start_intwrite include/linux/fs.h:1822 [inline]
       ext4_evict_inode+0xe5f/0x1a40 fs/ext4/inode.c:212
       evict+0x2ed/0x6c0 fs/inode.c:665
       iput_final fs/inode.c:1739 [inline]
       iput.part.0+0x563/0x7b0 fs/inode.c:1765
       iput+0x5c/0x80 fs/inode.c:1755
       dentry_unlink_inode+0x295/0x440 fs/dcache.c:400
       __dentry_kill+0x1d0/0x600 fs/dcache.c:603
       shrink_kill fs/dcache.c:1048 [inline]
       shrink_dentry_list+0x140/0x5d0 fs/dcache.c:1075
       prune_dcache_sb+0xeb/0x150 fs/dcache.c:1156
       super_cache_scan+0x32a/0x550 fs/super.c:221
       do_shrink_slab+0x426/0x1120 mm/shrinker.c:435
       shrink_slab_memcg mm/shrinker.c:548 [inline]
       shrink_slab+0xa87/0x1310 mm/shrinker.c:626
       shrink_one+0x493/0x7b0 mm/vmscan.c:4767
       shrink_many mm/vmscan.c:4828 [inline]
       lru_gen_shrink_node mm/vmscan.c:4929 [inline]
       shrink_node+0x214d/0x3750 mm/vmscan.c:5888
       kswapd_shrink_node mm/vmscan.c:6693 [inline]
       balance_pgdat+0x9d2/0x1a90 mm/vmscan.c:6883
       kswapd+0x5be/0xc00 mm/vmscan.c:7143
       kthread+0x2c6/0x3b0 kernel/kthread.c:388
       ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242

other info that might help us debug this:

Chain exists of:
  sb_internal --> &ei->i_data_sem --> fs_reclaim

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(fs_reclaim);
                               lock(&ei->i_data_sem);
                               lock(fs_reclaim);
  rlock(sb_internal);

 *** DEADLOCK ***

2 locks held by kswapd0/109:
 #0: ffffffff8d91dee0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x160/0x1a90 mm/vmscan.c:6771
 #1: ffff8880258e00e0 (&type->s_umount_key#50){++++}-{3:3}, at: super_trylock_shared fs/super.c:566 [inline]
 #1: ffff8880258e00e0 (&type->s_umount_key#50){++++}-{3:3}, at: super_cache_scan+0x96/0x550 fs/super.c:196

stack backtrace:
CPU: 0 PID: 109 Comm: kswapd0 Not tainted 6.8.0-rc3-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 check_noncircular+0x31b/0x400 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3869 [inline]
 __lock_acquire+0x244f/0x3b40 kernel/locking/lockdep.c:5137
 lock_acquire kernel/locking/lockdep.c:5754 [inline]
 lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719
 percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
 __sb_start_write include/linux/fs.h:1639 [inline]
 sb_start_intwrite include/linux/fs.h:1822 [inline]
 ext4_evict_inode+0xe5f/0x1a40 fs/ext4/inode.c:212
 evict+0x2ed/0x6c0 fs/inode.c:665
 iput_final fs/inode.c:1739 [inline]
 iput.part.0+0x563/0x7b0 fs/inode.c:1765
 iput+0x5c/0x80 fs/inode.c:1755
 dentry_unlink_inode+0x295/0x440 fs/dcache.c:400
 __dentry_kill+0x1d0/0x600 fs/dcache.c:603
 shrink_kill fs/dcache.c:1048 [inline]
 shrink_dentry_list+0x140/0x5d0 fs/dcache.c:1075
 prune_dcache_sb+0xeb/0x150 fs/dcache.c:1156
 super_cache_scan+0x32a/0x550 fs/super.c:221
 do_shrink_slab+0x426/0x1120 mm/shrinker.c:435
 shrink_slab_memcg mm/shrinker.c:548 [inline]
 shrink_slab+0xa87/0x1310 mm/shrinker.c:626
 shrink_one+0x493/0x7b0 mm/vmscan.c:4767
 shrink_many mm/vmscan.c:4828 [inline]
 lru_gen_shrink_node mm/vmscan.c:4929 [inline]
 shrink_node+0x214d/0x3750 mm/vmscan.c:5888
 kswapd_shrink_node mm/vmscan.c:6693 [inline]
 balance_pgdat+0x9d2/0x1a90 mm/vmscan.c:6883
 kswapd+0x5be/0xc00 mm/vmscan.c:7143
 kthread+0x2c6/0x3b0 kernel/kthread.c:388
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242
 </TASK>

Crashes (171):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/06 04:12 upstream 54be6c6c5ae8 6404acf9 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in evict
2024/01/31 05:01 upstream 861c0981648f 373b66cd .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in evict
2024/01/26 13:20 upstream ecb1b8288dc7 cc4a4020 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in evict
2023/12/30 15:37 upstream f016f7547aee fb427a07 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in evict
2024/03/01 15:03 upstream 87adedeba51a 83acf9e0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/02/24 01:49 upstream b6d69282db55 8d446f15 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/02/18 21:02 upstream c02197fc9076 578f7538 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/02/15 16:23 upstream 8d3dea210042 fd39cf6f .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/02/13 00:10 upstream 716f4aaa7b48 77b23aa1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/02/05 08:41 upstream 54be6c6c5ae8 a67b2c42 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/02/04 14:35 upstream 3a0e92207940 a67b2c42 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/02/03 10:44 upstream 56897d51886f a67b2c42 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/01/28 22:12 upstream 4854cf9c61d0 cc4a4020 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/01/21 09:26 upstream 7a396820222d 9bd8dcda .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/01/20 19:41 upstream 125514880ddd 9bd8dcda .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/01/20 07:01 upstream 9d64bf433c53 9bd8dcda .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/01/19 02:25 upstream b0d326da462e 21772ce4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/01/05 15:41 upstream 1f874787ed9a 28c42cff .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/12/10 14:41 upstream c527f5606aa5 28b24332 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/11/21 23:14 upstream c2d5304e6c64 cb976f63 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/11/07 23:38 upstream 13d88ac54ddd 83211397 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/11/07 05:23 upstream be3ca57cfb77 83211397 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/11/03 17:39 upstream 8f6f76a6a29f 500bfdc4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/10/15 11:20 upstream 9a3dad63edbe f757a323 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/10/14 11:46 upstream 8cb1f10d8c4b f757a323 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/10/08 06:45 upstream 59f3fd30af35 5e837c76 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/10/01 11:43 upstream e402b08634b3 8e26a358 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/09/30 15:05 upstream 9f3ebbef746f 8e26a358 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/09/28 00:08 upstream 633b47cb009d c2ab1e5d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/09/25 14:34 upstream 6465e260f487 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/09/23 11:36 upstream 8018e02a8703 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/09/22 03:06 upstream b5cbe7c00aa0 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/08/12 01:19 upstream 9106536c1aa3 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in evict
2023/02/28 17:01 upstream ae3419fbac84 95aee97a .config console log report info ci-qemu-upstream possible deadlock in evict
2023/08/28 20:38 upstream 2dde18cd1d8f 7ba13a15 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/08/27 00:35 upstream 3b35375f19fe 7ba13a15 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/08/25 19:50 upstream 4f9e7fabf864 7ba13a15 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/08/25 12:05 upstream f8d6ff449094 49be837e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/08/22 02:11 upstream f7757129e3de 6b415825 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/08/17 12:58 upstream 4853c74bd7ab 74b106b6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/08/15 14:50 upstream 91aa6c412d7f 39990d51 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/08/11 18:58 upstream 9106536c1aa3 39990d51 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/08/10 18:26 upstream 374a7f47bf40 da3c3ef8 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/08/10 13:07 upstream 374a7f47bf40 da3c3ef8 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2023/02/24 17:18 upstream d2980d8d8265 630c6bc9 .config console log report info ci-qemu-upstream-386 possible deadlock in evict
2023/08/26 18:18 net 5c905279a1b7 03d9c195 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in evict
2023/08/19 08:18 net d44036cad311 d216d8a0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in evict
2023/12/04 15:57 net-next 21f49681658d f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in evict
* Struck through repros no longer work on HEAD.