panic: timeout_add: to_ticks (-2) < 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 74438 96108 0 0 0 0 syz-executor.1 *137143 96108 0 0 0x4000000 1K 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,fffffffb,fffffffe,1) at pcppi_bell+0x2a0 sys/dev/isa/pcppi.c:234 spkrioctl(1b00,20005302,ffff800020c53be0,2,ffff800020b43788) at spkrioctl+0x230 tone sys/dev/isa/spkr.c:89 [inline] spkrioctl(1b00,20005302,ffff800020c53be0,2,ffff800020b43788) at spkrioctl+0x230 sys/dev/isa/spkr.c:503 VOP_IOCTL(fffffd80682c1480,20005302,ffff800020c53be0,2,fffffd807f7c7ae0,ffff800020b43788) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806932aa30,20005302,ffff800020c53be0,ffff800020b43788) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b43788,ffff800020c53d28,ffff800020c53d10) at sys_ioctl+0x646 syscall(ffff800020c53dc0) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c53dc0) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff88,0,3,2da2443a010) at Xsyscall+0x128 end of kernel end trace frame: 0x2dc9d5cc5c0, 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 (-2) < 0 ddb{1}> trace db_enter() at db_enter+24 panic() at panic+372 timeout_add(ffff80000066d060,fffffffe) at timeout_add+404 pcppi_bell(ffff80000066d000,fffffffb,fffffffe,1) at pcppi_bell+672 spkrioctl(1b00,20005302,ffff800020c53be0,2,ffff800020b43788) at spkrioctl+560 VOP_IOCTL(fffffd80682c1480,20005302,ffff800020c53be0,2,fffffd807f7c7ae0,ffff800020b43788) at VOP_IOCTL+154 vn_ioctl(fffffd806932aa30,20005302,ffff800020c53be0,ffff800020b43788) at vn_ioctl+201 sys_ioctl(ffff800020b43788,ffff800020c53d28,ffff800020c53d10) at sys_ioctl+1606 syscall(ffff800020c53dc0) at syscall+1452 Xsyscall(6,0,ffffffffffffff88,0,3,2da2443a010) at Xsyscall+296 end of kernel end trace frame: 0x2dc9d5cc5c0, count: -10 ddb{1}> show registers rdi 18446744071587636919 db_enter+23 rsi 3423 rbp 18446603336770992128 rbx 18446603336770992304 rdx 3424 rcx 18446603336266584064 rax 18446603336266584064 r8 18446744071580452035 kprintf+387 r9 1 r10 37 r11 18407446512615924551 r12 206158430216 r13 18446603336770992144 r14 256 r15 1 rip 18446744071587636920 db_enter+24 cs 8 rflags 582 rsp 18446603336770992112 ss 16 db_enter+24: addq $8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=137143 stat=onproc flags process=0 proc=4000000 pri=81, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800020b42720,0xffffffff8230d660 process=0xffff800020b44d30 user=0xffff800020c4e000, vmspace=0xfffffd807efff168 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 96108 74438 16931 0 7 0 syz-executor.1 *96108 137143 16931 0 7 0x4000000 syz-executor.1 37541 256841 12459 0 3 0x2 biowait syz-executor.0 52503 183212 0 0 3 0x14200 bored sosplice 16931 215209 12459 0 3 0x82 nanosleep syz-executor.1 12459 352090 69887 0 3 0x82 thrsleep syz-fuzzer 12459 76925 69887 0 3 0x4000082 nanosleep syz-fuzzer 12459 411039 69887 0 3 0x4000082 thrsleep syz-fuzzer 12459 87186 69887 0 3 0x4000082 thrsleep syz-fuzzer 12459 201219 69887 0 3 0x4000082 thrsleep syz-fuzzer 12459 354476 69887 0 3 0x4000082 kqread syz-fuzzer 12459 510370 69887 0 3 0x4000082 thrsleep syz-fuzzer 12459 174085 69887 0 3 0x4000082 thrsleep syz-fuzzer 12459 456785 69887 0 3 0x4000082 thrsleep syz-fuzzer 12459 63861 69887 0 3 0x4000082 thrsleep syz-fuzzer 12459 54514 69887 0 3 0x4000082 thrsleep syz-fuzzer 12459 450304 69887 0 3 0x4000082 thrsleep syz-fuzzer 69887 56837 45459 0 3 0x10008a pause ksh 45459 272362 25057 0 3 0x92 select sshd 94102 181743 1 0 3 0x100083 ttyin getty 25057 480562 1 0 3 0x80 select sshd 97515 477580 99481 73 3 0x100090 kqread syslogd 99481 296927 1 0 3 0x100082 netio syslogd 71709 417569 1 77 3 0x100090 poll dhclient 74342 325368 1 0 3 0x80 poll dhclient 5438 288833 0 0 3 0x14200 pgzero zerothread 14154 62334 0 0 3 0x14200 aiodoned aiodoned 31934 461189 0 0 3 0x14200 syncer update 60841 37138 0 0 3 0x14200 cleaner cleaner 56022 501295 0 0 3 0x14200 reaper reaper 60547 491384 0 0 3 0x14200 pgdaemon pagedaemon 74977 246870 0 0 3 0x14200 bored crynlk 86229 118433 0 0 3 0x14200 bored crypto 79422 221833 0 0 3 0x40014200 acpi0 acpi0 39252 123169 0 0 3 0x40014200 idle1 84104 293115 0 0 3 0x14200 bored softnet 25553 204586 0 0 3 0x14200 bored systqmp 36621 240395 0 0 3 0x14200 bored systq 1510 407366 0 0 3 0x40014200 bored softclock 30957 211395 0 0 3 0x40014200 idle0 1 402372 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 96108 (syz-executor.1) thread 0xffff800020b43788 (137143) 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 Process 37541 (syz-executor.0) thread 0xffff800020b43080 (256841) exclusive rrwlock inode r = 0 (0xfffffd806e469c50) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+1418 #1 _rw_enter+1101 #2 _rrw_enter+96 #3 VOP_LOCK+87 #4 vn_lock+110 #5 vget+440 #6 ufs_ihashget+337 #7 ffs_vget+132 #8 ufs_lookup+5532 #9 VOP_LOOKUP+103 #10 vfs_lookup+1366 #11 namei+1202 #12 dounlinkat+165 #13 syscall+1452 #14 Xsyscall+296 exclusive rrwlock inode r = 0 (0xfffffd806e90b5e8) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+1418 #1 _rw_enter+1101 #2 _rrw_enter+96 #3 VOP_LOCK+87 #4 vn_lock+110 #5 vfs_lookup+245 #6 namei+1202 #7 dounlinkat+165 #8 syscall+1452 #9 Xsyscall+296 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9512 6350K 6366K 78643K 10947 0 0 pcb 23 9K 10K 78643K 529 0 0 rtable 100 3K 4K 78643K 314 0 0 ifaddr 51 12K 13K 78643K 121 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 23 0 0 iov 0 0K 16K 78643K 80 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 76K 78643K 1860 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 13 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 99 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 5 13K 25K 78643K 1038 0 0 sigio 0 0K 0K 78643K 13 0 0 proc 42 38K 70K 78643K 386 0 0 subproc 64 65538K 67586K 78643K 104 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 131 0 0 in_multi 33 2K 2K 78643K 71 0 0 ether_multi 1 0K 0K 78643K 7 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 247 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 21K 29K 78643K 4263 0 0 UVM aobj 56 2K 3K 78643K 63 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 22 0 0 NDP 10 0K 0K 78643K 34 0 0 temp 156 2367K 2998K 78643K 5553 0 0 kqueue 0 0K 0K 78643K 25 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 5 0 1 1 0 1 1 0 8 0 inpcbpl 280 495 0 488 1 0 1 1 0 8 0 plimitpl 152 25 0 18 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 50 0 10 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 5 0 5 1 1 0 1 0 8 0 tcpcb 544 165 0 161 1 0 1 1 0 8 0 nd6 48 6 0 2 1 0 1 1 0 8 0 ppxss 1128 14 0 14 6 5 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 230 0 41 12 0 12 12 0 8 0 art_table 32 231 0 41 2 0 2 2 0 8 0 art_node 16 49 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 4 1 0 1 1 0 8 0 semapl 112 95 0 85 1 0 1 1 0 8 0 shmpl 112 61 0 7 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3412 0 1999 46 0 46 46 0 8 0 ffsino 272 3412 0 1999 95 0 95 95 0 8 0 nchpl 144 5128 0 3519 61 0 61 61 0 8 0 uvmvnodes 72 3564 0 0 65 0 65 65 0 8 0 vnodes 200 3564 0 0 188 0 188 188 0 8 0 namei 1024 15093 0 15093 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 11 0 11 6 6 0 1 0 8 0 scxspl 192 12952 0 12951 9 8 1 6 0 8 0 sigapl 432 1203 0 1190 2 0 2 2 0 8 0 futexpl 56 10800 0 10800 1 0 1 1 0 8 1 knotepl 112 309 0 282 4 3 1 2 0 8 0 kqueuepl 104 284 0 282 1 0 1 1 0 8 0 pipepl 112 736 0 717 2 1 1 1 0 8 0 fdescpl 488 1204 0 1190 3 1 2 3 0 8 0 filepl 152 7235 0 7140 8 3 5 6 0 8 1 lockfpl 104 369 0 368 3 2 1 1 0 8 0 lockfspl 32 631 0 630 3 2 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 23 0 13 1 0 1 1 0 8 0 ucredpl 96 2014 0 2007 1 0 1 1 0 8 0 zombiepl 144 1190 0 1190 2 1 1 1 0 8 1 processpl 840 1219 0 1190 4 0 4 4 0 8 0 procpl 600 3618 0 3577 6 2 4 5 0 8 0 srpgc 64 6 0 6 1 1 0 1 0 8 0 sosppl 128 25 0 25 7 6 1 1 0 8 1 sockpl 384 937 0 920 3 0 3 3 0 8 1 mcl64k 65536 12 0 0 2 0 2 2 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 10 0 0 1 0 1 1 0 8 0 mcl9k 9216 8 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 18 0 0 3 0 3 3 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 112 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 153 0 0 8 0 8 8 0 8 0 bufpl 256 6420 0 1020 338 0 338 338 0 8 0 anonpl 16 129940 0 122365 78 45 33 48 0 125 0 amapchunkpl 152 7242 0 7156 17 13 4 9 0 158 0 amappl16 192 5927 0 5521 72 51 21 33 0 8 0 amappl15 184 501 0 497 1 0 1 1 0 8 0 amappl14 176 502 0 498 2 1 1 1 0 8 0 amappl13 168 29 0 26 1 0 1 1 0 8 0 amappl12 160 533 0 532 2 1 1 1 0 8 0 amappl11 152 197 0 186 1 0 1 1 0 8 0 amappl10 144 60 0 57 2 1 1 1 0 8 0 amappl9 136 350 0 346 1 0 1 1 0 8 0 amappl8 128 675 0 650 1 0 1 1 0 8 0 amappl7 120 41 0 35 1 0 1 1 0 8 0 amappl6 112 549 0 540 1 0 1 1 0 8 0 amappl5 104 144 0 134 1 0 1 1 0 8 0 amappl4 96 272 0 253 1 0 1 1 0 8 0 amappl3 88 159 0 154 1 0 1 1 0 8 0 amappl2 80 10239 0 10186 2 0 2 2 0 8 0 amappl1 72 36047 0 35633 23 13 10 19 0 8 0 amappl 72 3853 0 3820 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 62 0 7 1 0 1 1 0 8 0 uaddrrnd 24 1204 0 1190 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1204 0 1190 1 0 1 1 0 8 0 vmmpekpl 168 13782 0 13759 2 0 2 2 0 8 0 vmmpepl 168 136278 0 134931 113 48 65 74 0 357 1 vmsppl 360 1203 0 1190 2 0 2 2 0 8 0 pdppl 4096 2416 0 2380 6 1 5 6 0 8 0 pvpl 32 376673 0 366105 175 73 102 129 0 265 14 pmappl 224 1203 0 1190 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 488 0 4 14 0 14 14 0 8 0