bisecting fixing commit since 765675379b6253b6901563e649a2f87d28ada3ff building syzkaller on 143a10e9d6320fa7e38693bd8df375fcf4446ae6 testing commit 765675379b6253b6901563e649a2f87d28ada3ff with gcc (GCC) 8.1.0 kernel signature: fd98d079b7c30398e09aceac5cb7ffc9bec0141dec15a2201357a030de81b4e5 run #0: crashed: INFO: task hung in d_alloc_parallel run #1: crashed: INFO: task hung in d_alloc_parallel run #2: crashed: INFO: task hung in d_alloc_parallel run #3: crashed: INFO: task hung in d_alloc_parallel run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK reproducer seems to be flaky testing current HEAD 0c88e405c97ed1828443b67891e6d4bb6e56cd4e testing commit 0c88e405c97ed1828443b67891e6d4bb6e56cd4e with gcc (GCC) 8.1.0 kernel signature: 4b410e9463d28078d5c896dd58ae2476504478d1fd705dfb5a6289f276146da1 run #0: crashed: INFO: task hung in d_alloc_parallel run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK Reproducer flagged being flaky revisions tested: 2, total time: 41m27.77359135s (build: 21m44.329702318s, test: 18m47.821226646s) the crash still happens on HEAD commit msg: Linux 4.19.160 crash: INFO: task hung in d_alloc_parallel INFO: task syz-executor.5:11617 blocked for more than 140 seconds. Not tainted 4.19.160-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D28664 11617 5959 0x00000000 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x78c/0x1c10 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 d_wait_lookup fs/dcache.c:2430 [inline] d_alloc_parallel+0xdc6/0x1750 fs/dcache.c:2512 lookup_open+0x46e/0x1d30 fs/namei.c:3148 do_last fs/namei.c:3327 [inline] path_openat+0x1683/0x3c60 fs/namei.c:3537 do_filp_open+0x177/0x250 fs/namei.c:3567 do_sys_open+0x1dd/0x350 fs/open.c:1085 __do_sys_open fs/open.c:1103 [inline] __se_sys_open fs/open.c:1098 [inline] __x64_sys_open+0x79/0xb0 fs/open.c:1098 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c8a9 Code: Bad RIP value. RSP: 002b:00007f53a4ce9c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00000000004f6880 RCX: 000000000045c8a9 RDX: 0000000000000049 RSI: 00000000000a8482 RDI: 0000000020000000 RBP: 000000000078c040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000773 R14: 00000000005251df R15: 00007f53a4cea6d4 INFO: task syz-executor.0:14763 blocked for more than 140 seconds. Not tainted 4.19.160-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D28664 14763 5953 0x00000000 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x78c/0x1c10 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 d_wait_lookup fs/dcache.c:2430 [inline] d_alloc_parallel+0xdc6/0x1750 fs/dcache.c:2512 lookup_open+0x46e/0x1d30 fs/namei.c:3148 do_last fs/namei.c:3327 [inline] path_openat+0x1683/0x3c60 fs/namei.c:3537 do_filp_open+0x177/0x250 fs/namei.c:3567 do_sys_open+0x1dd/0x350 fs/open.c:1085 __do_sys_open fs/open.c:1103 [inline] __se_sys_open fs/open.c:1098 [inline] __x64_sys_open+0x79/0xb0 fs/open.c:1098 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c8a9 Code: Bad RIP value. RSP: 002b:00007fcd08990c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00000000004f6880 RCX: 000000000045c8a9 RDX: 0000000000000049 RSI: 00000000000a8482 RDI: 0000000020000000 RBP: 000000000078c040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000773 R14: 00000000005251df R15: 00007fcd089916d4 Showing all locks held in the system: 1 lock held by systemd/1: #0: 00000000e3dcf56f (&rq->lock){-.-.}, at: idle_balance kernel/sched/fair.c:9701 [inline] #0: 00000000e3dcf56f (&rq->lock){-.-.}, at: pick_next_task_fair+0xf20/0x1550 kernel/sched/fair.c:6840 1 lock held by khungtaskd/1048: #0: 0000000059c8ebf0 (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:4442 1 lock held by in:imklog/5558: #0: 00000000038d2dfe (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xa7/0xd0 fs/file.c:767 1 lock held by syz-executor.3/5981: #0: 00000000c2695fb7 (rcu_preempt_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline] #0: 00000000c2695fb7 (rcu_preempt_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited+0x3a0/0x8a0 kernel/rcu/tree_exp.h:667 2 locks held by syz-executor.5/11594: #0: 00000000708fbcaf (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000708fbcaf (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000708fbcaf (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 00000000a5029534 (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 2 locks held by syz-executor.5/11617: #0: 0000000045704489 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 0000000045704489 (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 00000000708fbcaf (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 00000000708fbcaf (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 00000000708fbcaf (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by syz-executor.0/14714: #0: 00000000f34df4d3 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000f34df4d3 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000f34df4d3 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 000000007c3aabc9 (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 2 locks held by syz-executor.0/14763: #0: 0000000032fb85cc (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 0000000032fb85cc (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 00000000f34df4d3 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 00000000f34df4d3 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 00000000f34df4d3 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by syz-executor.4/18901: #0: 00000000309df91a (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000309df91a (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000309df91a (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 000000002138d2aa (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 2 locks held by syz-executor.4/18922: #0: 0000000070d02150 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 0000000070d02150 (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 00000000309df91a (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 00000000309df91a (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 00000000309df91a (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.4/21886: #0: 0000000091eb0ae8 (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 0000000091eb0ae8 (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 1 lock held by syz-executor.4/21896: #0: 0000000091eb0ae8 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 0000000091eb0ae8 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 0000000091eb0ae8 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by syz-executor.4/21853: #0: 0000000091eb0ae8 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 0000000091eb0ae8 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 0000000091eb0ae8 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 00000000544a2113 (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 1 lock held by syz-executor.0/21900: #0: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.0/21901: #0: 0000000034d94df1 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 0000000034d94df1 (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.0/21904: #0: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by syz-executor.0/21863: #0: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 000000003011038b (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 000000004b81dc4d (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 1 lock held by syz-executor.1/21907: #0: 000000002bfb6f1a (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 000000002bfb6f1a (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 1 lock held by syz-executor.1/21909: #0: 000000002bfb6f1a (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 000000002bfb6f1a (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 000000002bfb6f1a (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.5/21915: #0: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.5/21916: #0: 000000003689b421 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 000000003689b421 (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.5/21922: #0: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by syz-executor.5/21892: #0: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000b385ddb4 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 00000000be5447fb (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 2 locks held by syz-executor.1/21894: #0: 000000002bfb6f1a (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 000000002bfb6f1a (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 000000002bfb6f1a (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 00000000790bf7ac (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 1048 Comm: khungtaskd Not tainted 4.19.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x123/0x177 lib/dump_stack.c:118 nmi_cpu_backtrace.cold.4+0x3e/0x76 lib/nmi_backtrace.c:101 nmi_trigger_cpumask_backtrace+0xe6/0x11a lib/nmi_backtrace.c:62 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline] watchdog+0x5c3/0xb40 kernel/hung_task.c:287 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 3396 Comm: systemd-udevd Not tainted 4.19.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:_vm_normal_page+0x161/0x4f0 mm/memory.c:837 Code: c3 48 89 c2 a8 01 4c 89 f7 48 f7 d2 48 0f 44 c2 48 c1 ef 03 48 ba 00 00 00 00 00 fc ff df 48 c1 e0 0c 48 c1 e8 18 80 3c 17 00 <0f> 85 20 02 00 00 4d 8b 74 24 c0 41 f7 c6 00 02 00 00 75 25 48 39 RSP: 0018:ffff8881dbb5f938 EFLAGS: 00000246 RAX: 00000000001ce765 RBX: 1ffff1103b76bf2a RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 000055d94b309000 RDI: 1ffff1103b76bf2e RBP: ffff8881dbb5f9d8 R08: 1ffffffff1055d17 R09: fffff94000e73b26 R10: fffff94000e73b26 R11: ffffea000739d933 R12: ffff8881dbb5f9b0 R13: ffff8881db746318 R14: ffff8881dbb5f970 R15: 0000000000000000 FS: 00007fdd32ed28c0(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fff9d03a5d7 CR3: 00000001db69c001 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: copy_one_pte mm/memory.c:1050 [inline] copy_pte_range mm/memory.c:1114 [inline] copy_pmd_range mm/memory.c:1165 [inline] copy_pud_range mm/memory.c:1199 [inline] copy_p4d_range mm/memory.c:1221 [inline] copy_page_range+0x9c9/0x1950 mm/memory.c:1283 dup_mmap kernel/fork.c:549 [inline] dup_mm kernel/fork.c:1288 [inline] copy_mm kernel/fork.c:1344 [inline] copy_process.part.34+0x39b7/0x7690 kernel/fork.c:1916 copy_process kernel/fork.c:1722 [inline] _do_fork+0x16a/0xcb0 kernel/fork.c:2228 __do_sys_clone kernel/fork.c:2335 [inline] __se_sys_clone kernel/fork.c:2329 [inline] __x64_sys_clone+0xba/0x140 kernel/fork.c:2329 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fdd31d2238b Code: db 45 85 f6 0f 85 95 01 00 00 64 4c 8b 04 25 10 00 00 00 31 d2 4d 8d 90 d0 02 00 00 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 de 00 00 00 85 c0 41 89 c5 0f 85 e5 00 00 RSP: 002b:00007fff9d03c090 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007fff9d03c090 RCX: 00007fdd31d2238b RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 00007fff9d03c0e0 R08: 00007fdd32ed28c0 R09: 0000000000000210 R10: 00007fdd32ed2b90 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000020 R14: 0000000000000000 R15: 0000000000000000