panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *523408 57038 0 0x12 0 1 sshd 466599 708 0 0x14000 0x200 0 reaper db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821d88fe) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff8000009f7320) at tcp_output+0x2c28 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff8000009f7320) at tcp_output+0x2c28 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806e965788,9,fffffd806d598c00,0,0,ffff800020ad18c0) at tcp_usrreq+0xa45 sosend(fffffd806e965788,0,ffff800020afbce8,0,0,80) at sosend+0x645 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020ad18c0,4,ffff800020afbce8,0,ffff800020afbdd0) at dofilewritev+0x1b7 sys/kern/sys_generic.c:364 sys_write(ffff800020ad18c0,ffff800020afbd80,ffff800020afbdd0) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800020afbe50) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020afbe50) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcf2a0, count: 6 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 tcp_output: template len != hdrlen - optlen ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821d88fe) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff8000009f7320) at tcp_output+0x2c28 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff8000009f7320) at tcp_output+0x2c28 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806e965788,9,fffffd806d598c00,0,0,ffff800020ad18c0) at tcp_usrreq+0xa45 sosend(fffffd806e965788,0,ffff800020afbce8,0,0,80) at sosend+0x645 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020ad18c0,4,ffff800020afbce8,0,ffff800020afbdd0) at dofilewritev+0x1b7 sys/kern/sys_generic.c:364 sys_write(ffff800020ad18c0,ffff800020afbd80,ffff800020afbdd0) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800020afbe50) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020afbe50) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcf2a0, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020afb860 rbx 0xffff800020afb910 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff81c5ee0f kprintf+0x16f r9 0x1 r10 0x43d9dc22c74c8f8 r11 0x240dc1434b786a6e r12 0x3000000008 r13 0xffff800020afb870 r14 0x100 r15 0x1 rip 0xffffffff8218fa58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020afb850 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (sshd) pid=523408 stat=onproc flags process=12 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020ad09f0,0xffffffff8264ecb0 process=0xffff800020a9bc10 user=0xffff800020af6000, vmspace=0xfffffd806e7a52e8 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *57038 523408 35280 0 7 0x12 sshd 40827 230481 1 0 3 0x100083 ttyin getty 35280 329078 1 0 3 0x80 select sshd 60095 5348 73714 74 3 0x100092 bpf pflogd 73714 21991 1 0 3 0x80 netio pflogd 80797 97106 44531 73 3 0x100090 kqread syslogd 44531 494116 1 0 3 0x100082 netio syslogd 10572 460893 1 77 3 0x100090 poll dhclient 47749 337824 1 0 3 0x80 poll dhclient 2564 406935 0 0 3 0x14200 pgzero zerothread 45481 314400 0 0 3 0x14200 aiodoned aiodoned 12643 317726 0 0 3 0x14200 syncer update 65126 153483 0 0 3 0x14200 cleaner cleaner 708 466599 0 0 7 0x14200 reaper 10608 246606 0 0 3 0x14200 pgdaemon pagedaemon 7052 469179 0 0 3 0x14200 bored crynlk 20927 274780 0 0 3 0x14200 bored crypto 61547 117656 0 0 3 0x40014200 acpi0 acpi0 39436 91504 0 0 3 0x40014200 idle1 44710 494523 0 0 3 0x14200 bored softnet 45077 193821 0 0 3 0x14200 bored systqmp 33014 317141 0 0 3 0x14200 bored systq 6197 43453 0 0 3 0x40014200 bored softclock 15671 51077 0 0 3 0x40014200 idle0 98321 20486 0 0 3 0x14200 bored smr 1 65485 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 0: exclusive sched_lock &sched_lock r = 0 (0xffffffff8260a180) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 wakeup_n+0x37 sys/kern/kern_synch.c:539 #2 uvm_pmr_freepages+0x31d sys/uvm/uvm_pmemrange.c:1149 #3 pmap_do_remove+0x68b sys/arch/amd64/amd64/pmap.c:1799 #4 uvm_map_teardown+0x195 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:206 [inline] #4 uvm_map_teardown+0x195 sys/uvm/uvm_map.c:2723 #5 uvmspace_free+0x86 sys/uvm/uvm_map.c:3598 #6 uvm_exit+0x29 sys/uvm/uvm_glue.c:297 #7 reaper+0x189 sys/kern/kern_exit.c:442 #8 proc_trampoline+0x1c exclusive mutex &uvm.fpageqlock r = 0 (0xffffffff8264ea98) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 mtx_enter_try+0x102 #2 mtx_enter+0x4b sys/kern/kern_lock.c:266 #3 uvm_pmr_freepages+0x126 sys/uvm/uvm_pmemrange.c:1135 #4 pmap_do_remove+0x68b sys/arch/amd64/amd64/pmap.c:1799 #5 uvm_map_teardown+0x195 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:206 [inline] #5 uvm_map_teardown+0x195 sys/uvm/uvm_map.c:2723 #6 uvmspace_free+0x86 sys/uvm/uvm_map.c:3598 #7 uvm_exit+0x29 sys/uvm/uvm_glue.c:297 #8 reaper+0x189 sys/kern/kern_exit.c:442 #9 proc_trampoline+0x1c Process 57038 (sshd) thread 0xffff800020ad18c0 (523408) exclusive rwlock netlock r = 0 (0xffffffff824d3e48) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 solock+0x5a sys/kern/uipc_socket2.c:282 #2 sosend+0x51b sys/kern/uipc_socket.c:512 #3 dofilewritev+0x1b7 sys/kern/sys_generic.c:364 #4 sys_write+0x83 sys/kern/sys_generic.c:284 #5 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #5 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #6 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9461 6393K 6395K 78643K 10556 0 pcb 13 8K 8K 78643K 13 0 rtable 63 2K 2K 78643K 171 0 ifaddr 29 8K 9K 78643K 39 0 counters 39 33K 33K 78643K 39 0 ioctlops 0 0K 4K 78643K 1468 0 mount 1 1K 1K 78643K 1 0 vnodes 1181 74K 74K 78643K 1186 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 1K 1K 78643K 2 0 sem 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 196K 290K 78643K 12766 0 file desc 1 0K 12K 78643K 18 0 proc 59 63K 83K 78643K 398 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 11 0K 1K 78643K 22 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 18 79K 79K 78643K 18 0 exec 0 0K 1K 78643K 197 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 63 3K 12K 78643K 976 0 UVM aobj 2 2K 2K 78643K 2 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 4 0K 0K 78643K 7 0 temp 27 3003K 3069K 78643K 3327 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 4 0 2 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 17 0 15 1 0 1 1 0 8 0 rtentry 112 34 0 11 1 0 1 1 0 8 0 unpcb 120 29 0 19 1 0 1 1 0 8 0 syncache 264 5 0 5 1 0 1 1 0 8 1 tcpcb 544 8 0 5 1 0 1 1 0 8 0 inpcb 280 34 0 28 1 0 1 1 0 8 0 nd6 48 2 0 2 1 0 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 11 0 0 1 0 1 1 0 8 0 pfstkey 112 11 0 0 1 0 1 1 0 8 0 pfstate 328 11 0 0 1 0 1 1 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 167 0 47 11 0 11 11 0 8 2 art_table 32 168 0 47 2 0 2 2 0 8 0 art_node 16 33 0 12 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1424 0 25 46 0 46 46 0 8 0 ffsino 272 1424 0 25 94 0 94 94 0 8 0 nchpl 144 1654 0 59 60 0 60 60 0 8 0 uvmvnodes 72 1434 0 0 27 0 27 27 0 8 0 vnodes 208 1434 0 0 76 0 76 76 0 8 0 namei 1024 4175 0 4175 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 4114 0 4114 2 1 1 2 0 8 1 plimitpl 152 15 0 9 1 0 1 1 0 8 0 sigapl 432 225 0 215 2 0 2 2 0 8 0 knotepl 112 39 0 34 1 0 1 1 0 8 0 kqueuepl 104 2 0 1 1 0 1 1 0 8 0 pipepl 160 148 0 146 1 0 1 1 0 8 0 fdescpl 488 226 0 215 3 0 3 3 0 8 0 filepl 152 1141 0 1098 3 0 3 3 0 8 1 lockfpl 104 5 0 4 1 0 1 1 0 8 0 lockfspl 48 3 0 2 1 0 1 1 0 8 0 sessionpl 112 19 0 10 1 0 1 1 0 8 0 pgrppl 48 19 0 10 1 0 1 1 0 8 0 ucredpl 96 52 0 43 1 0 1 1 0 8 0 zombiepl 144 215 0 214 1 0 1 1 0 8 0 processpl 896 241 0 214 4 0 4 4 0 8 0 procpl 632 249 0 222 4 0 4 4 0 8 1 srpgc 64 2 0 2 1 0 1 1 0 8 1 sockpl 384 80 0 62 2 0 2 2 0 8 0 mcl4k 4096 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 80 0 0 10 0 10 10 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 128 0 0 8 0 8 8 0 8 0 bufpl 280 5944 0 1340 329 0 329 329 0 8 0 anonpl 16 22375 0 21186 14 1 13 13 0 125 6 amapchunkpl 152 858 0 823 5 0 5 5 0 158 3 amappl16 192 84 0 83 2 0 2 2 0 8 1 amappl15 184 62 0 58 1 0 1 1 0 8 0 amappl14 176 31 0 31 1 0 1 1 0 8 1 amappl12 160 4 0 4 1 1 0 1 0 8 0 amappl11 152 50 0 35 1 0 1 1 0 8 0 amappl10 144 13 0 11 1 0 1 1 0 8 0 amappl9 136 441 0 439 1 0 1 1 0 8 0 amappl8 128 93 0 89 1 0 1 1 0 8 0 amappl7 120 101 0 92 1 0 1 1 0 8 0 amappl6 112 55 0 53 1 0 1 1 0 8 0 amappl5 104 117 0 105 1 0 1 1 0 8 0 amappl4 96 496 0 470 1 0 1 1 0 8 0 amappl3 88 122 0 115 1 0 1 1 0 8 0 amappl2 80 957 0 903 3 0 3 3 0 8 1 amappl1 72 15561 0 15179 26 8 18 21 0 8 8 amappl 80 478 0 459 1 0 1 1 0 84 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 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 64 1 0 0 1 0 1 1 0 8 0 uaddrrnd 24 226 0 215 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 226 0 215 1 0 1 1 0 8 0 vmmpekpl 168 6204 0 6185 2 0 2 2 0 8 0 vmmpepl 168 33263 0 32480 87 5 82 82 0 357 43 vmsppl 368 225 0 215 2 0 2 2 0 8 0 pdppl 4096 459 0 430 6 0 6 6 0 8 1 pvpl 32 112684 0 109833 115 0 115 115 0 265 88 pmappl 232 225 0 215 1 0 1 1 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 142 0 3 4 0 4 4 0 8 0 ddb{1}>