panic: timeout_add: to_ticks (-25800) < 0 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 515486 51154 0 0 0 1 syz-executor.0 * 91037 51154 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(ffff800020b38c70,ffff9b38) at timeout_add+0x194 sys/kern/kern_timeout.c:190 msleep(ffff800001985600,ffff800001985608,11a,ffffffff81f93f9b,ffff9b38) at msleep+0xdd sys/kern/kern_synch.c:210 bpfread(31700,ffff800020c39140,0) at bpfread+0x23f sys/net/bpf.c:486 spec_read(ffff800020c38f80) at spec_read+0xfd sys/kern/spec_vnops.c:223 VOP_READ(fffffd8073d68b20,ffff800020c39140,0,fffffd807f7c6840) at VOP_READ+0x6f sys/kern/vfs_vops.c:247 vn_read(fffffd8073ffbb48,ffff800020c39140,0) at vn_read+0x1c3 sys/kern/vfs_vnops.c:365 dofilereadv(ffff800020b38bd0,3,ffff800020c39140,0,ffff800020c39220) at dofilereadv+0x19f sys/kern/sys_generic.c:236 sys_read(ffff800020b38bd0,ffff800020c39238,ffff800020c39220) at sys_read+0x92 sys/kern/sys_generic.c:156 syscall(ffff800020c392d0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c392d0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffb9,0,3,ac1b2faf010) at Xsyscall+0x128 end of kernel end trace frame: 0xac467b08ea0, 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 (-25800) < 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(ffff800020b38c70,ffff9b38) at timeout_add+0x194 sys/kern/kern_timeout.c:190 msleep(ffff800001985600,ffff800001985608,11a,ffffffff81f93f9b,ffff9b38) at msleep+0xdd sys/kern/kern_synch.c:210 bpfread(31700,ffff800020c39140,0) at bpfread+0x23f sys/net/bpf.c:486 spec_read(ffff800020c38f80) at spec_read+0xfd sys/kern/spec_vnops.c:223 VOP_READ(fffffd8073d68b20,ffff800020c39140,0,fffffd807f7c6840) at VOP_READ+0x6f sys/kern/vfs_vops.c:247 vn_read(fffffd8073ffbb48,ffff800020c39140,0) at vn_read+0x1c3 sys/kern/vfs_vnops.c:365 dofilereadv(ffff800020b38bd0,3,ffff800020c39140,0,ffff800020c39220) at dofilereadv+0x19f sys/kern/sys_generic.c:236 sys_read(ffff800020b38bd0,ffff800020c39238,ffff800020c39220) at sys_read+0x92 sys/kern/sys_generic.c:156 syscall(ffff800020c392d0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c392d0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffb9,0,3,ac1b2faf010) at Xsyscall+0x128 end of kernel end trace frame: 0xac467b08ea0, count: -12 ddb{0}> show registers rdi 0xffffffff819c3ce7 db_enter+0x17 rsi 0x1060 __ALIGN_SIZE+0x60 rbp 0xffff800020c38ca0 rbx 0xffff800020c38d50 rdx 0x1061 __ALIGN_SIZE+0x61 rcx 0xffff800001566000 rax 0xffff800001566000 r8 0xffffffff8106e1a3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x4c62e3dcae983440 r12 0x3000000008 r13 0xffff800020c38cb0 r14 0x100 r15 0x1 rip 0xffffffff819c3ce8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c38c90 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=91037 stat=onproc flags process=0 proc=4000000 pri=26, usrpri=75, nice=20 forw=0x0, list=0xffff800020b39788,0xffffffff823811f0 process=0xffff800020b3a6a0 user=0xffff800020c34000, vmspace=0xfffffd807effe5a0 estcpu=25, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 51154 515486 66309 0 7 0 syz-executor.0 *51154 91037 66309 0 7 0x4000000 bpf syz-executor.0 59279 241124 85291 0 3 0x2 biowait syz-executor.1 66309 348207 85291 0 3 0x82 nanosleep syz-executor.0 77720 282200 1 0 3 0x100083 ttyin getty 12666 510457 0 0 3 0x14200 bored sosplice 85291 265687 47891 0 3 0x82 thrsleep syz-fuzzer 85291 358795 47891 0 3 0x4000082 thrsleep syz-fuzzer 85291 35293 47891 0 3 0x4000082 thrsleep syz-fuzzer 85291 293958 47891 0 3 0x4000082 thrsleep syz-fuzzer 85291 272158 47891 0 3 0x4000082 thrsleep syz-fuzzer 85291 325527 47891 0 3 0x4000082 thrsleep syz-fuzzer 85291 499507 47891 0 3 0x4000082 thrsleep syz-fuzzer 85291 130063 47891 0 3 0x4000082 thrsleep syz-fuzzer 85291 450319 47891 0 3 0x4000082 kqread syz-fuzzer 85291 368166 47891 0 3 0x4000082 thrsleep syz-fuzzer 85291 484468 47891 0 3 0x4000082 thrsleep syz-fuzzer 47891 397041 72773 0 3 0x10008a pause ksh 72773 420071 98394 0 3 0x92 select sshd 98394 33629 1 0 3 0x80 select sshd 98873 206859 96162 74 3 0x100092 bpf pflogd 96162 262704 1 0 3 0x80 netio pflogd 96884 388954 78205 73 3 0x100090 kqread syslogd 78205 190587 1 0 3 0x100082 netio syslogd 50244 460975 1 77 3 0x100090 poll dhclient 70276 320592 1 0 3 0x80 poll dhclient 39429 83798 0 0 3 0x14200 pgzero zerothread 48405 268036 0 0 3 0x14200 aiodoned aiodoned 46206 187086 0 0 3 0x14200 syncer update 38131 318400 0 0 3 0x14200 cleaner cleaner 97089 39086 0 0 3 0x14200 reaper reaper 69902 63748 0 0 3 0x14200 pgdaemon pagedaemon 93586 126447 0 0 3 0x14200 bored crynlk 25784 474089 0 0 3 0x14200 bored crypto 86962 262595 0 0 3 0x40014200 acpi0 acpi0 54414 442927 0 0 3 0x40014200 idle1 65568 414375 0 0 3 0x14200 bored softnet 57638 153525 0 0 3 0x14200 bored systqmp 56499 452398 0 0 3 0x14200 bored systq 46048 69409 0 0 3 0x40014200 bored softclock 41120 161274 0 0 3 0x40014200 idle0 3925 141767 0 0 3 0x14200 bored smr 1 71230 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 (0xffff800001985618) 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 51154 (syz-executor.0) thread 0xffff800020b38bd0 (91037) 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 (0xffff800001985618) 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 59279 (syz-executor.1) thread 0xffff800020b384c8 (241124) exclusive rrwlock inode r = 0 (0xfffffd806d00f928) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_ihash.c:140 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x45d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 ufs_ihashins+0x6d sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x143 sys/ufs/ffs/ffs_vfsops.c:1352 #5 ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392 #6 ufs_mkdir+0x10f sys/ufs/ufs/ufs_vnops.c:1164 #7 VOP_MKDIR+0x76 sys/kern/vfs_vops.c:449 #8 domkdirat+0x12d sys/kern/vfs_syscalls.c:2881 #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 rrwlock inode r = 0 (0xfffffd806fabde70) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x45d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 VOP_LOCK+0x57 sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 vfs_lookup+0xf5 sys/kern/vfs_lookup.c:387 #6 namei+0x4b2 sys/kern/vfs_lookup.c:224 #7 domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 #8 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #8 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9523 6486K 7203K 78643K 11797 0 0 pcb 25 9K 11K 78643K 562 0 0 rtable 100 3K 4K 78643K 701 0 0 ifaddr 58 13K 14K 78643K 244 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1490 0 0 iov 0 0K 36K 78643K 111 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 76K 78643K 2111 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 12 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 156 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 21K 78643K 1087 0 0 sigio 0 0K 0K 78643K 14 0 0 proc 54 51K 71K 78643K 622 0 0 subproc 64 65538K 67586K 78643K 376 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 170 0 0 ether_multi 1 0K 0K 78643K 12 0 0 mrt 0 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 302 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 81 20K 29K 78643K 4441 0 0 UVM aobj 36 3K 3K 78643K 37 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 57 0 0 NDP 12 0K 0K 78643K 78 0 0 temp 172 2379K 3015K 78643K 6799 0 0 kqueue 0 0K 0K 78643K 3 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 13 0 9 1 0 1 1 0 8 0 inpcbpl 280 565 0 558 1 0 1 1 0 8 0 plimitpl 152 72 0 64 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 123 0 83 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 190 0 186 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 22 0 18 1 0 1 1 0 8 0 ppxss 1128 27 0 27 5 5 0 1 0 8 0 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 35 0 27 1 0 1 1 0 8 0 pfstkey 112 35 0 27 1 0 1 1 0 8 0 pfstate 328 35 0 27 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 573 0 382 12 0 12 12 0 8 0 art_table 32 574 0 382 2 0 2 2 0 8 0 art_node 16 122 0 88 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 7 1 0 1 1 0 8 0 semapl 112 152 0 142 1 0 1 1 0 8 0 shmpl 112 35 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3282 0 1835 47 0 47 47 0 8 0 ffsino 272 3282 0 1835 97 0 97 97 0 8 0 nchpl 144 4954 0 3289 62 0 62 62 0 8 0 uvmvnodes 72 3780 0 0 69 0 69 69 0 8 0 vnodes 200 3780 0 0 199 0 199 199 0 8 0 namei 1024 15113 0 15112 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 4 0 4 2 1 1 1 0 8 1 scxspl 192 13397 0 13396 12 11 1 6 0 8 0 sigapl 432 1260 0 1245 2 0 2 2 0 8 0 futexpl 56 11697 0 11697 1 0 1 1 0 8 1 knotepl 112 374 0 355 1 0 1 1 0 8 0 kqueuepl 104 239 0 237 1 0 1 1 0 8 0 pipepl 112 832 0 813 3 2 1 2 0 8 0 fdescpl 488 1261 0 1245 4 1 3 3 0 8 0 filepl 152 7600 0 7500 6 1 5 6 0 8 1 lockfpl 104 382 0 382 2 1 1 1 0 8 1 lockfspl 32 523 0 523 2 1 1 1 0 8 1 sessionpl 112 28 0 17 1 0 1 1 0 8 0 pgrppl 48 38 0 27 1 0 1 1 0 8 0 ucredpl 96 1753 0 1744 1 0 1 1 0 8 0 zombiepl 144 1245 0 1245 2 1 1 1 0 8 1 processpl 840 1277 0 1245 4 0 4 4 0 8 0 procpl 600 3560 0 3517 5 1 4 5 0 8 0 srpgc 64 53 0 53 4 4 0 1 0 8 0 sosppl 128 4 0 4 2 2 0 1 0 8 0 sockpl 384 1049 0 1030 4 1 3 4 0 8 1 mcl64k 65536 229 0 0 29 3 26 29 0 8 1 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 126 0 0 15 2 13 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 346 0 0 18 0 18 18 0 8 0 bufpl 256 7728 0 1146 412 0 412 412 0 8 0 anonpl 16 143977 0 134718 88 43 45 54 0 125 5 amapchunkpl 152 7930 0 7837 28 19 9 9 0 158 4 amappl16 192 6234 0 5739 71 44 27 37 0 8 2 amappl15 184 231 0 227 1 0 1 1 0 8 0 amappl14 176 44 0 42 2 1 1 1 0 8 0 amappl13 168 230 0 226 1 0 1 1 0 8 0 amappl12 160 26 0 25 1 0 1 1 0 8 0 amappl11 152 316 0 300 1 0 1 1 0 8 0 amappl10 144 333 0 325 1 0 1 1 0 8 0 amappl9 136 724 0 720 1 0 1 1 0 8 0 amappl8 128 288 0 274 1 0 1 1 0 8 0 amappl7 120 143 0 135 1 0 1 1 0 8 0 amappl6 112 318 0 311 1 0 1 1 0 8 0 amappl5 104 135 0 120 1 0 1 1 0 8 0 amappl4 96 1695 0 1665 2 1 1 2 0 8 0 amappl3 88 147 0 142 1 0 1 1 0 8 0 amappl2 80 9835 0 9782 2 0 2 2 0 8 0 amappl1 72 37233 0 36792 25 15 10 20 0 8 0 amappl 72 3888 0 3851 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 36 0 1 1 0 1 1 0 8 0 uaddrrnd 24 1261 0 1245 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1261 0 1245 1 0 1 1 0 8 0 vmmpekpl 168 14462 0 14436 2 0 2 2 0 8 0 vmmpepl 168 141548 0 140050 132 57 75 84 0 357 5 vmsppl 360 1260 0 1245 2 0 2 2 0 8 0 pdppl 4096 2530 0 2490 7 1 6 6 0 8 0 pvpl 32 404502 0 391981 194 72 122 139 0 265 16 pmappl 232 1260 0 1245 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 604 0 10 18 0 18 18 0 8 0