bisecting fixing commit since 8ee15f3248660f85102a47410079d408615723d4 building syzkaller on c402d8f1aa5d2fdc219d2155fa467fb7f02321a5 testing commit 8ee15f3248660f85102a47410079d408615723d4 with gcc (GCC) 8.1.0 run #0: crashed: INFO: task hung in do_exit run #1: crashed: INFO: task hung in do_exit run #2: crashed: INFO: task hung in do_exit run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK testing current HEAD 320000e72ec0613e164ce9608d865396fb2da278 testing commit 320000e72ec0613e164ce9608d865396fb2da278 with gcc (GCC) 8.1.0 run #0: crashed: INFO: task hung in do_exit run #1: crashed: INFO: task hung in do_exit run #2: crashed: INFO: task hung in do_exit run #3: OK run #4: crashed: INFO: task hung in do_exit run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK revisions tested: 2, total time: 33m47.659074808s (build: 12m31.69148036s, test: 19m47.419574004s) the crash still happens on HEAD crash: INFO: task hung in do_exit INFO: task syz-executor.0:31157 blocked for more than 143 seconds. Not tainted 5.4.0-rc5+ #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D28176 31157 7335 0x80000000 Call Trace: context_switch kernel/sched/core.c:3384 [inline] __schedule+0x8ca/0x19f0 kernel/sched/core.c:4069 schedule+0xc0/0x260 kernel/sched/core.c:4136 rwsem_down_read_slowpath+0x568/0xfd0 kernel/locking/rwsem.c:1102 __down_read kernel/locking/rwsem.c:1344 [inline] down_read+0x1f5/0x430 kernel/locking/rwsem.c:1497 exit_mm kernel/exit.c:451 [inline] do_exit+0x3a6/0x2c70 kernel/exit.c:804 do_group_exit+0xf4/0x2e0 kernel/exit.c:921 __do_sys_exit_group kernel/exit.c:932 [inline] __se_sys_exit_group kernel/exit.c:930 [inline] __x64_sys_exit_group+0x39/0x40 kernel/exit.c:930 do_syscall_64+0xd0/0x5e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458c29 Code: Bad RIP value. RSP: 002b:00007ffcd3fa4188 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 000000000000001e RCX: 0000000000458c29 RDX: 00000000004129e1 RSI: fffffffffffffff7 RDI: 0000000000000000 RBP: 0000000000000000 R08: 000000000004a00a R09: 00007ffcd3fa41e0 R10: 000000000004a00a R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffcd3fa41e0 R14: 0000000000000000 R15: 00007ffcd3fa41f0 INFO: task syz-executor.0:31158 blocked for more than 143 seconds. Not tainted 5.4.0-rc5+ #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D28112 31158 7335 0x80004000 Call Trace: context_switch kernel/sched/core.c:3384 [inline] __schedule+0x8ca/0x19f0 kernel/sched/core.c:4069 schedule+0xc0/0x260 kernel/sched/core.c:4136 rwsem_down_read_slowpath+0x568/0xfd0 kernel/locking/rwsem.c:1102 __down_read kernel/locking/rwsem.c:1344 [inline] down_read+0x1f5/0x430 kernel/locking/rwsem.c:1497 exit_mm kernel/exit.c:451 [inline] do_exit+0x3a6/0x2c70 kernel/exit.c:804 do_group_exit+0xf4/0x2e0 kernel/exit.c:921 get_signal+0x36c/0x1d50 kernel/signal.c:2734 do_signal+0x87/0x1710 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x114/0x210 arch/x86/entry/common.c:159 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x4f4/0x5e0 arch/x86/entry/common.c:300 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458c29 Code: Bad RIP value. RSP: 002b:00007fc16a694cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000073bf08 RCX: 0000000000458c29 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000073bf08 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000073bf0c R13: 00007ffcd3fa3f8f R14: 00007fc16a6959c0 R15: 000000000073bf0c Showing all locks held in the system: 1 lock held by khungtaskd/1057: #0: ffffffff883a45c0 (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:5337 1 lock held by rsyslogd/7133: #0: ffff8880a96e9b20 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xa3/0xc0 fs/file.c:801 2 locks held by getty/7223: #0: ffff888099c5e090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f352e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 2 locks held by getty/7224: #0: ffff8880a97b7090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f252e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 2 locks held by getty/7225: #0: ffff88809ef49090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f292e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 2 locks held by getty/7226: #0: ffff8880a4565090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f312e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 2 locks held by getty/7227: #0: ffff888096682090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f192e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 2 locks held by getty/7228: #0: ffff88809541b090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f392e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 2 locks held by getty/7229: #0: ffff88808a757090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f012e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 1 lock held by syz-executor.0/31157: #0: ffff8880a8db18d8 (&mm->mmap_sem#2){++++}, at: exit_mm kernel/exit.c:451 [inline] #0: ffff8880a8db18d8 (&mm->mmap_sem#2){++++}, at: do_exit+0x3a6/0x2c70 kernel/exit.c:804 1 lock held by syz-executor.0/31158: #0: ffff8880a8db18d8 (&mm->mmap_sem#2){++++}, at: exit_mm kernel/exit.c:451 [inline] #0: ffff8880a8db18d8 (&mm->mmap_sem#2){++++}, at: do_exit+0x3a6/0x2c70 kernel/exit.c:804 2 locks held by syz-executor.0/31169: ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 1057 Comm: khungtaskd Not tainted 5.4.0-rc5+ #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+0x113/0x167 lib/dump_stack.c:113 nmi_cpu_backtrace.cold.7+0x4b/0x84 lib/nmi_backtrace.c:101 nmi_trigger_cpumask_backtrace+0x18b/0x1b7 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:205 [inline] watchdog+0x592/0xb70 kernel/hung_task.c:289 kthread+0x334/0x3f0 kernel/kthread.c:255 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 31169 Comm: syz-executor.0 Not tainted 5.4.0-rc5+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:arch_local_save_flags+0x2e/0x40 arch/x86/include/asm/paravirt.h:751 Code: ca 32 88 55 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 89 e5 48 c1 ea 03 80 3c 02 00 75 15 48 83 3d 2e 09 eb 06 00 74 09 9c 58 <0f> 1f 44 00 00 5d c3 0f 0b e8 84 24 54 00 eb e4 66 90 55 48 89 e5 RSP: 0018:ffff88809717f878 EFLAGS: 00000282 RAX: 0000000000000282 RBX: 0000000000000000 RCX: ffff888088482c58 RDX: 1ffffffff1065943 RSI: ffffffff883a4540 RDI: ffffffff8832ca18 RBP: ffff88809717f878 R08: ffffffff817efb9d R09: ffffed1012afa45f R10: ffff88809717fa98 R11: ffff8880957d22f7 R12: 0000000000000000 R13: ffffffff870af480 R14: 00000000000003a7 R15: ffff8880884823c0 FS: 00007fc16a674700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000d0b010 CR3: 000000008efd2000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ___might_sleep+0x16b/0x2b0 kernel/sched/core.c:6747 __might_sleep+0x95/0x190 kernel/sched/core.c:6733 __mutex_lock_common kernel/locking/mutex.c:935 [inline] __mutex_lock+0xcc/0x1410 kernel/locking/mutex.c:1103 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1118 perf_mmap+0x64d/0x17c0 kernel/events/core.c:5798 call_mmap include/linux/fs.h:1900 [inline] mmap_region+0x9bf/0x1480 mm/mmap.c:1806 do_mmap+0x61e/0xfc0 mm/mmap.c:1577 do_mmap_pgoff include/linux/mm.h:2353 [inline] vm_mmap_pgoff+0x195/0x210 mm/util.c:496 ksys_mmap_pgoff+0x3c7/0x650 mm/mmap.c:1629 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline] __x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0xd0/0x5e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458c29 Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fc16a673c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000000458c29 RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000000020ffd000 RBP: 000000000073bfa0 R08: 0000000000000003 R09: 0000000000000000 R10: 0000000000001011 R11: 0000000000000246 R12: 00007fc16a6746d4 R13: 00000000004c4bb0 R14: 00000000004d87f8 R15: 00000000ffffffff