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: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK testing current HEAD b08918fb3f27d1843152986e6bc79ec723dba8cc testing commit b08918fb3f27d1843152986e6bc79ec723dba8cc 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: crashed: INFO: task hung in do_exit 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: 34m46.380197529s (build: 12m25.624668323s, test: 20m47.028369743s) the crash still happens on HEAD crash: INFO: task hung in do_exit INFO: task syz-executor.5:15521 blocked for more than 143 seconds. Not tainted 5.3.0+ #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D28176 15521 7325 0x80004000 Call Trace: context_switch kernel/sched/core.c:3384 [inline] __schedule+0x734/0x16d0 kernel/sched/core.c:4056 schedule+0xc0/0x260 kernel/sched/core.c:4123 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:513 [inline] do_exit+0x3b2/0x2c10 kernel/exit.c:866 do_group_exit+0xf4/0x2e0 kernel/exit.c:983 __do_sys_exit_group kernel/exit.c:994 [inline] __se_sys_exit_group kernel/exit.c:992 [inline] __x64_sys_exit_group+0x39/0x40 kernel/exit.c:992 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:00007ffcbbacc4a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 000000000000001e RCX: 0000000000458c29 RDX: 00000000004129e1 RSI: fffffffffffffff7 RDI: 0000000000000000 RBP: 0000000000000000 R08: 000000000003b8f7 R09: 00007ffcbbacc500 R10: 000000000003b8f7 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffcbbacc500 R14: 0000000000000000 R15: 00007ffcbbacc510 INFO: task syz-executor.5:15524 blocked for more than 143 seconds. Not tainted 5.3.0+ #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D28112 15524 7325 0x80004000 Call Trace: context_switch kernel/sched/core.c:3384 [inline] __schedule+0x734/0x16d0 kernel/sched/core.c:4056 schedule+0xc0/0x260 kernel/sched/core.c:4123 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:513 [inline] do_exit+0x3b2/0x2c10 kernel/exit.c:866 do_group_exit+0xf4/0x2e0 kernel/exit.c:983 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:00007f726488bcf8 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: 00007ffcbbacc2af R14: 00007f726488c9c0 R15: 000000000073bf0c Showing all locks held in the system: 1 lock held by khungtaskd/1056: #0: ffffffff883a4600 (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:5337 1 lock held by rsyslogd/7117: #0: ffff88808fc60660 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xa3/0xc0 fs/file.c:801 2 locks held by getty/7206: #0: ffff888099ab8090 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f052e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 2 locks held by getty/7207: #0: ffff888084438290 (&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/7208: #0: ffff88807cb05310 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f152e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 2 locks held by getty/7209: #0: ffff888084439390 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f1d2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 2 locks held by getty/7210: #0: ffff888084438b10 (&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/7211: #0: ffff8880987873d0 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005f212e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 2 locks held by getty/7212: #0: ffff88809003ed90 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:340 #1: ffffc90005ef12e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x1ee/0x1930 drivers/tty/n_tty.c:2156 1 lock held by syz-executor.5/15521: #0: ffff888088399190 (&mm->mmap_sem#2){++++}, at: exit_mm kernel/exit.c:513 [inline] #0: ffff888088399190 (&mm->mmap_sem#2){++++}, at: do_exit+0x3b2/0x2c10 kernel/exit.c:866 1 lock held by syz-executor.5/15524: #0: ffff888088399190 (&mm->mmap_sem#2){++++}, at: exit_mm kernel/exit.c:513 [inline] #0: ffff888088399190 (&mm->mmap_sem#2){++++}, at: do_exit+0x3b2/0x2c10 kernel/exit.c:866 1 lock held by syz-executor.5/15534: ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 1056 Comm: khungtaskd Not tainted 5.3.0+ #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: 21 Comm: kworker/u4:1 Not tainted 5.3.0+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: bat_events batadv_nc_worker RIP: 0010:hlock_class kernel/locking/lockdep.c:163 [inline] RIP: 0010:__lock_acquire+0x13a4/0x4ee0 kernel/locking/lockdep.c:3951 Code: ff 66 81 e3 ff 1f 0f b7 db be 08 00 00 00 48 89 d8 48 c1 f8 06 48 8d 3c c5 60 79 a5 89 e8 c4 9d 49 00 48 0f a3 1d 6c 4d 54 08 <4c> 8b 95 70 ff ff ff 4c 8b 9d 30 ff ff ff 0f 83 d7 07 00 00 48 69 RSP: 0018:ffff8880a9a3fb60 EFLAGS: 00000047 RAX: 0000000000000001 RBX: 0000000000000699 RCX: ffffffff81512bec RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff89a57a30 RBP: ffff8880a9a3fc80 R08: fffffbfff134af47 R09: fffffbfff134af47 R10: fffffbfff134af46 R11: ffffffff89a57a37 R12: 0000000029a2560a R13: b696fcae0c0b59ad R14: ffffffff88fa9030 R15: 1a93918cb56546c1 FS: 0000000000000000(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffff600400 CR3: 0000000081cd0000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lock_acquire+0x194/0x410 kernel/locking/lockdep.c:4487 rcu_lock_acquire include/linux/rcupdate.h:208 [inline] rcu_read_lock include/linux/rcupdate.h:599 [inline] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:407 [inline] batadv_nc_worker+0xec/0x630 net/batman-adv/network-coding.c:718 process_one_work+0x85b/0x1640 kernel/workqueue.c:2269 worker_thread+0x85/0xb60 kernel/workqueue.c:2415 kthread+0x334/0x3f0 kernel/kthread.c:255 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352