panic: timeout_add: to_ticks (-409500) < 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 219007 73152 0 0 0 1 syz-executor.0 * 42782 73152 0 0 0x4000000 0K 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(ffff800020b39378,fff9c064) at timeout_add+0x194 sys/kern/kern_timeout.c:190 msleep(ffff80000198da00,ffff80000198da08,11a,ffffffff81f93f9b,fff9c064) at msleep+0xdd sys/kern/kern_synch.c:210 bpfread(31700,ffff800020c5f870,0) at bpfread+0x23f sys/net/bpf.c:486 spec_read(ffff800020c5f6b0) at spec_read+0xfd sys/kern/spec_vnops.c:223 VOP_READ(fffffd8065657dc0,ffff800020c5f870,0,fffffd807f7c6960) at VOP_READ+0x6f sys/kern/vfs_vops.c:247 vn_read(fffffd806cb44438,ffff800020c5f870,0) at vn_read+0x1c3 sys/kern/vfs_vnops.c:365 dofilereadv(ffff800020b392d8,3,ffff800020c5f870,0,ffff800020c5f950) at dofilereadv+0x19f sys/kern/sys_generic.c:236 sys_read(ffff800020b392d8,ffff800020c5f968,ffff800020c5f950) at sys_read+0x92 sys/kern/sys_generic.c:156 syscall(ffff800020c5fa00) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c5fa00) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffb9,0,3,c6c38f2b010) at Xsyscall+0x128 end of kernel end trace frame: 0xc6ebe429d60, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic timeout_add: to_ticks (-409500) < 0 ddb{0}> 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(ffff800020b39378,fff9c064) at timeout_add+0x194 sys/kern/kern_timeout.c:190 msleep(ffff80000198da00,ffff80000198da08,11a,ffffffff81f93f9b,fff9c064) at msleep+0xdd sys/kern/kern_synch.c:210 bpfread(31700,ffff800020c5f870,0) at bpfread+0x23f sys/net/bpf.c:486 spec_read(ffff800020c5f6b0) at spec_read+0xfd sys/kern/spec_vnops.c:223 VOP_READ(fffffd8065657dc0,ffff800020c5f870,0,fffffd807f7c6960) at VOP_READ+0x6f sys/kern/vfs_vops.c:247 vn_read(fffffd806cb44438,ffff800020c5f870,0) at vn_read+0x1c3 sys/kern/vfs_vnops.c:365 dofilereadv(ffff800020b392d8,3,ffff800020c5f870,0,ffff800020c5f950) at dofilereadv+0x19f sys/kern/sys_generic.c:236 sys_read(ffff800020b392d8,ffff800020c5f968,ffff800020c5f950) at sys_read+0x92 sys/kern/sys_generic.c:156 syscall(ffff800020c5fa00) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c5fa00) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffb9,0,3,c6c38f2b010) at Xsyscall+0x128 end of kernel end trace frame: 0xc6ebe429d60, count: -12 ddb{0}> show registers rdi 0xffffffff819c3ce7 db_enter+0x17 rsi 0x1080 __ALIGN_SIZE+0x80 rbp 0xffff800020c5f3d0 rbx 0xffff800020c5f480 rdx 0x1081 __ALIGN_SIZE+0x81 rcx 0xffff800003b66000 rax 0xffff800003b66000 r8 0xffffffff8106e1a3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x9f0e0c78fb4f170a r12 0x3000000008 r13 0xffff800020c5f3e0 r14 0x100 r15 0x1 rip 0xffffffff819c3ce8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c5f3c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=42782 stat=onproc flags process=0 proc=4000000 pri=26, usrpri=80, nice=20 forw=0x0, list=0xffff800020b38bd0,0xffff800020b39c48 process=0xffff800020b8c6a8 user=0xffff800020c5a000, vmspace=0xfffffd807effe708 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 73152 219007 20294 0 7 0 syz-executor.0 *73152 42782 20294 0 7 0x4000000 bpf syz-executor.0 95241 200830 33696 0 3 0x80 nanosleep syz-executor.1 95241 295485 33696 0 3 0x4000080 pppxread syz-executor.1 95241 140164 33696 0 3 0x4000080 fsleep syz-executor.1 33696 293818 23872 0 3 0x82 nanosleep syz-executor.1 20294 136031 23872 0 3 0x82 nanosleep syz-executor.0 14858 18576 0 0 3 0x14200 bored sosplice 23872 519395 70093 0 3 0x82 thrsleep syz-fuzzer 23872 40296 70093 0 3 0x4000082 thrsleep syz-fuzzer 23872 90149 70093 0 3 0x4000082 thrsleep syz-fuzzer 23872 231053 70093 0 3 0x4000082 thrsleep syz-fuzzer 23872 315926 70093 0 3 0x4000082 thrsleep syz-fuzzer 23872 204765 70093 0 3 0x4000082 thrsleep syz-fuzzer 23872 390529 70093 0 3 0x4000082 thrsleep syz-fuzzer 23872 86782 70093 0 3 0x4000082 kqread syz-fuzzer 23872 417922 70093 0 3 0x4000082 thrsleep syz-fuzzer 23872 77070 70093 0 3 0x4000082 thrsleep syz-fuzzer 70093 503060 17120 0 3 0x10008a pause ksh 17120 14857 45110 0 3 0x92 select sshd 70866 488521 1 0 3 0x100083 ttyin getty 45110 314917 1 0 3 0x80 select sshd 95764 465469 24018 74 3 0x100092 bpf pflogd 24018 416331 1 0 3 0x80 netio pflogd 11876 101918 2188 73 3 0x100090 kqread syslogd 2188 285257 1 0 3 0x100082 netio syslogd 9433 226428 1 77 3 0x100090 poll dhclient 77416 300088 1 0 3 0x80 poll dhclient 16596 202240 0 0 3 0x14200 pgzero zerothread 99422 246685 0 0 3 0x14200 aiodoned aiodoned 9222 442448 0 0 3 0x14200 syncer update 56675 400630 0 0 3 0x14200 cleaner cleaner 78948 324135 0 0 3 0x14200 reaper reaper 63675 254323 0 0 3 0x14200 pgdaemon pagedaemon 52892 242815 0 0 3 0x14200 bored crynlk 75464 375206 0 0 3 0x14200 bored crypto 87661 140962 0 0 3 0x40014200 acpi0 acpi0 31705 385438 0 0 3 0x40014200 idle1 7504 147209 0 0 3 0x14200 bored softnet 81912 511904 0 0 3 0x14200 bored systqmp 21373 254114 0 0 3 0x14200 bored systq 76948 158795 0 0 3 0x40014200 bored softclock 36343 101586 0 0 3 0x40014200 idle0 4473 10025 0 0 3 0x14200 bored smr 1 495739 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: 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 (0xffff80000198da18) 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 73152 (syz-executor.0) thread 0xffff800020b392d8 (42782) 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 (0xffff80000198da18) 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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9529 6474K 6537K 78643K 10929 0 0 pcb 25 9K 11K 78643K 368 0 0 rtable 100 3K 4K 78643K 388 0 0 ifaddr 62 13K 14K 78643K 128 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1481 0 0 iov 1 16K 24K 78643K 74 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1204 75K 76K 78643K 1610 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 74 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 21K 78643K 533 0 0 sigio 0 0K 0K 78643K 3 0 0 proc 53 50K 71K 78643K 450 0 0 subproc 64 65538K 67586K 78643K 204 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 45 0 0 in_multi 33 2K 2K 78643K 96 0 0 ether_multi 1 0K 0K 78643K 8 0 0 mrt 0 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 264 0 0 pfkey data 0 0K 0K 78643K 2 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 85 20K 29K 78643K 2632 0 0 UVM aobj 41 2K 2K 78643K 41 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 50 0 0 NDP 13 0K 0K 78643K 39 0 0 temp 158 2374K 3006K 78643K 4840 0 0 kqueue 0 0K 0K 78643K 8 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 8 0 4 1 0 1 1 0 8 0 inpcbpl 280 328 0 321 1 0 1 1 0 8 0 plimitpl 152 47 0 39 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 77 0 37 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 14 0 14 1 1 0 1 0 8 0 tcpcb 544 100 0 96 1 0 1 1 0 8 0 nd6 48 12 0 8 1 0 1 1 0 8 0 ppxss 1128 10 0 10 3 2 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 24 0 15 1 0 1 1 0 8 0 pfstkey 112 24 0 15 1 0 1 1 0 8 0 pfstate 328 24 0 15 2 0 2 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 355 0 167 12 0 12 12 0 8 0 art_table 32 356 0 167 2 0 2 2 0 8 0 art_node 16 76 0 42 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 3 1 0 1 1 0 8 0 semapl 112 72 0 62 1 0 1 1 0 8 0 shmpl 112 39 0 0 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2365 0 937 47 0 47 47 0 8 0 ffsino 272 2365 0 937 96 0 96 96 0 8 0 nchpl 144 3309 0 1661 62 0 62 62 0 8 0 uvmvnodes 72 2566 0 0 47 0 47 47 0 8 0 vnodes 200 2566 0 0 136 0 136 136 0 8 0 namei 1024 9933 0 9933 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 9464 0 9464 11 10 1 6 0 8 1 sigapl 432 720 0 704 2 0 2 2 0 8 0 futexpl 56 6647 0 6646 2 1 1 1 0 8 0 knotepl 112 249 0 230 1 0 1 1 0 8 0 kqueuepl 104 163 0 161 1 0 1 1 0 8 0 pipepl 112 550 0 531 5 4 1 2 0 8 0 fdescpl 488 721 0 704 3 0 3 3 0 8 0 filepl 152 4702 0 4601 10 5 5 7 0 8 1 lockfpl 104 247 0 247 3 2 1 1 0 8 1 lockfspl 32 382 0 382 3 2 1 1 0 8 1 sessionpl 112 22 0 11 1 0 1 1 0 8 0 pgrppl 48 32 0 21 1 0 1 1 0 8 0 ucredpl 96 1074 0 1065 1 0 1 1 0 8 0 zombiepl 144 704 0 704 3 2 1 1 0 8 1 processpl 840 737 0 704 4 0 4 4 0 8 0 procpl 600 1884 0 1839 6 2 4 5 0 8 0 srpgc 64 24 0 24 2 2 0 1 0 8 0 sosppl 128 9 0 9 3 3 0 1 0 8 0 sockpl 384 621 0 602 8 4 4 4 0 8 2 mcl64k 65536 256 0 0 32 1 31 32 0 8 1 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 138 0 0 17 0 17 17 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 380 0 0 21 0 21 21 0 8 0 bufpl 256 7102 0 1144 373 0 373 373 0 8 0 anonpl 16 86135 0 77817 72 33 39 54 0 125 0 amapchunkpl 152 4099 0 4007 14 9 5 9 0 158 0 amappl16 192 3227 0 2727 46 20 26 37 0 8 0 amappl15 184 269 0 265 1 0 1 1 0 8 0 amappl14 176 209 0 203 2 1 1 1 0 8 0 amappl13 168 28 0 24 1 0 1 1 0 8 0 amappl12 160 226 0 223 1 0 1 1 0 8 0 amappl11 152 163 0 148 1 0 1 1 0 8 0 amappl10 144 70 0 67 1 0 1 1 0 8 0 amappl9 136 617 0 612 1 0 1 1 0 8 0 amappl8 128 171 0 155 1 0 1 1 0 8 0 amappl7 120 41 0 36 1 0 1 1 0 8 0 amappl6 112 60 0 53 1 0 1 1 0 8 0 amappl5 104 329 0 312 1 0 1 1 0 8 0 amappl4 96 787 0 753 2 1 1 2 0 8 0 amappl3 88 308 0 302 1 0 1 1 0 8 0 amappl2 80 5333 0 5270 2 0 2 2 0 8 0 amappl1 72 25450 0 24986 25 15 10 20 0 8 0 amappl 72 2154 0 2116 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 40 0 0 1 0 1 1 0 8 0 uaddrrnd 24 721 0 704 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 721 0 704 1 0 1 1 0 8 0 vmmpekpl 168 10351 0 10324 2 0 2 2 0 8 0 vmmpepl 168 84656 0 83057 112 29 83 83 0 357 12 vmsppl 360 720 0 704 2 0 2 2 0 8 0 pdppl 4096 1450 0 1408 6 0 6 6 0 8 0 pvpl 32 263643 0 251976 160 41 119 138 0 265 16 pmappl 232 720 0 704 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 571 0 5 17 0 17 17 0 8 0