syzbot


INFO: task hung in nbd_ioctl
Status: fixed on 2019/12/28 10:32
Reported-by: syzbot+51611e87a7e4efdbbee2@syzkaller.appspotmail.com
Fix commit: 4df728651b8a nbd: verify socket is supported during setup
First crash: 950d, last: 876d

Fix bisection: fixed by (bisect log) :
commit 4df728651b8a99693c69962d8e5a5b9e5a3bbcc7
Author: Mike Christie <mchristi@redhat.com>
Date: Thu Oct 17 21:27:34 2019 +0000

  nbd: verify socket is supported during setup

similar bugs (6):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 INFO: task hung in nbd_ioctl (2) C done 16 623d 868d 1/1 fixed on 2020/10/21 11:01
upstream INFO: task hung in nbd_ioctl (2) 37 631d 683d 17/22 fixed on 2020/09/25 01:17
upstream INFO: task hung in nbd_ioctl C done 71 928d 963d 14/22 fixed on 2019/11/06 12:39
linux-4.19 INFO: task hung in nbd_ioctl C error 66 33d 951d 0/1 upstream: reported C repro on 2019/10/12 13:11
upstream INFO: task hung in nbd_ioctl (3) C done unreliable 18 3d01h 600d 0/22 upstream: reported C repro on 2020/09/28 07:17
linux-4.14 INFO: task hung in nbd_ioctl (3) C 12 2d22h 554d 0/1 upstream: reported C repro on 2020/11/13 07:37

Sample crash report:
audit: type=1400 audit(1572849182.575:37): avc:  denied  { map } for  pid=7214 comm="syz-executor632" path="/root/syz-executor632114600" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
block nbd0: shutting down sockets
INFO: task syz-executor632:7215 blocked for more than 140 seconds.
      Not tainted 4.14.151 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor632 D28048  7215   7214 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2807 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3383
 schedule+0x92/0x1c0 kernel/sched/core.c:3427
 schedule_timeout+0x93b/0xe10 kernel/time/timer.c:1723
 do_wait_for_common kernel/sched/completion.c:91 [inline]
 __wait_for_common kernel/sched/completion.c:112 [inline]
 wait_for_common kernel/sched/completion.c:123 [inline]
 wait_for_completion+0x27c/0x420 kernel/sched/completion.c:144
 flush_workqueue+0x3d1/0x1400 kernel/workqueue.c:2668
 nbd_start_device_ioctl drivers/block/nbd.c:1212 [inline]
 __nbd_ioctl drivers/block/nbd.c:1283 [inline]
 nbd_ioctl+0x9c4/0xb30 drivers/block/nbd.c:1323
 __blkdev_driver_ioctl block/ioctl.c:297 [inline]
 blkdev_ioctl+0x96b/0x1860 block/ioctl.c:594
 block_ioctl+0xde/0x120 fs/block_dev.c:1881
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4452d9
RSP: 002b:00007ffc2d301548 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004452d9
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000005
RBP: 0000000000000000 R08: 00000000004025b0 R09: 00000000004025b0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402520
R13: 00000000004025b0 R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
1 lock held by khungtaskd/1015:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff814875a8>] debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4544
2 locks held by kworker/u5:0/1145:
 #0:  ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf8ee>] work_static include/linux/workqueue.h:199 [inline]
 #0:  ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf8ee>] set_work_data kernel/workqueue.c:619 [inline]
 #0:  ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf8ee>] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
 #0:  ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf8ee>] process_one_work+0x76e/0x1600 kernel/workqueue.c:2085
 #1:  ((&args->work)){+.+.}, at: [<ffffffff813cf92b>] process_one_work+0x7ab/0x1600 kernel/workqueue.c:2089
1 lock held by rsyslogd/6736:
 #0:  (&f->f_pos_lock){+.+.}, at: [<ffffffff8194517b>] __fdget_pos+0xab/0xd0 fs/file.c:769
2 locks held by getty/6858:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6859:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6860:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6861:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6862:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6863:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6864:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 1015 Comm: khungtaskd Not tainted 4.14.151 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x138/0x197 lib/dump_stack.c:53
 nmi_cpu_backtrace.cold+0x57/0x94 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x141/0x189 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:140 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
 watchdog+0x5e7/0xb90 kernel/hung_task.c:274
 kthread+0x319/0x430 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at pc 0xffffffff861c3b5e

Crashes (18):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2019/11/04 06:48 linux-4.14.y ddef1e8e3f6e b35fad31 .config log report syz C
ci2-linux-4-14 2019/10/29 12:56 linux-4.14.y ddef1e8e3f6e 5ea87a66 .config log report syz C
ci2-linux-4-14 2019/12/26 19:32 linux-4.14.y e1f7d50ae3a3 be5c2c81 .config log report
ci2-linux-4-14 2019/11/25 15:07 linux-4.14.y 43598c571e7e 598ca6c8 .config log report
ci2-linux-4-14 2019/11/02 13:48 linux-4.14.y ddef1e8e3f6e 997ccc67 .config log report
ci2-linux-4-14 2019/10/30 17:59 linux-4.14.y ddef1e8e3f6e 5ea87a66 .config log report
ci2-linux-4-14 2019/10/28 08:57 linux-4.14.y b98aebd29824 25bb509e .config log report
ci2-linux-4-14 2019/10/28 00:23 linux-4.14.y b98aebd29824 25bb509e .config log report
ci2-linux-4-14 2019/10/27 07:16 linux-4.14.y b98aebd29824 25bb509e .config log report
ci2-linux-4-14 2019/10/24 22:08 linux-4.14.y b98aebd29824 d01bb02a .config log report
ci2-linux-4-14 2019/10/20 17:27 linux-4.14.y b98aebd29824 8c88c9c1 .config log report
ci2-linux-4-14 2019/10/18 10:13 linux-4.14.y b98aebd29824 8c88c9c1 .config log report
ci2-linux-4-14 2019/10/18 08:31 linux-4.14.y b98aebd29824 8c88c9c1 .config log report
ci2-linux-4-14 2019/10/16 03:35 linux-4.14.y e132c8d7b58d d4ea592f .config log report
ci2-linux-4-14 2019/10/15 09:03 linux-4.14.y e132c8d7b58d 05ad7292 .config log report
ci2-linux-4-14 2019/10/15 05:20 linux-4.14.y e132c8d7b58d 05ad7292 .config log report
ci2-linux-4-14 2019/10/14 17:07 linux-4.14.y e132c8d7b58d a6aef847 .config log report
ci2-linux-4-14 2019/10/13 22:27 linux-4.14.y e132c8d7b58d 2f661ec4 .config log report