syzbot


upstream boot error: INFO: task hung in add_early_randomness

Status: fixed on 2023/02/24 13:50
Subsystems: crypto
[Documentation on labels]
Reported-by: syzbot+760e6f85822d8b6bc5ae@syzkaller.appspotmail.com
Fix commit: 228432551bd8 virtio-rng: make device ready before making request
First crash: 918d, last: 910d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] upstream boot error: INFO: task hung in add_early_randomness 1 (2) 2022/06/10 08:32

Sample crash report:
INFO: task swapper/0:1 blocked for more than 143 seconds.
      Not tainted 5.19.0-rc1-syzkaller-00267-g0678afa6055d #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:swapper/0       state:D stack:23888 pid:    1 ppid:     0 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5116 [inline]
 __schedule+0xa00/0x4b30 kernel/sched/core.c:6428
 schedule+0xd2/0x1f0 kernel/sched/core.c:6500
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6559
 __mutex_lock_common kernel/locking/mutex.c:679 [inline]
 __mutex_lock+0xa70/0x1350 kernel/locking/mutex.c:747
 add_early_randomness+0x1a/0x170 drivers/char/hw_random/core.c:69
 hwrng_register+0x399/0x510 drivers/char/hw_random/core.c:599
 virtrng_scan+0x37/0x90 drivers/char/hw_random/virtio-rng.c:205
 virtio_dev_probe+0x639/0x910 drivers/virtio/virtio.c:312
 call_driver_probe drivers/base/dd.c:555 [inline]
 really_probe+0x23e/0xb90 drivers/base/dd.c:634
 __driver_probe_device+0x338/0x4d0 drivers/base/dd.c:764
 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:794
 __driver_attach+0x22d/0x550 drivers/base/dd.c:1163
 bus_for_each_dev+0x147/0x1d0 drivers/base/bus.c:301
 bus_add_driver+0x422/0x640 drivers/base/bus.c:618
 driver_register+0x220/0x3a0 drivers/base/driver.c:240
 do_one_initcall+0x103/0x650 init/main.c:1295
 do_initcall_level init/main.c:1368 [inline]
 do_initcalls init/main.c:1384 [inline]
 do_basic_setup init/main.c:1403 [inline]
 kernel_init_freeable+0x6b1/0x73a init/main.c:1610
 kernel_init+0x1a/0x1d0 init/main.c:1499
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302
 </TASK>

Showing all locks held in the system:
2 locks held by swapper/0/1:
 #0: ffff888044418170 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:835 [inline]
 #0: ffff888044418170 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1054 [inline]
 #0: ffff888044418170 (&dev->mutex){....}-{3:3}, at: __driver_attach+0x222/0x550 drivers/base/dd.c:1162
 #1: ffffffff8c829f48 (reading_mutex){+.+.}-{3:3}, at: add_early_randomness+0x1a/0x170 drivers/char/hw_random/core.c:69
1 lock held by khungtaskd/41:
 #0: ffffffff8bd83ce0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6491
2 locks held by kworker/u17:4/73:
 #0: ffff888011875138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888011875138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff888011875138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline]
 #0: ffff888011875138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:636 [inline]
 #0: ffff888011875138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:663 [inline]
 #0: ffff888011875138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x87a/0x1610 kernel/workqueue.c:2260
 #1: ffffc90000d07da8 ((work_completion)(&(&kfence_timer)->work)){+.+.}-{0:0}, at: process_one_work+0x8ae/0x1610 kernel/workqueue.c:2264
1 lock held by hwrng/791:
 #0: ffffffff8c829f48 (reading_mutex){+.+.}-{3:3}, at: hwrng_fillfn+0x141/0x370 drivers/char/hw_random/core.c:503

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


Crashes (125):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/06/11 21:40 upstream 0678afa6055d 0d5abf15 .config console log report ci-qemu-upstream upstream boot error: INFO: task hung in add_early_randomness
2022/06/11 19:36 upstream 1c27f1fc1549 0d5abf15 .config console log report ci-upstream-kasan-gce upstream boot error: INFO: task hung in add_early_randomness
2022/06/11 19:02 upstream 1c27f1fc1549 0d5abf15 .config console log report ci-upstream-kasan-gce-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/11 14:38 upstream 0885eacdc81f 0d5abf15 .config console log report ci-upstream-kasan-gce upstream boot error: INFO: task hung in add_early_randomness
2022/06/11 08:09 upstream 0885eacdc81f 0d5abf15 .config console log report ci-upstream-kasan-gce upstream boot error: INFO: task hung in add_early_randomness
2022/06/11 01:53 upstream 0885eacdc81f 0d5abf15 .config console log report ci-upstream-kasan-gce-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/10 19:00 upstream fe43c0188911 0d5abf15 .config console log report ci-upstream-kasan-gce-selinux-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/10 02:23 upstream 874c8ca1e60b 0d5abf15 .config console log report ci-upstream-kasan-gce-selinux-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/10 02:07 upstream 874c8ca1e60b 0d5abf15 .config console log report ci-upstream-kasan-gce upstream boot error: INFO: task hung in add_early_randomness
2022/06/09 20:57 upstream 3d9f55c57bc3 0d5abf15 .config console log report ci-upstream-kasan-gce-selinux-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/09 19:49 upstream 95fc76c81b92 0d5abf15 .config console log report ci-qemu-upstream upstream boot error: INFO: task hung in add_early_randomness
2022/06/09 07:50 upstream 6bfb56e93bce 0d5abf15 .config console log report ci-qemu-upstream upstream boot error: INFO: task hung in add_early_randomness
2022/06/09 06:00 upstream 6bfb56e93bce 0d5abf15 .config console log report ci-upstream-kasan-gce-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/08 20:43 upstream 6bfb56e93bce b2706118 .config console log report ci-upstream-kasan-gce-selinux-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/08 16:57 upstream 34f4335c16a5 b2706118 .config console log report ci-qemu-upstream upstream boot error: INFO: task hung in add_early_randomness
2022/06/08 01:48 upstream 9886142c7a22 b2706118 .config console log report ci-qemu-upstream upstream boot error: INFO: task hung in add_early_randomness
2022/06/08 00:00 upstream 9886142c7a22 b2706118 .config console log report ci-upstream-kasan-gce-selinux-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/07 23:34 upstream 9886142c7a22 c8857892 .config console log report ci-upstream-kasan-gce-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/07 12:19 upstream e71e60cd74df b2706118 .config console log report ci-qemu-upstream upstream boot error: INFO: task hung in add_early_randomness
2022/06/07 10:43 upstream e71e60cd74df c8857892 .config console log report ci-upstream-kasan-gce-selinux-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/07 01:24 upstream e71e60cd74df c8857892 .config console log report ci-upstream-kasan-gce-selinux-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 13:04 upstream f2906aa86338 c8857892 .config console log report ci-upstream-kasan-gce upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 05:49 upstream f2906aa86338 c8857892 .config console log report ci-upstream-kasan-gce-selinux-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 05:09 upstream f2906aa86338 c8857892 .config console log report ci-upstream-kasan-gce upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 05:09 upstream f2906aa86338 c8857892 .config console log report ci-upstream-kasan-gce upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 05:09 upstream f2906aa86338 c8857892 .config console log report ci-upstream-kasan-gce upstream boot error: INFO: task hung in add_early_randomness
2022/06/05 17:56 upstream 44688ffd111a c8857892 .config console log report ci-upstream-kasan-gce-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/05 15:49 upstream 952923ddc011 c8857892 .config console log report ci-upstream-kasan-gce upstream boot error: INFO: task hung in add_early_randomness
2022/06/05 03:52 upstream 952923ddc011 c8857892 .config console log report ci-upstream-kasan-gce-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/05 03:21 upstream d0e60d46bc03 c8857892 .config console log report ci-upstream-kasan-gce-selinux-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/05 02:47 upstream d0e60d46bc03 c8857892 .config console log report ci-upstream-kasan-gce-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/05 02:47 upstream d0e60d46bc03 c8857892 .config console log report ci-upstream-kasan-gce-root upstream boot error: INFO: task hung in add_early_randomness
2022/06/04 04:06 upstream 032dcf09e2bf c8857892 .config console log report ci-upstream-kasan-gce upstream boot error: INFO: task hung in add_early_randomness
2022/06/11 00:36 upstream a32e7ea36235 0d5abf15 .config console log report ci-qemu2-arm64-compat upstream boot error: INFO: task hung in add_early_randomness
2022/06/10 12:04 upstream 874c8ca1e60b 0d5abf15 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/10 07:27 upstream 874c8ca1e60b 0d5abf15 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/09 15:21 upstream 6bfb56e93bce 0d5abf15 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/09 05:38 upstream 6bfb56e93bce 0d5abf15 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/08 14:38 upstream 9886142c7a22 b2706118 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/07 22:25 upstream 9886142c7a22 c8857892 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/07 02:48 upstream e71e60cd74df c8857892 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 07:12 upstream f2906aa86338 c8857892 .config console log report ci-qemu-upstream-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 07:12 upstream f2906aa86338 c8857892 .config console log report ci-qemu-upstream-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 07:12 upstream f2906aa86338 c8857892 .config console log report ci-qemu-upstream-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 06:09 upstream f2906aa86338 c8857892 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 06:09 upstream f2906aa86338 c8857892 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 06:09 upstream f2906aa86338 c8857892 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/06 01:56 upstream f2906aa86338 c8857892 .config console log report ci-qemu2-arm64-compat upstream boot error: INFO: task hung in add_early_randomness
2022/06/05 17:39 upstream 44688ffd111a c8857892 .config console log report ci-qemu-upstream-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/05 16:49 upstream 952923ddc011 c8857892 .config console log report ci-upstream-kasan-gce-386 upstream boot error: INFO: task hung in add_early_randomness
2022/06/03 20:18 upstream 9be4cbd09da8 c8857892 .config console log report ci-qemu-upstream-386 upstream boot error: INFO: task hung in add_early_randomness
* Struck through repros no longer work on HEAD.