panic: timeout_add: to_ticks (-2) < 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 36270 33456 0 0 0x4000000 0K syz-executor.0 176996 20523 0 0 0 1 syz-executor.1 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,fffffffe) at timeout_add+0x194 sys/kern/kern_timeout.c:190 pcppi_bell(ffff80000066d000,ffff253a,fffffffe,1) at pcppi_bell+0x2a0 sys/dev/isa/pcppi.c:234 spkrioctl(1b00,20005302,ffff800020c27440,2,ffff800020b424c8) at spkrioctl+0x230 tone sys/dev/isa/spkr.c:89 [inline] spkrioctl(1b00,20005302,ffff800020c27440,2,ffff800020b424c8) at spkrioctl+0x230 sys/dev/isa/spkr.c:503 VOP_IOCTL(fffffd80714b1c28,20005302,ffff800020c27440,2,fffffd807f7c7900,ffff800020b424c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80682cf610,20005302,ffff800020c27440,ffff800020b424c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b424c8,ffff800020c27588,ffff800020c27570) at sys_ioctl+0x646 syscall(ffff800020c27620) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c27620) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff88,0,3,3ede2b67010) at Xsyscall+0x128 end of kernel end trace frame: 0x3f08d222bc0, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic timeout_add: to_ticks (-2) < 0 ddb{0}> trace db_enter() at db_enter+24 panic() at panic+372 timeout_add(ffff80000066d060,fffffffe) at timeout_add+404 pcppi_bell(ffff80000066d000,ffff253a,fffffffe,1) at pcppi_bell+672 spkrioctl(1b00,20005302,ffff800020c27440,2,ffff800020b424c8) at spkrioctl+560 VOP_IOCTL(fffffd80714b1c28,20005302,ffff800020c27440,2,fffffd807f7c7900,ffff800020b424c8) at VOP_IOCTL+154 vn_ioctl(fffffd80682cf610,20005302,ffff800020c27440,ffff800020b424c8) at vn_ioctl+201 sys_ioctl(ffff800020b424c8,ffff800020c27588,ffff800020c27570) at sys_ioctl+1606 syscall(ffff800020c27620) at syscall+1452 Xsyscall(6,0,ffffffffffffff88,0,3,3ede2b67010) at Xsyscall+296 end of kernel end trace frame: 0x3f08d222bc0, count: -10 ddb{0}> show registers rdi 18446744071587636919 db_enter+23 rsi 3522 rbp 18446603336770809952 rbx 18446603336770810128 rdx 3523 rcx 18446603336230924288 rax 18446603336230924288 r8 18446744071580452035 kprintf+387 r9 1 r10 37 r11 10420675577731058285 r12 206158430216 r13 18446603336770809968 r14 256 r15 1 rip 18446744071587636920 db_enter+24 cs 8 rflags 582 rsp 18446603336770809936 ss 16 db_enter+24: addq $8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=36270 stat=onproc flags process=0 proc=4000000 pri=66, usrpri=66, nice=20 forw=0xffffffffffffffff, list=0xffff800020b42018,0xffff800020b432e8 process=0xffff800020b45078 user=0xffff800020c22000, vmspace=0xfffffd807efff438 estcpu=32, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 33456 26800 76961 0 2 0 syz-executor.0 *33456 36270 76961 0 7 0x4000000 syz-executor.0 20523 176996 1196 0 7 0 syz-executor.1 20523 238637 1196 0 3 0x4000080 fifor syz-executor.1 20523 460794 1196 0 2 0x4000000 syz-executor.1 1196 274878 10380 0 3 0x82 nanosleep syz-executor.1 76961 261979 10380 0 3 0x82 nanosleep syz-executor.0 10380 392176 86016 0 3 0x82 thrsleep syz-fuzzer 10380 210325 86016 0 3 0x4000082 thrsleep syz-fuzzer 10380 448598 86016 0 3 0x4000082 thrsleep syz-fuzzer 10380 131324 86016 0 3 0x4000082 kqread syz-fuzzer 10380 255016 86016 0 3 0x4000082 thrsleep syz-fuzzer 10380 518605 86016 0 3 0x4000082 thrsleep syz-fuzzer 10380 365531 86016 0 3 0x4000082 thrsleep syz-fuzzer 10380 229364 86016 0 3 0x4000082 thrsleep syz-fuzzer 10380 470547 86016 0 3 0x4000082 thrsleep syz-fuzzer 10380 196086 86016 0 3 0x4000082 thrsleep syz-fuzzer 86016 346752 52784 0 3 0x10008a pause ksh 52784 99627 96351 0 3 0x92 select sshd 52428 140812 1 0 3 0x100083 ttyin getty 96351 492931 1 0 3 0x80 select sshd 3627 189123 27272 73 3 0x100090 kqread syslogd 27272 401811 1 0 3 0x100082 netio syslogd 98828 495367 1 77 3 0x100090 poll dhclient 32993 235811 1 0 3 0x80 poll dhclient 77342 200456 0 0 2 0x14200 zerothread 34084 204246 0 0 3 0x14200 aiodoned aiodoned 82493 356882 0 0 3 0x14200 syncer update 24595 503494 0 0 3 0x14200 cleaner cleaner 52438 475722 0 0 3 0x14200 reaper reaper 15771 242690 0 0 3 0x14200 pgdaemon pagedaemon 56378 202718 0 0 3 0x14200 bored crynlk 65439 505495 0 0 3 0x14200 bored crypto 91956 518810 0 0 3 0x40014200 acpi0 acpi0 47727 271009 0 0 3 0x40014200 idle1 6142 483022 0 0 3 0x14200 bored softnet 97744 172860 0 0 3 0x14200 bored systqmp 2312 49902 0 0 3 0x14200 bored systq 41350 361025 0 0 3 0x40014200 bored softclock 77208 434832 0 0 3 0x40014200 idle0 1 320093 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 33456 (syz-executor.0) thread 0xffff800020b424c8 (36270) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823220c8) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+1418 #1 syscall+1151 #2 Xsyscall+296 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9474 6327K 6334K 78643K 10594 0 0 pcb 25 9K 9K 78643K 97 0 0 rtable 97 3K 3K 78643K 183 0 0 ifaddr 41 10K 10K 78643K 48 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 15 0 0 iov 0 0K 12K 78643K 10 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1207 76K 76K 78643K 1267 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 5 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 8 0K 0K 78643K 12 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 6 17K 25K 78643K 97 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 41 38K 70K 78643K 253 0 0 subproc 64 65538K 67586K 78643K 68 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 9 0 0 in_multi 33 2K 2K 78643K 39 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 165 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 75 20K 20K 78643K 1025 0 0 UVM aobj 18 2K 2K 78643K 18 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 2 0 0 NDP 7 0K 0K 78643K 13 0 0 temp 107 2355K 2422K 78643K 3019 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> 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 61 0 53 1 0 1 1 0 8 0 plimitpl 152 14 0 7 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 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 544 19 0 14 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 186 0 0 12 0 12 12 0 8 0 art_table 32 187 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 6 1 0 1 1 0 8 0 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 10 0 4 1 0 1 1 0 8 0 shmpl 112 16 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1598 0 190 46 0 46 46 0 8 0 ffsino 272 1598 0 190 95 0 95 95 0 8 0 nchpl 144 1943 0 319 61 0 61 61 0 8 0 uvmvnodes 72 1651 0 0 31 0 31 31 0 8 0 vnodes 200 1651 0 0 87 0 87 87 0 8 0 namei 1024 4882 0 4882 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 4569 0 4569 8 7 1 6 0 8 1 sigapl 432 265 0 251 2 0 2 2 0 8 0 futexpl 56 968 0 968 1 0 1 1 0 8 1 knotepl 112 73 0 46 2 0 2 2 0 8 1 kqueuepl 104 22 0 20 1 0 1 1 0 8 0 pipepl 112 190 0 171 2 1 1 1 0 8 0 fdescpl 488 266 0 251 3 0 3 3 0 8 1 filepl 152 1453 0 1357 6 1 5 5 0 8 1 lockfpl 104 22 0 21 2 1 1 1 0 8 0 lockfspl 32 10 0 9 2 1 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 210 0 203 1 0 1 1 0 8 0 zombiepl 144 251 0 251 2 1 1 1 0 8 1 processpl 840 280 0 251 4 0 4 4 0 8 0 procpl 600 472 0 431 4 0 4 4 0 8 0 sockpl 384 135 0 115 3 0 3 3 0 8 1 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 2 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 104 0 0 12 0 12 12 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 122 0 0 8 0 8 8 0 8 0 bufpl 256 5317 0 1016 269 0 269 269 0 8 0 anonpl 16 31309 0 24221 32 1 31 31 0 125 2 amapchunkpl 152 1166 0 1077 5 0 5 5 0 158 0 amappl16 192 801 0 437 20 0 20 20 0 8 1 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 12 0 8 2 1 1 1 0 8 0 amappl13 168 61 0 56 1 0 1 1 0 8 0 amappl12 160 12 0 11 1 0 1 1 0 8 0 amappl11 152 223 0 213 1 0 1 1 0 8 0 amappl10 144 63 0 58 1 0 1 1 0 8 0 amappl9 136 395 0 390 1 0 1 1 0 8 0 amappl8 128 129 0 114 1 0 1 1 0 8 0 amappl7 120 71 0 65 1 0 1 1 0 8 0 amappl6 112 53 0 46 1 0 1 1 0 8 0 amappl5 104 121 0 110 1 0 1 1 0 8 0 amappl4 96 268 0 243 2 1 1 2 0 8 0 amappl3 88 134 0 127 1 0 1 1 0 8 0 amappl2 80 1414 0 1351 2 0 2 2 0 8 0 amappl1 72 13982 0 13551 24 11 13 19 0 8 3 amappl 72 669 0 634 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 17 0 0 1 0 1 1 0 8 0 uaddrrnd 24 266 0 251 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 266 0 251 1 0 1 1 0 8 0 vmmpekpl 168 5961 0 5940 2 0 2 2 0 8 0 vmmpepl 168 34893 0 33502 86 17 69 71 0 357 8 vmsppl 360 265 0 251 2 0 2 2 0 8 0 pdppl 4096 540 0 502 6 0 6 6 0 8 1 pvpl 32 120134 0 110027 100 9 91 96 0 265 9 pmappl 224 265 0 251 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 413 0 3 12 0 12 12 0 8 0