syzbot


INFO: task hung in drop_current_rng

Status: fixed on 2023/09/28 03:03
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+bd0cbd9be58dd01b6a24@syzkaller.appspotmail.com
Fix commit: f5634d21541e hwrng: virtio - don't wait on cleanup
First crash: 620d, last: 487d
Fix bisection: fixed by (bisect log) :
commit f5634d21541efab5712c2e948b32cdc3c9f00752
Author: Laurent Vivier <lvivier@redhat.com>
Date: Thu Oct 28 10:11:09 2021 +0000

  hwrng: virtio - don't wait on cleanup

  
Bug presence (2)
Date Name Commit Repro Result
2023/05/08 linux-5.15.y (ToT) 8a7f2a5c5aa1 C [report] INFO: task hung in drop_current_rng
2023/05/08 upstream (ToT) ac9a78681b92 C Didn't crash

Sample crash report:
INFO: task kworker/1:1:37 blocked for more than 143 seconds.
      Not tainted 5.15.120-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:1     state:D stack:21408 pid:   37 ppid:     2 flags:0x00004000
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0x12c4/0x4590 kernel/sched/core.c:6372
 schedule+0x11b/0x1f0 kernel/sched/core.c:6455
 schedule_timeout+0xac/0x300 kernel/time/timer.c:1860
 do_wait_for_common+0x2d9/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:82 [inline]
 kref_put include/linux/kref.h:65 [inline]
 drop_current_rng+0x8b/0xf0 drivers/char/hw_random/core.c:110
 set_current_rng+0x3ad/0x530 drivers/char/hw_random/core.c:97
 hwrng_register+0x34a/0x4c0 drivers/char/hw_random/core.c:500
 chaoskey_probe+0x79d/0xb40 drivers/usb/misc/chaoskey.c:205
 usb_probe_interface+0x5c0/0xaf0 drivers/usb/core/driver.c:396
 really_probe+0x24e/0xb60 drivers/base/dd.c:595
 __driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
 driver_probe_device+0x50/0x420 drivers/base/dd.c:785
 __device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907
 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
 __device_attach+0x359/0x570 drivers/base/dd.c:979
 bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
 device_add+0xb48/0xfd0 drivers/base/core.c:3394
 usb_set_configuration+0x19dd/0x2020 drivers/usb/core/message.c:2170
 usb_generic_driver_probe+0x84/0x140 drivers/usb/core/generic.c:238
 usb_probe_device+0x130/0x260 drivers/usb/core/driver.c:293
 really_probe+0x24e/0xb60 drivers/base/dd.c:595
 __driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
 driver_probe_device+0x50/0x420 drivers/base/dd.c:785
 __device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907
 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
 __device_attach+0x359/0x570 drivers/base/dd.c:979
 bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
 device_add+0xb48/0xfd0 drivers/base/core.c:3394
 usb_new_device+0xc17/0x18d0 drivers/usb/core/hub.c:2568
 hub_port_connect drivers/usb/core/hub.c:5358 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5502 [inline]
 port_event drivers/usb/core/hub.c:5648 [inline]
 hub_event+0x2dd8/0x56d0 drivers/usb/core/hub.c:5730
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2307
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2454
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/26:
 #0: ffffffff8c91e6a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
6 locks held by kworker/1:1/37:
 #0: ffff888012b08538 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2280
 #1: ffffc900010dfd20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2282
 #2: ffff88814836d220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #2: ffff88814836d220 (&dev->mutex){....}-{3:3}, at: hub_event+0x207/0x56d0 drivers/usb/core/hub.c:5676
 #3: ffff888012df8220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #3: ffff888012df8220 (&dev->mutex){....}-{3:3}, at: __device_attach+0x8a/0x570 drivers/base/dd.c:954
 #4: ffff888012df91a8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #4: ffff888012df91a8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x8a/0x570 drivers/base/dd.c:954
 #5: ffffffff8cff66a8 (rng_mutex){+.+.}-{3:3}, at: hwrng_register+0xa9/0x4c0 drivers/char/hw_random/core.c:473
1 lock held by hwrng/901:
 #0: ffffffff8cff66a8 (rng_mutex){+.+.}-{3:3}, at: get_current_rng drivers/char/hw_random/core.c:127 [inline]
 #0: ffffffff8cff66a8 (rng_mutex){+.+.}-{3:3}, at: hwrng_fillfn+0x36/0x280 drivers/char/hw_random/core.c:433
2 locks held by getty/3257:
 #0: ffff888024719098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc900024bb2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1da0 drivers/tty/n_tty.c:2147

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

NMI backtrace for cpu 0
CPU: 0 PID: 26 Comm: khungtaskd Not tainted 5.15.120-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 1 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_safe_halt drivers/acpi/processor_idle.c:109 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:570

Crashes (307):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/22 20:00 linux-5.15.y d54cfc420586 27cbe77f .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/06/25 08:37 linux-5.15.y f67653019430 79782afc .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/03/19 14:51 linux-5.15.y 8020ae3c051d 7939252e .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/05/07 23:13 linux-5.15.y 8a7f2a5c5aa1 90c93c40 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/21 22:04 linux-5.15.y d54cfc420586 abdf9bae .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/21 18:24 linux-5.15.y d54cfc420586 abdf9bae .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/21 10:25 linux-5.15.y d54cfc420586 28847498 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/21 07:01 linux-5.15.y d54cfc420586 28847498 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/20 18:19 linux-5.15.y d54cfc420586 f49af159 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/20 17:23 linux-5.15.y d54cfc420586 f49af159 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/20 06:40 linux-5.15.y d54cfc420586 4547cdf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/20 02:54 linux-5.15.y d54cfc420586 4547cdf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/20 01:33 linux-5.15.y d54cfc420586 4547cdf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/19 23:40 linux-5.15.y d54cfc420586 4547cdf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/18 23:38 linux-5.15.y d54cfc420586 022df2bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/18 22:27 linux-5.15.y d54cfc420586 022df2bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/18 19:59 linux-5.15.y d54cfc420586 022df2bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/18 18:22 linux-5.15.y d54cfc420586 022df2bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/18 03:13 linux-5.15.y d54cfc420586 20f8b3c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/17 20:48 linux-5.15.y d54cfc420586 20f8b3c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/17 19:41 linux-5.15.y d54cfc420586 20f8b3c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/17 16:48 linux-5.15.y d54cfc420586 20f8b3c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/17 12:38 linux-5.15.y d54cfc420586 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/16 09:24 linux-5.15.y d54cfc420586 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/15 03:19 linux-5.15.y d54cfc420586 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/15 02:01 linux-5.15.y d54cfc420586 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/14 22:24 linux-5.15.y d54cfc420586 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/14 18:23 linux-5.15.y d54cfc420586 d624500f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/14 07:46 linux-5.15.y d54cfc420586 d624500f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/14 05:39 linux-5.15.y d54cfc420586 d624500f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/14 00:50 linux-5.15.y d54cfc420586 55eda22f .config console log report info ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/13 23:40 linux-5.15.y d54cfc420586 55eda22f .config console log report info ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/13 19:46 linux-5.15.y d54cfc420586 55eda22f .config console log report info ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/13 05:59 linux-5.15.y d54cfc420586 86081196 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/13 03:44 linux-5.15.y d54cfc420586 86081196 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/12 15:42 linux-5.15.y d54cfc420586 979d5fe2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/12 13:28 linux-5.15.y d54cfc420586 979d5fe2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/12 06:21 linux-5.15.y d54cfc420586 2f19aa4f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/11 16:14 linux-5.15.y d54cfc420586 2f19aa4f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/11 15:32 linux-5.15.y d54cfc420586 2f19aa4f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/11 08:12 linux-5.15.y d54cfc420586 52ae002a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/11 06:26 linux-5.15.y d54cfc420586 52ae002a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/11 05:08 linux-5.15.y d54cfc420586 52ae002a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/11 04:33 linux-5.15.y d54cfc420586 52ae002a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/10 22:11 linux-5.15.y d54cfc420586 d47e94ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/10 20:46 linux-5.15.y d54cfc420586 d47e94ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/10 18:38 linux-5.15.y d54cfc420586 d47e94ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/10 17:00 linux-5.15.y d54cfc420586 d47e94ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/10 15:22 linux-5.15.y d54cfc420586 d47e94ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/07/10 05:20 linux-5.15.y d54cfc420586 668cb1fa .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
2023/03/11 16:16 linux-5.15.y d214f240b0f6 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in drop_current_rng
* Struck through repros no longer work on HEAD.