bisecting fixing commit since fb0155a09b0224a7147cb07a4ce6034c8d29667f building syzkaller on 1b88c6d5c8477f1d4fb3b389443b200acc32e9a8 testing commit fb0155a09b0224a7147cb07a4ce6034c8d29667f with gcc (GCC) 8.1.0 kernel signature: d4eb72b5eab2125693d379506626ef1f391b4be87520d7ac9a0c8bef0e496ea1 all runs: crashed: INFO: task hung in nbd_ioctl testing current HEAD 5c8fe583cce542aa0b84adc939ce85293de36e5e testing commit 5c8fe583cce542aa0b84adc939ce85293de36e5e with gcc (GCC) 8.1.0 kernel signature: b771cdfe70aca814877f1d0673ab32a917076f74217c726e01a09065e658f90d run #0: crashed: INFO: task hung in nbd_ioctl run #1: crashed: INFO: task hung in nbd_ioctl 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 seems to be flaky Reproducer flagged being flaky revisions tested: 2, total time: 27m5.995172959s (build: 10m10.175699189s, test: 16m10.273408822s) the crash still happens on HEAD commit msg: Linux 5.11-rc1 crash: INFO: task hung in nbd_ioctl INFO: task syz-executor.0:26885 blocked for more than 143 seconds. Not tainted 5.11.0-rc1-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.0 state:D stack:14312 pid:26885 ppid: 6181 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:4313 [inline] __schedule+0x429/0x9e0 kernel/sched/core.c:5064 schedule+0x38/0xe0 kernel/sched/core.c:5143 schedule_timeout+0x275/0x360 kernel/time/timer.c:1854 do_wait_for_common kernel/sched/completion.c:85 [inline] __wait_for_common kernel/sched/completion.c:106 [inline] wait_for_common kernel/sched/completion.c:117 [inline] wait_for_completion+0xae/0x110 kernel/sched/completion.c:138 flush_workqueue+0x1d6/0x590 kernel/workqueue.c:2838 nbd_start_device_ioctl drivers/block/nbd.c:1324 [inline] __nbd_ioctl drivers/block/nbd.c:1385 [inline] nbd_ioctl+0x1c2/0x300 drivers/block/nbd.c:1425 blkdev_ioctl+0x1b7/0x2a0 block/ioctl.c:576 block_ioctl+0x3a/0x40 fs/block_dev.c:1648 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x7c/0xb0 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45dd99 RSP: 002b:00007feb4c3bcc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000012e80 RCX: 000000000045dd99 RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000003 RBP: 000000000118c000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bfd4 R13: 00007ffd21c8d79f R14: 00007feb4c3bd9c0 R15: 000000000118bfd4 Showing all locks held in the system: 1 lock held by khungtaskd/1160: #0: ffffffff84a13060 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x15/0x1a6 kernel/locking/lockdep.c:6255 2 locks held by in:imklog/5799: #0: ffff888100c9eef0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x45/0x50 fs/file.c:949 #1: ffff888237c2de58 (&rq->lock){-.-.}-{2:2}, at: rq_lock kernel/sched/sched.h:1319 [inline] #1: ffff888237c2de58 (&rq->lock){-.-.}-{2:2}, at: __schedule+0x151/0x9e0 kernel/sched/core.c:4981 2 locks held by kworker/u5:1/6191: #0: ffff8881165f0138 ((wq_completion)knbd0-recv){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:615 [inline] #0: ffff8881165f0138 ((wq_completion)knbd0-recv){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:643 [inline] #0: ffff8881165f0138 ((wq_completion)knbd0-recv){+.+.}-{0:0}, at: process_one_work+0x207/0x610 kernel/workqueue.c:2246 #1: ffffc90000277e70 ((work_completion)(&args->work)){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:615 [inline] #1: ffffc90000277e70 ((work_completion)(&args->work)){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:643 [inline] #1: ffffc90000277e70 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x207/0x610 kernel/workqueue.c:2246 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 1160 Comm: khungtaskd Not tainted 5.11.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0xa3/0xc8 lib/dump_stack.c:120 nmi_cpu_backtrace.cold.8+0x68/0x82 lib/nmi_backtrace.c:105 nmi_trigger_cpumask_backtrace+0xd5/0xf0 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:209 [inline] watchdog+0x5f1/0x6f0 kernel/hung_task.c:294 kthread+0x145/0x170 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 5800 Comm: rs:main Q:Reg Not tainted 5.11.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0033:0x556111056700 Code: 0f 85 85 fc ff ff 48 8b b3 e0 00 00 00 48 8b 7b 38 ff 15 c3 72 24 00 85 c0 89 c5 0f 85 6a fc ff ff e9 0e ff ff ff 0f 1f 40 00 <41> 57 41 56 41 89 d7 41 55 41 54 55 53 48 83 ec 48 48 8b 1f 48 89 RSP: 002b:00007fb6cfffeaf8 EFLAGS: 00000246 RAX: 0000556111a65360 RBX: 0000556111a6b0b0 RCX: 0000556111056700 RDX: 000000000000000c RSI: 00007fb6c801a070 RDI: 00007fb6c8002220 RBP: 0000556111a65220 R08: 0000556111a65360 R09: 0000000000000000 R10: 0000556111297280 R11: 0000000000000000 R12: 000055611129ebec R13: 0000000000000000 R14: 0000556111a65360 R15: 0000000000000000 FS: 00007fb6cffff700 GS: 0000000000000000