panic: timeout_add: to_ticks (-973078528) < 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *166013 11278 0 0 0x4000000 1K syz-executor.1 216267 86829 0 0x2 0x480 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 timeout_add(ffff80000066d060,c6000000) at timeout_add+0x194 sys/kern/kern_timeout.c:190 pcppi_bell(ffff80000066d000,200,c6000000,1) at pcppi_bell+0x2a0 sys/dev/isa/pcppi.c:234 spkrioctl(1b00,20005302,ffff800020c3d490,46,ffff800020b432d8) at spkrioctl+0x230 tone sys/dev/isa/spkr.c:89 [inline] spkrioctl(1b00,20005302,ffff800020c3d490,46,ffff800020b432d8) at spkrioctl+0x230 sys/dev/isa/spkr.c:503 VOP_IOCTL(fffffd80763718f8,20005302,ffff800020c3d490,46,fffffd807f7c78a0,ffff800020b432d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067156b68,20005302,ffff800020c3d490,ffff800020b432d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b432d8,ffff800020c3d5d8,ffff800020c3d5c0) at sys_ioctl+0x646 syscall(ffff800020c3d670) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c3d670) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff88,0,3,4866542d010) at Xsyscall+0x128 end of kernel end trace frame: 0x488fad2bc10, count: 5 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic timeout_add: to_ticks (-973078528) < 0 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 timeout_add(ffff80000066d060,c6000000) at timeout_add+0x194 sys/kern/kern_timeout.c:190 pcppi_bell(ffff80000066d000,200,c6000000,1) at pcppi_bell+0x2a0 sys/dev/isa/pcppi.c:234 spkrioctl(1b00,20005302,ffff800020c3d490,46,ffff800020b432d8) at spkrioctl+0x230 tone sys/dev/isa/spkr.c:89 [inline] spkrioctl(1b00,20005302,ffff800020c3d490,46,ffff800020b432d8) at spkrioctl+0x230 sys/dev/isa/spkr.c:503 VOP_IOCTL(fffffd80763718f8,20005302,ffff800020c3d490,46,fffffd807f7c78a0,ffff800020b432d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067156b68,20005302,ffff800020c3d490,ffff800020b432d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b432d8,ffff800020c3d5d8,ffff800020c3d5c0) at sys_ioctl+0x646 syscall(ffff800020c3d670) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c3d670) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff88,0,3,4866542d010) at Xsyscall+0x128 end of kernel end trace frame: 0x488fad2bc10, count: -10 ddb{1}> show registers rdi 0xffffffff813edb17 db_enter+0x17 rsi 0x169a __ALIGN_SIZE+0x69a rbp 0xffff800020c3d0b0 rbx 0xffff800020c3d160 rdx 0x169b __ALIGN_SIZE+0x69b rcx 0xffff800002b49000 rax 0xffff800002b49000 r8 0xffffffff81b8cb23 kprintf+0x183 r9 0x1 r10 0x25 r11 0x995c753176dc7f47 r12 0x3000000008 r13 0xffff800020c3d0c0 r14 0x100 r15 0x1 rip 0xffffffff813edb18 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c3d0a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=166013 stat=onproc flags process=0 proc=4000000 pri=21, usrpri=54, nice=20 forw=0xffffffffffffffff, list=0xffff800020b42018,0xffffffff82353d48 process=0xffff800020b44d30 user=0xffff800020c38000, vmspace=0xfffffd807effe9d8 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 11278 111275 33888 0 2 0 syz-executor.1 *11278 166013 33888 0 7 0x4000000 syz-executor.1 78980 494256 86829 0 2 0 syz-executor.0 78980 443794 86829 0 2 0x4000000 syz-executor.0 97714 382825 0 0 3 0x14200 bored sosplice 33888 69960 4603 0 2 0x482 syz-executor.1 86829 216267 4603 0 7 0x482 syz-executor.0 4603 12755 91048 0 3 0x82 thrsleep syz-fuzzer 4603 131014 91048 0 3 0x4000082 thrsleep syz-fuzzer 4603 212831 91048 0 3 0x4000082 thrsleep syz-fuzzer 4603 316138 91048 0 3 0x4000082 kqread syz-fuzzer 4603 468613 91048 0 3 0x4000082 thrsleep syz-fuzzer 4603 479935 91048 0 3 0x4000082 thrsleep syz-fuzzer 4603 201375 91048 0 3 0x4000082 thrsleep syz-fuzzer 4603 514365 91048 0 3 0x4000082 thrsleep syz-fuzzer 4603 243246 91048 0 3 0x4000082 thrsleep syz-fuzzer 4603 181953 91048 0 3 0x4000082 thrsleep syz-fuzzer 91048 480328 60424 0 3 0x10008a pause ksh 60424 305816 94063 0 3 0x92 select sshd 35126 270877 1 0 3 0x100083 ttyin getty 94063 333078 1 0 3 0x80 select sshd 22315 247127 38301 73 3 0x100090 kqread syslogd 38301 456737 1 0 3 0x100082 netio syslogd 5844 501974 1 77 3 0x100090 poll dhclient 75579 271938 1 0 3 0x80 poll dhclient 1024 168244 0 0 2 0x14200 zerothread 7142 496750 0 0 3 0x14200 aiodoned aiodoned 27107 56884 0 0 3 0x14200 syncer update 22374 281161 0 0 3 0x14200 cleaner cleaner 73059 181159 0 0 3 0x14200 reaper reaper 51535 200683 0 0 3 0x14200 pgdaemon pagedaemon 31293 28094 0 0 3 0x14200 bored crynlk 63808 285315 0 0 3 0x14200 bored crypto 88888 384209 0 0 3 0x40014200 acpi0 acpi0 72832 287297 0 0 3 0x40014200 idle1 98323 333367 0 0 3 0x14200 bored softnet 69369 311879 0 0 3 0x14200 bored systqmp 63131 285607 0 0 3 0x14200 bored systq 15273 515233 0 0 3 0x40014200 bored softclock 93744 310970 0 0 3 0x40014200 idle0 1 272919 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 11278 (syz-executor.1) thread 0xffff800020b432d8 (166013) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8234cf80) locked @ /syzkaller/managers/multicore/kernel/sys/kern/sched_bsd.c:436 #0 witness_lock+0x58a sys/kern/subr_witness.c:1205 #1 ___mp_acquire_count+0x67 sys/kern/kern_lock.c:231 #2 mi_switch+0x3b0 sys/kern/sched_bsd.c:436 #3 sleep_finish+0x110 sys/kern/kern_synch.c:312 #4 sleep_finish_all+0x34 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] #4 sleep_finish_all+0x34 sys/kern/kern_synch.c:157 #5 tsleep+0x1bc #6 spkrioctl+0x261 rest sys/dev/isa/spkr.c:106 [inline] #6 spkrioctl+0x261 sys/dev/isa/spkr.c:501 #7 VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 #8 vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 #9 sys_ioctl+0x646 #10 syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] #10 syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 #11 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9499 6350K 6370K 78643K 10756 0 0 pcb 23 9K 10K 78643K 303 0 0 rtable 100 3K 4K 78643K 250 0 0 ifaddr 49 12K 12K 78643K 96 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 16 0 0 iov 0 0K 12K 78643K 52 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 76K 78643K 1535 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 9 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 103 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 6 17K 25K 78643K 532 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 42 38K 58K 78643K 338 0 0 subproc 64 65538K 67586K 78643K 72 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 56 0 0 in_multi 33 2K 2K 78643K 55 0 0 ether_multi 1 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 202 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 87 20K 22K 78643K 2447 0 0 UVM aobj 54 2K 2K 78643K 56 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 32 0 0 NDP 9 0K 0K 78643K 25 0 0 temp 137 2363K 2431K 78643K 4170 0 0 kqueue 0 0K 0K 78643K 4 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 4 0 0 1 0 1 1 0 8 0 inpcbpl 280 260 0 253 1 0 1 1 0 8 0 plimitpl 152 19 0 12 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 90 0 86 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 10 0 10 5 4 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 185 0 0 12 0 12 12 0 8 0 art_table 32 186 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 2 1 0 1 1 0 8 0 semapl 112 101 0 91 1 0 1 1 0 8 0 shmpl 112 54 0 2 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2429 0 1019 46 0 46 46 0 8 0 ffsino 272 2429 0 1019 95 0 95 95 0 8 0 nchpl 144 3389 0 1762 61 0 61 61 0 8 0 uvmvnodes 72 2524 0 0 46 0 46 46 0 8 0 vnodes 200 2524 0 0 133 0 133 133 0 8 0 namei 1024 9424 0 9424 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 8031 0 8031 7 6 1 6 0 8 1 sigapl 432 700 0 686 2 0 2 2 0 8 0 futexpl 56 8006 0 8006 1 0 1 1 0 8 1 knotepl 112 183 0 156 4 2 2 2 0 8 1 kqueuepl 104 154 0 152 1 0 1 1 0 8 0 pipepl 112 488 0 469 3 2 1 2 0 8 0 fdescpl 488 701 0 686 3 1 2 3 0 8 0 filepl 152 4216 0 4118 11 6 5 6 0 8 1 lockfpl 104 183 0 183 4 3 1 1 0 8 1 lockfspl 32 290 0 290 4 3 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 26 0 16 1 0 1 1 0 8 0 ucredpl 96 1144 0 1137 1 0 1 1 0 8 0 zombiepl 144 686 0 686 2 1 1 1 0 8 1 processpl 840 716 0 686 4 0 4 4 0 8 0 procpl 600 1859 0 1818 4 0 4 4 0 8 0 sosppl 128 7 0 7 4 3 1 1 0 8 1 sockpl 384 512 0 495 4 1 3 3 0 8 1 mcl64k 65536 10 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 108 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 173 0 0 9 0 9 9 0 8 0 bufpl 256 5906 0 1013 306 0 306 306 0 8 0 anonpl 16 65451 0 57389 51 16 35 49 0 125 1 amapchunkpl 152 3538 0 3438 5 0 5 5 0 158 0 amappl16 192 2638 0 2218 35 13 22 33 0 8 1 amappl15 184 255 0 251 1 0 1 1 0 8 0 amappl14 176 260 0 256 2 1 1 1 0 8 0 amappl13 168 25 0 22 1 0 1 1 0 8 0 amappl12 160 273 0 270 2 1 1 1 0 8 0 amappl11 152 178 0 169 1 0 1 1 0 8 0 amappl10 144 60 0 58 2 1 1 1 0 8 0 amappl9 136 338 0 335 1 0 1 1 0 8 0 amappl8 128 137 0 117 1 0 1 1 0 8 0 amappl7 120 38 0 33 1 0 1 1 0 8 0 amappl6 112 55 0 49 1 0 1 1 0 8 0 amappl5 104 411 0 397 1 0 1 1 0 8 0 amappl4 96 270 0 246 2 1 1 2 0 8 0 amappl3 88 412 0 403 1 0 1 1 0 8 0 amappl2 80 5768 0 5706 2 0 2 2 0 8 0 amappl1 72 23391 0 22960 24 14 10 19 0 8 0 amappl 72 2066 0 2029 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 55 0 2 1 0 1 1 0 8 0 uaddrrnd 24 701 0 686 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 701 0 686 1 0 1 1 0 8 0 vmmpekpl 168 9777 0 9756 2 0 2 2 0 8 0 vmmpepl 168 79513 0 78067 95 30 65 75 0 357 2 vmsppl 360 700 0 686 2 0 2 2 0 8 0 pdppl 4096 1410 0 1372 6 1 5 6 0 8 0 pvpl 32 214315 0 203177 144 40 104 127 0 265 14 pmappl 224 700 0 686 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 455 0 4 13 0 13 13 0 8 0