syzbot


INFO: task hung in set_current_rng

Status: fixed on 2022/03/08 16:11
Subsystems: crypto usb
[Documentation on labels]
Reported-by: syzbot+681da20be7291be15dca@syzkaller.appspotmail.com
Fix commit: 2bb31abdbe55 hwrng: virtio - don't wait on cleanup
First crash: 1026d, last: 904d
Cause bisection: introduced by (bisect log) [ignored commit]:
commit f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10
Author: Andrey Konovalov <andreyknvl@google.com>
Date: Mon Feb 24 16:13:03 2020 +0000

  usb: gadget: add raw-gadget interface

Crash: INFO: task hung in hwrng_register (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 2bb31abdbe55742c89f4dc0cc26fcbc8467364f6
Author: Laurent Vivier <lvivier@redhat.com>
Date: Thu Oct 28 10:11:09 2021 +0000

  hwrng: virtio - don't wait on cleanup

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] INFO: task hung in set_current_rng 1 (3) 2021/12/04 09:30
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2021/12/01 22:42 4h00m bisect fix upstream job log (1)
2021/11/01 21:59 36m bisect fix upstream job log (0) log
2021/10/02 21:33 26m bisect fix upstream job log (0) log
2021/09/02 21:07 25m bisect fix upstream job log (0) log
2021/08/02 12:34 25m bisect fix upstream job log (0) log

Sample crash report:
INFO: task kworker/1:0:20 blocked for more than 143 seconds.
      Tainted: G        W         5.13.0-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:0     state:D stack:22328 pid:   20 ppid:     2 flags:0x00004000
Workqueue: usb_hub_wq hub_event
Call Trace:
 context_switch kernel/sched/core.c:4683 [inline]
 __schedule+0xc07/0x11f0 kernel/sched/core.c:5940
 schedule+0x14b/0x210 kernel/sched/core.c:6019
 schedule_timeout+0x98/0x2f0 kernel/time/timer.c:1868
 do_wait_for_common+0x2da/0x480 kernel/sched/completion.c:85
 __wait_for_common kernel/sched/completion.c:106 [inline]
 wait_for_common kernel/sched/completion.c:117 [inline]
 wait_for_completion+0x48/0x60 kernel/sched/completion.c:138
 cleanup_rng drivers/char/hw_random/core.c:81 [inline]
 kref_put include/linux/kref.h:65 [inline]
 drop_current_rng drivers/char/hw_random/core.c:109 [inline]
 set_current_rng+0x421/0x610 drivers/char/hw_random/core.c:96
 hwrng_register+0x38f/0x720 drivers/char/hw_random/core.c:499
 chaoskey_probe+0x755/0xb30 drivers/usb/misc/chaoskey.c:205
 usb_probe_interface+0x633/0xb40 drivers/usb/core/driver.c:396
 really_probe+0x3cb/0x1020 drivers/base/dd.c:580
 driver_probe_device+0x175/0x340 drivers/base/dd.c:763
 bus_for_each_drv+0x16a/0x1f0 drivers/base/bus.c:431
 __device_attach+0x301/0x560 drivers/base/dd.c:938
 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:491
 device_add+0x11fc/0x1670 drivers/base/core.c:3324
 usb_set_configuration+0x1a86/0x2100 drivers/usb/core/message.c:2164
 usb_generic_driver_probe+0x83/0x140 drivers/usb/core/generic.c:238
 usb_probe_device+0x13a/0x260 drivers/usb/core/driver.c:293
 really_probe+0x3cb/0x1020 drivers/base/dd.c:580
 driver_probe_device+0x175/0x340 drivers/base/dd.c:763
 bus_for_each_drv+0x16a/0x1f0 drivers/base/bus.c:431
 __device_attach+0x301/0x560 drivers/base/dd.c:938
 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:491
 device_add+0x11fc/0x1670 drivers/base/core.c:3324
 usb_new_device+0xd45/0x1790 drivers/usb/core/hub.c:2558
 hub_port_connect+0x1055/0x27a0 drivers/usb/core/hub.c:5278
 hub_port_connect_change+0x5d0/0xbf0 drivers/usb/core/hub.c:5418
 port_event+0xaee/0x1140 drivers/usb/core/hub.c:5564
 hub_event+0x48d/0xd80 drivers/usb/core/hub.c:5646
 process_one_work+0x833/0x10c0 kernel/workqueue.c:2276
 worker_thread+0xac1/0x1320 kernel/workqueue.c:2422
 kthread+0x453/0x480 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
INFO: lockdep is turned off.
NMI backtrace for cpu 0
CPU: 0 PID: 1638 Comm: khungtaskd Tainted: G        W         5.13.0-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_lvl+0x1d3/0x29f lib/dump_stack.c:96
 nmi_cpu_backtrace+0x16c/0x190 lib/nmi_backtrace.c:105
 nmi_trigger_cpumask_backtrace+0x191/0x2f0 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+0xd06/0xd50 kernel/hung_task.c:294
 kthread+0x453/0x480 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 4857 Comm: systemd-journal Tainted: G        W         5.13.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__seccomp_filter+0x551/0x1f90 kernel/seccomp.c:1208
Code: 80 3c 28 00 74 08 48 89 df e8 eb 6e 48 00 4c 89 33 4c 89 e7 4c 8b 74 24 38 e9 bf 10 00 00 81 fb 00 00 f0 7f 0f 84 3c 02 00 00 <81> fb 00 00 fc 7f 0f 85 c5 03 00 00 8b 1d 6d 31 75 0b 89 de 83 e6
RSP: 0018:ffffc9000af4fbc0 EFLAGS: 00000206
RAX: 0000000000000000 RBX: 000000007fff0000 RCX: 0000000000000003
RDX: 0000000000000006 RSI: ffffffff8cf558e0 RDI: 000000007fff0000
RBP: ffffc9000af4fee8 R08: 0000000000000005 R09: ffffffff81802512
R10: 0000000000000006 R11: ffff888017249c40 R12: ffffc9000af4fdc0
R13: dffffc0000000000 R14: 0000000000000000 R15: ffffc9000af4fde0
FS:  00007fb81e94f8c0(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb81bd45018 CR3: 00000000163fa000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 syscall_trace_enter kernel/entry/common.c:68 [inline]
 __syscall_enter_from_user_work kernel/entry/common.c:90 [inline]
 syscall_enter_from_user_mode+0xf0/0x1b0 kernel/entry/common.c:108
 do_syscall_64+0x1e/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fb81dbe7f17
Code: ff ff ff 48 8b 4d a0 0f b7 51 fe 48 8b 4d a8 66 89 54 08 fe e9 1a ff ff ff 66 2e 0f 1f 84 00 00 00 00 00 b8 27 00 00 00 0f 05 <c3> 0f 1f 84 00 00 00 00 00 b8 6e 00 00 00 0f 05 c3 0f 1f 84 00 00
RSP: 002b:00007ffce70946e8 EFLAGS: 00000202 ORIG_RAX: 0000000000000027
RAX: ffffffffffffffda RBX: 00005601e1e091e0 RCX: 00007fb81dbe7f17
RDX: 0000000000000000 RSI: 00007ffce7094800 RDI: 00005601e1e091e0
RBP: 00007ffce7094800 R08: 82fc88903cbe97aa R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000202 R12: 00000000000012f9
R13: 00007ffce70947a8 R14: 00007ffce7094800 R15: 00007ffce7094d98

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/03 00:53 upstream 3dbdb38e2869 55aa55c2 .config console log report syz C ci-upstream-kasan-gce-smack-root INFO: task hung in set_current_rng
* Struck through repros no longer work on HEAD.