panic: timeout_add: to_ticks (-400) < 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 319900 99235 0 0 0 0 syz-executor.0 *115702 99235 0 0 0x4000000 1K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 timeout_add(ffff800020b38c70,fffffe70) at timeout_add+0x194 sys/kern/kern_timeout.c:190 msleep(ffff800000965600,ffff800000965608,11a,ffffffff81f93f9b,fffffe70) at msleep+0xdd sys/kern/kern_synch.c:210 bpfread(41700,ffff800020c63850,0) at bpfread+0x23f sys/net/bpf.c:486 spec_read(ffff800020c63690) at spec_read+0xfd sys/kern/spec_vnops.c:223 VOP_READ(fffffd8068cf1df8,ffff800020c63850,0,fffffd807f7c62a0) at VOP_READ+0x6f sys/kern/vfs_vops.c:247 vn_read(fffffd806856a608,ffff800020c63850,0) at vn_read+0x1c3 sys/kern/vfs_vnops.c:365 dofilereadv(ffff800020b38bd0,5,ffff800020c63850,0,ffff800020c63930) at dofilereadv+0x19f sys/kern/sys_generic.c:236 sys_read(ffff800020b38bd0,ffff800020c63948,ffff800020c63930) at sys_read+0x92 sys/kern/sys_generic.c:156 syscall(ffff800020c639e0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c639e0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffb9,0,3,e9cf95570d8) at Xsyscall+0x128 end of kernel end trace frame: 0xe9f7f1e2e10, count: 3 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 (-400) < 0 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 timeout_add(ffff800020b38c70,fffffe70) at timeout_add+0x194 sys/kern/kern_timeout.c:190 msleep(ffff800000965600,ffff800000965608,11a,ffffffff81f93f9b,fffffe70) at msleep+0xdd sys/kern/kern_synch.c:210 bpfread(41700,ffff800020c63850,0) at bpfread+0x23f sys/net/bpf.c:486 spec_read(ffff800020c63690) at spec_read+0xfd sys/kern/spec_vnops.c:223 VOP_READ(fffffd8068cf1df8,ffff800020c63850,0,fffffd807f7c62a0) at VOP_READ+0x6f sys/kern/vfs_vops.c:247 vn_read(fffffd806856a608,ffff800020c63850,0) at vn_read+0x1c3 sys/kern/vfs_vnops.c:365 dofilereadv(ffff800020b38bd0,5,ffff800020c63850,0,ffff800020c63930) at dofilereadv+0x19f sys/kern/sys_generic.c:236 sys_read(ffff800020b38bd0,ffff800020c63948,ffff800020c63930) at sys_read+0x92 sys/kern/sys_generic.c:156 syscall(ffff800020c639e0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c639e0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffb9,0,3,e9cf95570d8) at Xsyscall+0x128 end of kernel end trace frame: 0xe9f7f1e2e10, count: -12 ddb{1}> show registers rdi 0xffffffff819c3ce7 db_enter+0x17 rsi 0xf99 rbp 0xffff800020c633b0 rbx 0xffff800020c63460 rdx 0xf9a rcx 0xffff8000039c3000 rax 0xffff8000039c3000 r8 0xffffffff8106e1a3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x2f63f358af120ea2 r12 0x3000000008 r13 0xffff800020c633c0 r14 0x100 r15 0x1 rip 0xffffffff819c3ce8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c633a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=115702 stat=onproc flags process=0 proc=4000000 pri=26, usrpri=76, nice=20 forw=0x0, list=0xffff800020b38018,0xffffffff823811f0 process=0xffff800020b8cd38 user=0xffff800020c5e000, vmspace=0xfffffd807effe000 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 99235 319900 25677 0 7 0 syz-executor.0 99235 73478 25677 0 2 0x4000000 syz-executor.0 *99235 115702 25677 0 7 0x4000000 bpf syz-executor.0 34035 366865 2885 0 3 0x80 nanosleep syz-executor.1 34035 26300 2885 0 3 0x4000080 fsleep syz-executor.1 34035 478456 2885 0 3 0x4000080 fsleep syz-executor.1 2885 56954 20565 0 3 0x82 nanosleep syz-executor.1 25677 437439 20565 0 3 0x82 nanosleep syz-executor.0 39867 118767 1 0 3 0x100083 ttyin getty 36994 326236 0 0 3 0x14200 bored sosplice 20565 395155 64610 0 3 0x82 thrsleep syz-fuzzer 20565 278140 64610 0 3 0x4000082 thrsleep syz-fuzzer 20565 475670 64610 0 3 0x4000082 thrsleep syz-fuzzer 20565 302139 64610 0 3 0x4000082 thrsleep syz-fuzzer 20565 517294 64610 0 3 0x4000082 thrsleep syz-fuzzer 20565 502901 64610 0 3 0x4000082 thrsleep syz-fuzzer 20565 418438 64610 0 3 0x4000082 thrsleep syz-fuzzer 20565 401666 64610 0 3 0x4000082 thrsleep syz-fuzzer 20565 244464 64610 0 3 0x4000082 kqread syz-fuzzer 20565 62491 64610 0 3 0x4000082 thrsleep syz-fuzzer 64610 21787 50474 0 3 0x10008a pause ksh 50474 373981 80779 0 3 0x92 select sshd 80779 243724 1 0 3 0x80 select sshd 82410 39964 63941 74 3 0x100092 bpf pflogd 63941 205704 1 0 3 0x80 netio pflogd 14851 53193 73224 73 3 0x100090 kqread syslogd 73224 193361 1 0 3 0x100082 netio syslogd 13527 140346 1 77 3 0x100090 poll dhclient 26064 295838 1 0 3 0x80 poll dhclient 21471 38700 0 0 3 0x14200 pgzero zerothread 62391 269394 0 0 3 0x14200 aiodoned aiodoned 49211 128240 0 0 3 0x14200 syncer update 69414 296746 0 0 3 0x14200 cleaner cleaner 16289 174287 0 0 3 0x14200 reaper reaper 58467 419763 0 0 3 0x14200 pgdaemon pagedaemon 29575 504390 0 0 3 0x14200 bored crynlk 56677 10116 0 0 3 0x14200 bored crypto 95726 123422 0 0 3 0x40014200 acpi0 acpi0 18068 54441 0 0 3 0x40014200 idle1 50752 165617 0 0 3 0x14200 bored softnet 3042 235444 0 0 3 0x14200 bored systqmp 67034 513952 0 0 3 0x14200 bored systq 70315 262969 0 0 3 0x40014200 bored softclock 50941 116414 0 0 3 0x40014200 idle0 71777 271093 0 0 3 0x14200 bored smr 1 167827 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 1: exclusive sched_lock &sched_lock r = 0 (0xffffffff82344ea8) locked @ /syzkaller/managers/multicore/kernel/sys/kern/kern_synch.c:288 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 sleep_setup+0xc0 sys/kern/kern_synch.c:290 #2 msleep+0xa5 sleep_setup_timeout sys/kern/kern_synch.c:329 [inline] #2 msleep+0xa5 sys/kern/kern_synch.c:210 #3 bpfread+0x23f sys/net/bpf.c:486 #4 spec_read+0xfd sys/kern/spec_vnops.c:223 #5 VOP_READ+0x6f sys/kern/vfs_vops.c:247 #6 vn_read+0x1c3 sys/kern/vfs_vnops.c:365 #7 dofilereadv+0x19f sys/kern/sys_generic.c:236 #8 sys_read+0x92 sys/kern/sys_generic.c:156 #9 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #9 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #10 Xsyscall+0x128 exclusive mutex &bd->bd_mtx r = 0 (0xffff800000965618) locked @ /syzkaller/managers/multicore/kernel/sys/net/bpf.c:437 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 bpfread+0xf1 sys/net/bpf.c:443 #2 spec_read+0xfd sys/kern/spec_vnops.c:223 #3 VOP_READ+0x6f sys/kern/vfs_vops.c:247 #4 vn_read+0x1c3 sys/kern/vfs_vnops.c:365 #5 dofilereadv+0x19f sys/kern/sys_generic.c:236 #6 sys_read+0x92 sys/kern/sys_generic.c:156 #7 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #7 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #8 Xsyscall+0x128 Process 99235 (syz-executor.0) thread 0xffff800020b38bd0 (115702) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82362c60) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x48b sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 exclusive sched_lock &sched_lock r = 0 (0xffffffff82344ea8) locked @ /syzkaller/managers/multicore/kernel/sys/kern/kern_synch.c:288 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 sleep_setup+0xc0 sys/kern/kern_synch.c:290 #2 msleep+0xa5 sleep_setup_timeout sys/kern/kern_synch.c:329 [inline] #2 msleep+0xa5 sys/kern/kern_synch.c:210 #3 bpfread+0x23f sys/net/bpf.c:486 #4 spec_read+0xfd sys/kern/spec_vnops.c:223 #5 VOP_READ+0x6f sys/kern/vfs_vops.c:247 #6 vn_read+0x1c3 sys/kern/vfs_vnops.c:365 #7 dofilereadv+0x19f sys/kern/sys_generic.c:236 #8 sys_read+0x92 sys/kern/sys_generic.c:156 #9 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #9 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #10 Xsyscall+0x128 exclusive mutex &bd->bd_mtx r = 0 (0xffff800000965618) locked @ /syzkaller/managers/multicore/kernel/sys/net/bpf.c:437 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 bpfread+0xf1 sys/net/bpf.c:443 #2 spec_read+0xfd sys/kern/spec_vnops.c:223 #3 VOP_READ+0x6f sys/kern/vfs_vops.c:247 #4 vn_read+0x1c3 sys/kern/vfs_vnops.c:365 #5 dofilereadv+0x19f sys/kern/sys_generic.c:236 #6 sys_read+0x92 sys/kern/sys_generic.c:156 #7 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #7 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #8 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9558 6560K 6689K 78643K 13625 0 0 pcb 26 9K 23K 78643K 3047 0 0 rtable 100 3K 4K 78643K 2496 0 0 ifaddr 70 22K 26K 78643K 1857 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1514 0 0 iov 0 0K 24K 78643K 311 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 76K 78643K 2969 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 29 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 358 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 21K 78643K 3029 0 0 sigio 0 0K 0K 78643K 39 0 0 proc 54 51K 83K 78643K 902 0 0 subproc 64 65538K 67586K 78643K 444 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 289 0 0 in_multi 33 2K 2K 78643K 236 0 0 ether_multi 1 0K 0K 78643K 18 0 0 mrt 0 0K 0K 78643K 19 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 412 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 90 21K 29K 78643K 10339 0 0 UVM aobj 119 7K 7K 78643K 126 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 72 0 0 NDP 15 0K 0K 78643K 486 0 0 temp 193 2380K 2498K 78643K 15500 0 0 kqueue 0 0K 0K 78643K 20 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 15 0 11 1 0 1 1 0 8 0 inpcbpl 280 1159 0 1152 1 0 1 1 0 8 0 plimitpl 152 126 0 118 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 142 0 102 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 15 0 15 1 1 0 1 0 8 0 tcpcb 544 425 0 421 1 0 1 1 0 8 0 rttmr 72 2 0 2 1 0 1 1 0 8 1 nd6 48 26 0 22 1 0 1 1 0 8 0 ppxss 1128 423 0 423 18 17 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 49 0 45 1 0 1 1 0 8 0 pfstkey 112 49 0 45 1 0 1 1 0 8 0 pfstate 328 49 0 45 2 1 1 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 661 0 467 13 0 13 13 0 8 0 art_table 32 662 0 467 2 0 2 2 0 8 0 art_node 16 141 0 107 1 0 1 1 0 8 0 sysvmsgpl 40 25 0 9 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 356 0 346 1 0 1 1 0 8 0 shmpl 112 124 0 7 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6630 0 5133 50 1 49 49 0 8 0 ffsino 272 6630 0 5133 101 1 100 100 0 8 0 nchpl 144 10847 0 9170 65 2 63 63 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 31875 0 31875 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 5 0 5 4 4 0 1 0 8 0 scxspl 192 32967 0 32967 13 12 1 6 0 8 1 sigapl 432 3198 0 3182 2 0 2 2 0 8 0 futexpl 56 32650 0 32648 1 0 1 1 0 8 0 knotepl 112 745 0 726 1 0 1 1 0 8 0 kqueuepl 104 588 0 586 1 0 1 1 0 8 0 pipepl 112 1584 0 1565 5 4 1 2 0 8 0 fdescpl 488 3199 0 3182 3 0 3 3 0 8 0 filepl 152 18129 0 18027 14 9 5 9 0 8 1 lockfpl 104 1510 0 1510 4 3 1 1 0 8 1 lockfspl 32 1429 0 1429 4 3 1 1 0 8 1 sessionpl 112 32 0 21 1 0 1 1 0 8 0 pgrppl 48 58 0 47 1 0 1 1 0 8 0 ucredpl 96 3317 0 3308 1 0 1 1 0 8 0 zombiepl 144 3182 0 3182 2 1 1 1 0 8 1 processpl 840 3215 0 3182 4 0 4 4 0 8 0 procpl 600 9336 0 9290 5 1 4 5 0 8 0 srpgc 64 68 0 68 9 8 1 1 0 8 1 sosppl 128 40 0 40 13 13 0 1 0 8 0 sockpl 384 4064 0 4044 20 17 3 13 0 8 1 mcl64k 65536 447 0 0 55 28 27 30 0 8 1 mcl16k 16384 7 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 11 0 0 1 0 1 1 0 8 0 mcl8k 8192 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 16 0 0 2 0 2 2 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 149 0 0 16 3 13 16 0 8 0 mtagpl 80 3 0 0 1 0 1 1 0 8 0 mbufpl 256 632 0 0 20 1 19 20 0 8 0 bufpl 256 11382 0 4358 440 0 440 440 0 8 0 anonpl 16 311465 0 302530 130 78 52 55 0 125 10 amapchunkpl 152 18040 0 17942 29 24 5 9 0 158 0 amappl16 192 16750 0 16240 128 90 38 38 0 8 12 amappl15 184 64 0 60 1 0 1 1 0 8 0 amappl14 176 260 0 256 2 1 1 1 0 8 0 amappl13 168 682 0 678 1 0 1 1 0 8 0 amappl12 160 73 0 71 1 0 1 1 0 8 0 amappl11 152 349 0 333 1 0 1 1 0 8 0 amappl10 144 932 0 929 1 0 1 1 0 8 0 amappl9 136 1184 0 1176 1 0 1 1 0 8 0 amappl8 128 732 0 715 1 0 1 1 0 8 0 amappl7 120 916 0 909 1 0 1 1 0 8 0 amappl6 112 370 0 361 1 0 1 1 0 8 0 amappl5 104 201 0 187 1 0 1 1 0 8 0 amappl4 96 3721 0 3690 2 1 1 2 0 8 0 amappl3 88 407 0 401 1 0 1 1 0 8 0 amappl2 80 27105 0 27043 2 0 2 2 0 8 0 amappl1 72 77016 0 76552 25 15 10 20 0 8 0 amappl 72 9698 0 9658 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 125 0 7 2 0 2 2 0 8 0 uaddrrnd 24 3199 0 3182 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3199 0 3182 1 0 1 1 0 8 0 vmmpekpl 168 28937 0 28911 2 0 2 2 0 8 0 vmmpepl 168 342740 0 341130 216 134 82 89 0 357 9 vmsppl 360 3198 0 3182 2 0 2 2 0 8 0 pdppl 4096 6406 0 6364 6 0 6 6 0 8 0 pvpl 32 888108 0 875829 284 148 136 141 0 265 25 pmappl 232 3198 0 3182 4 3 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 666 0 37 19 0 19 19 0 8 0