syzbot


possible deadlock in evict (3)

Status: auto-obsoleted due to no activity on 2024/09/04 11:02
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+dd426ae4af71f1e74729@syzkaller.appspotmail.com
First crash: 704d, last: 216d
Discussions (11)
Title Replies (including bot) Last reply
[syzbot] Monthly ext4 report (Jun 2024) 0 (1) 2024/06/14 08:14
[syzbot] Monthly ext4 report (Mar 2024) 0 (1) 2024/03/12 09:29
[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 710d 1013d 0/28 closed as dup on 2022/04/21 19:37
upstream possible deadlock in evict ext4 3 1417d 1445d 0/28 auto-closed as invalid on 2021/07/11 09:40

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

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

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (fs_reclaim){+.+.}-{0:0}:
       __fs_reclaim_acquire mm/page_alloc.c:3692 [inline]
       fs_reclaim_acquire+0x102/0x150 mm/page_alloc.c:3706
       might_alloc include/linux/sched/mm.h:303 [inline]
       slab_pre_alloc_hook mm/slub.c:3746 [inline]
       slab_alloc_node mm/slub.c:3827 [inline]
       kmalloc_trace+0x51/0x330 mm/slub.c:3992
       kmalloc include/linux/slab.h:628 [inline]
       kzalloc include/linux/slab.h:749 [inline]
       assoc_array_insert+0x10a/0x3140 lib/assoc_array.c:980
       __key_link_begin+0xf5/0x260 security/keys/keyring.c:1314
       __key_create_or_update+0x4e5/0xe10 security/keys/key.c:861
       key_create_or_update+0x42/0x60 security/keys/key.c:1005
       x509_load_certificate_list+0x1dd/0x280 crypto/asymmetric_keys/x509_loader.c:31
       do_one_initcall+0x128/0x690 init/main.c:1241
       do_initcall_level init/main.c:1303 [inline]
       do_initcalls init/main.c:1319 [inline]
       do_basic_setup init/main.c:1338 [inline]
       kernel_init_freeable+0x69d/0xc40 init/main.c:1550
       kernel_init+0x1c/0x2a0 init/main.c:1439
       ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243

-> #2 (&type->lock_class){++++}-{3:3}:
       down_write+0x3a/0x50 kernel/locking/rwsem.c:1579
       keyring_clear+0xa0/0x270 security/keys/keyring.c:1655
       fscrypt_put_master_key fs/crypto/keyring.c:79 [inline]
       fscrypt_put_master_key+0x111/0x1e0 fs/crypto/keyring.c:67
       fscrypt_put_master_key_activeref.part.0+0x259/0x340 fs/crypto/keyring.c:125
       fscrypt_put_master_key_activeref+0x86/0xb0 include/linux/refcount.h:271
       put_crypt_info+0x1ff/0x380 fs/crypto/keysetup.c:548
       fscrypt_put_encryption_info+0x38/0x80 fs/crypto/keysetup.c:753
       ext4_clear_inode+0x17d/0x230 fs/ext4/super.c:1536
       ext4_free_inode+0x259/0x1430 fs/ext4/ialloc.c:278
       ext4_evict_inode+0xd8e/0x1a30 fs/ext4/inode.c:303
       evict+0x2ed/0x6c0 fs/inode.c:667
       iput_final fs/inode.c:1741 [inline]
       iput.part.0+0x573/0x7c0 fs/inode.c:1767
       iput+0x5c/0x80 fs/inode.c:1757
       d_delete_notify include/linux/fsnotify.h:307 [inline]
       vfs_rmdir fs/namei.c:4222 [inline]
       vfs_rmdir+0x45a/0x660 fs/namei.c:4186
       do_rmdir+0x3a2/0x410 fs/namei.c:4268
       __do_sys_unlinkat fs/namei.c:4444 [inline]
       __se_sys_unlinkat fs/namei.c:4438 [inline]
       __x64_sys_unlinkat+0xf3/0x130 fs/namei.c:4438
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xd2/0x260 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x6d/0x75

-> #1 (jbd2_handle){++++}-{0:0}:
       start_this_handle+0x114b/0x1620 fs/jbd2/transaction.c:463
       jbd2__journal_start+0x2a6/0x8f0 fs/jbd2/transaction.c:520
       __ext4_journal_start_sb+0x358/0x600 fs/ext4/ext4_jbd2.c:112
       ext4_sample_last_mounted fs/ext4/file.c:837 [inline]
       ext4_file_open+0x636/0xc80 fs/ext4/file.c:866
       do_dentry_open+0x8da/0x18c0 fs/open.c:955
       do_open fs/namei.c:3642 [inline]
       path_openat+0x1dfb/0x2990 fs/namei.c:3799
       do_filp_open+0x1dc/0x430 fs/namei.c:3826
       do_sys_openat2+0x17a/0x1e0 fs/open.c:1406
       do_sys_open fs/open.c:1421 [inline]
       __do_sys_openat fs/open.c:1437 [inline]
       __se_sys_openat fs/open.c:1432 [inline]
       __x64_sys_openat+0x175/0x210 fs/open.c:1432
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xd2/0x260 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x6d/0x75

-> #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+0x2478/0x3b30 kernel/locking/lockdep.c:5137
       lock_acquire kernel/locking/lockdep.c:5754 [inline]
       lock_acquire+0x1b1/0x540 kernel/locking/lockdep.c:5719
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1662 [inline]
       sb_start_intwrite include/linux/fs.h:1845 [inline]
       ext4_evict_inode+0xe3a/0x1a30 fs/ext4/inode.c:212
       evict+0x2ed/0x6c0 fs/inode.c:667
       iput_final fs/inode.c:1741 [inline]
       iput.part.0+0x573/0x7c0 fs/inode.c:1767
       iput+0x5c/0x80 fs/inode.c:1757
       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+0x44f/0x1160 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+0x2123/0x3750 mm/vmscan.c:5888
       kswapd_shrink_node mm/vmscan.c:6696 [inline]
       balance_pgdat+0x9d0/0x1a90 mm/vmscan.c:6886
       kswapd+0x5c1/0xc10 mm/vmscan.c:7146
       kthread+0x2c1/0x3a0 kernel/kthread.c:388
       ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243

other info that might help us debug this:

Chain exists of:
  sb_internal --> &type->lock_class --> fs_reclaim

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(fs_reclaim);
                               lock(&type->lock_class);
                               lock(fs_reclaim);
  rlock(sb_internal);

 *** DEADLOCK ***

2 locks held by kswapd0/110:
 #0: ffffffff8d928ce0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x15f/0x1a90 mm/vmscan.c:6774
 #1: ffff88802c0b40e0 (&type->s_umount_key#52){++++}-{3:3}, at: super_trylock_shared fs/super.c:561 [inline]
 #1: ffff88802c0b40e0 (&type->s_umount_key#52){++++}-{3:3}, at: super_cache_scan+0x96/0x550 fs/super.c:196

stack backtrace:
CPU: 1 PID: 110 Comm: kswapd0 Not tainted 6.8.0-syzkaller-06619-ge5e038b7ae9d #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+0x116/0x1f0 lib/dump_stack.c:114
 check_noncircular+0x31a/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+0x2478/0x3b30 kernel/locking/lockdep.c:5137
 lock_acquire kernel/locking/lockdep.c:5754 [inline]
 lock_acquire+0x1b1/0x540 kernel/locking/lockdep.c:5719
 percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
 __sb_start_write include/linux/fs.h:1662 [inline]
 sb_start_intwrite include/linux/fs.h:1845 [inline]
 ext4_evict_inode+0xe3a/0x1a30 fs/ext4/inode.c:212
 evict+0x2ed/0x6c0 fs/inode.c:667
 iput_final fs/inode.c:1741 [inline]
 iput.part.0+0x573/0x7c0 fs/inode.c:1767
 iput+0x5c/0x80 fs/inode.c:1757
 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+0x44f/0x1160 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+0x2123/0x3750 mm/vmscan.c:5888
 kswapd_shrink_node mm/vmscan.c:6696 [inline]
 balance_pgdat+0x9d0/0x1a90 mm/vmscan.c:6886
 kswapd+0x5c1/0xc10 mm/vmscan.c:7146
 kthread+0x2c1/0x3a0 kernel/kthread.c:388
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243
 </TASK>

Crashes (569):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/14 08:17 upstream e5e038b7ae9d 8d8ee116 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in evict
2024/06/26 11:01 upstream 55027e689933 dec8bc94 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/26 04:48 upstream 55027e689933 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/25 21:11 upstream 55027e689933 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/25 10:21 upstream 55027e689933 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/25 08:06 upstream 55027e689933 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/25 05:12 upstream 55027e689933 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/25 05:10 upstream 55027e689933 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/25 00:17 upstream 626737a5791b c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/24 21:38 upstream 626737a5791b c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/24 20:26 upstream 626737a5791b c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/24 16:54 upstream 626737a5791b c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/24 15:04 upstream f2661062f16b c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/24 10:30 upstream f2661062f16b c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/24 04:03 upstream f2661062f16b c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/24 02:57 upstream f2661062f16b c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/23 20:12 upstream 5f583a3162ff c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/23 14:32 upstream 5f583a3162ff c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/23 13:12 upstream 5f583a3162ff c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/23 01:42 upstream 563a50672d8a c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/23 00:52 upstream 563a50672d8a c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/22 22:58 upstream 563a50672d8a c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/22 15:14 upstream 35bb670d65fc c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/22 12:38 upstream 35bb670d65fc c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/22 11:36 upstream 35bb670d65fc c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/22 10:33 upstream 35bb670d65fc c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/22 01:09 upstream 66cc544fd75c c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/22 00:08 upstream 66cc544fd75c c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/21 22:09 upstream 66cc544fd75c c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/21 20:12 upstream 66cc544fd75c c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/21 10:06 upstream 50736169ecc8 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/21 01:07 upstream 50736169ecc8 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/20 21:57 upstream 50736169ecc8 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/20 14:54 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/20 12:29 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/20 10:32 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/20 04:20 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/20 02:18 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/20 01:10 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/19 22:50 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/19 20:48 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/19 19:08 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/19 16:50 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/19 13:26 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/19 12:09 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/19 10:51 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/19 05:54 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evict
2024/06/18 21:57 upstream 2ccbdf43d5e7 c2e07261 .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/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/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.