syzbot


assert failed: to_ticks >= 0

Status: fixed on 2019/04/14 22:27
Reported-by: syzbot+662dbeb526303f458255@syzkaller.appspotmail.com
Fix commit: 797b68a5c224 Add more checks, if the values are negative we hit a KASSERT later in the timeout.
First crash: 2096d, last: 2047d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
netbsd assert failed: to_ticks >= 0 (2) C 70 1970d 2029d 1/3 fixed on 2019/08/25 05:45

Sample crash report:
[  43.4022425] panic: kernel diagnostic assertion "to_ticks >= 0" failed: file "/syzkaller/managers/netbsd/kernel/sys/kern/kern_timeout.c", line 335 
[  43.4022425] cpu0: Begin traceback...
[  43.4022425] vpanic() at netbsd:vpanic+0x214
[  43.4022425] _GLOBAL__sub_D_65535_0_cpu_configure() at netbsd:_GLOBAL__sub_D_65535_0_cpu_configure
[  43.4022425] callout_schedule_locked() at netbsd:callout_schedule_locked+0x25b
[  43.4022425] sleepq_block() at netbsd:sleepq_block+0x2e9
[  43.4022425] cv_timedwait_sig() at netbsd:cv_timedwait_sig+0x16f
[  43.4022425] sbwait() at netbsd:sbwait+0xa2
[  43.4022425] soreceive() at netbsd:soreceive+0x15b4
[  43.4022425] do_sys_recvmsg_so() at netbsd:do_sys_recvmsg_so+0x31f
[  43.4022425] do_sys_recvmsg() at netbsd:do_sys_recvmsg+0xaf
[  43.4022425] sys_recvfrom() at netbsd:sys_recvfrom+0x105
[  43.4022425] sys_syscall() at netbsd:sys_syscall+0xe2
[  43.4022425] syscall() at netbsd:syscall+0x30e
[  43.4022425] --- syscall (number 0) ---
[  43.4022425] 71d92443f4ca:
[  43.4022425] cpu0: End traceback...

[  43.4022425] dumping to dev 4,1 (offset=0, size=0): not possible
[  43.4022425] rebooting...
SeaBIOS (version 1.8.2-20190204_181744-google)
Total RAM Size = 0x00000001e0000000 = 7680 MiB
CPUs found: 2     Max CPUs supported: 2
found virtio-scsi at 0:3
virtio-scsi vendor='Google' product='PersistentDisk' rev='1' type=0 removable=0
virtio-scsi blksize=512 sectors=4194304 = 2048 MiB
drive 0x000f2a00: PCHS=0/0/0 translation=lba LCHS=520/128/63 s=4194304
Booting from Hard Disk 0...

>> NetBSD/x86 BIOS Boot, Revision 5.10 (Tue Jul 17 14:59:51 UTC 2018) (from NetBSD 8.0)
>> Memory: 639/3144640 k

     1. Boot normally
     2. Boot single user
     3. Disable ACPI
     4. Disable ACPI and SMP
     5. Drop to boot prompt
|/-\|/-39065424\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-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\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-+2877616\|/- [1062308\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/+1362984-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/+1044510-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-]=0x2b4fbe0
\|/-\|/-\|/-\|/-\|/-\|/-\|/-WARNING: couldn't open /var/db/entropy-file
WARNING: 1 module failed to load

Crashes (2547):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/02/27 22:45 netbsd 3b24b3419f4d 34ec456b console log report syz C ci2-netbsd
2019/02/25 09:07 netbsd 11eef5b2ee47 a70141bf console log report syz C ci2-netbsd
2019/02/24 20:46 netbsd 11eef5b2ee47 7a06e792 console log report syz ci2-netbsd
2019/04/14 21:44 netbsd b4c51847d3aa 505ab413 console log report ci2-netbsd
2019/04/14 19:36 netbsd b4c51847d3aa 505ab413 console log report ci2-netbsd
2019/04/14 18:35 netbsd b4c51847d3aa 505ab413 console log report ci2-netbsd
2019/04/14 17:03 netbsd b4c51847d3aa 505ab413 console log report ci2-netbsd
2019/04/14 15:40 netbsd b4c51847d3aa 505ab413 console log report ci2-netbsd
2019/04/14 14:33 netbsd b4c51847d3aa 505ab413 console log report ci2-netbsd
2019/04/14 12:44 netbsd b4c51847d3aa 505ab413 console log report ci2-netbsd
2019/04/14 10:53 netbsd b4c51847d3aa 505ab413 console log report ci2-netbsd
2019/04/14 09:20 netbsd b4c51847d3aa 505ab413 console log report ci2-netbsd
2019/04/14 08:09 netbsd ad415264b7d9 c402d8f1 console log report ci2-netbsd
2019/04/14 06:50 netbsd ad415264b7d9 c402d8f1 console log report ci2-netbsd
2019/04/14 05:18 netbsd ad415264b7d9 c402d8f1 console log report ci2-netbsd
2019/04/14 02:14 netbsd ad415264b7d9 c402d8f1 console log report ci2-netbsd
2019/04/13 23:49 netbsd ad415264b7d9 c402d8f1 console log report ci2-netbsd
2019/04/13 22:31 netbsd ad415264b7d9 c402d8f1 console log report ci2-netbsd
2019/04/13 21:11 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 20:11 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 19:04 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 17:53 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 15:42 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 14:07 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 12:42 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 12:02 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 10:58 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 09:41 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 08:01 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 05:56 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 04:53 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 03:26 netbsd def13e54a57f c402d8f1 console log report ci2-netbsd
2019/04/13 02:10 netbsd 1ed788060c36 4f421599 console log report ci2-netbsd
2019/04/13 00:47 netbsd 1ed788060c36 4f421599 console log report ci2-netbsd
2019/04/12 22:35 netbsd 1ed788060c36 4f421599 console log report ci2-netbsd
2019/04/12 20:55 netbsd 1ed788060c36 4f421599 console log report ci2-netbsd
2019/04/12 18:30 netbsd 1ed788060c36 4f421599 console log report ci2-netbsd
2019/04/12 15:33 netbsd 1ed788060c36 4f421599 console log report ci2-netbsd
2019/04/12 15:20 netbsd 1ed788060c36 4f421599 console log report ci2-netbsd
2019/04/12 14:18 netbsd 44afb383b252 8916f5e1 console log report ci2-netbsd
2019/04/12 12:57 netbsd 44afb383b252 8916f5e1 console log report ci2-netbsd
2019/04/12 11:33 netbsd 44afb383b252 8916f5e1 console log report ci2-netbsd
2019/04/12 08:55 netbsd 44afb383b252 8916f5e1 console log report ci2-netbsd
2019/04/12 07:30 netbsd 44afb383b252 8916f5e1 console log report ci2-netbsd
2019/04/12 06:25 netbsd 44afb383b252 8916f5e1 console log report ci2-netbsd
2019/04/12 03:36 netbsd 44afb383b252 8916f5e1 console log report ci2-netbsd
2019/04/12 01:21 netbsd 0710e7fbeb51 13030ef8 console log report ci2-netbsd
2019/02/24 19:51 netbsd 11eef5b2ee47 7a06e792 console log report ci2-netbsd
* Struck through repros no longer work on HEAD.