panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *484163 78172 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823f875f) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6b7d8,9,fffffd8058c26100,0,0,ffff80001d71d120) at tcp_usrreq+0xa54 sosend(fffffd805da6b7d8,0,ffff80001d723458,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d120,4,ffff80001d723458,0,ffff80001d723540) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d120,ffff80001d7234f0,ffff80001d723540) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7235c0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe8260, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic tcp_output: template len != hdrlen - optlen ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823f875f) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6b7d8,9,fffffd8058c26100,0,0,ffff80001d71d120) at tcp_usrreq+0xa54 sosend(fffffd805da6b7d8,0,ffff80001d723458,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d120,4,ffff80001d723458,0,ffff80001d723540) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d120,ffff80001d7234f0,ffff80001d723540) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7235c0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe8260, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d722fc0 rbx 0xffff80001d723070 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff813428af kprintf+0x15f r9 0x1 r10 0x2 r11 0x9cb2c7e0b22efa24 r12 0x3000000008 r13 0xffff80001d722fd0 r14 0x100 r15 0x1 rip 0xffffffff81f2faa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d722fb0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=484163 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d71d870,0xffff80001d71cc50 process=0xffff80001d706af8 user=0xffff80001d71e000, vmspace=0xfffffd806bc09cc0 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 99919 461063 0 0 3 0x14200 bored sosplice 60713 444708 0 0 3 0x14200 acct acct 37138 98661 69940 0 3 0x82 piperd syz-executor.0 37423 50817 69940 0 2 0x482 syz-executor.1 69940 93905 1338 0 3 0x82 thrsleep syz-fuzzer 69940 108 1338 0 2 0x4000482 syz-fuzzer 69940 380211 1338 0 3 0x4000082 thrsleep syz-fuzzer 69940 339766 1338 0 3 0x4000082 thrsleep syz-fuzzer 69940 486632 1338 0 3 0x4000082 thrsleep syz-fuzzer 69940 427613 1338 0 2 0x4000002 syz-fuzzer 69940 386437 1338 0 3 0x4000082 thrsleep syz-fuzzer 69940 385071 1338 0 3 0x4000082 thrsleep syz-fuzzer 1338 68437 78172 0 3 0x10008a pause ksh *78172 484163 21669 0 7 0x12 sshd 71442 226827 1 0 3 0x100083 ttyin getty 21669 443132 1 0 3 0x80 select sshd 95614 381571 28603 73 3 0x100090 kqread syslogd 28603 247827 1 0 3 0x100082 netio syslogd 33534 338294 1 77 3 0x100090 poll dhclient 64646 288188 1 0 3 0x80 poll dhclient 51826 41506 0 0 3 0x14200 bored smr 31361 2568 0 0 2 0x14200 zerothread 9786 225545 0 0 3 0x14200 aiodoned aiodoned 34161 171155 0 0 3 0x14200 syncer update 64307 496691 0 0 3 0x14200 cleaner cleaner 31254 214859 0 0 3 0x14200 reaper reaper 33256 42030 0 0 3 0x14200 pgdaemon pagedaemon 5142 37175 0 0 3 0x14200 bored crynlk 28137 229768 0 0 3 0x14200 bored crypto 46902 241909 0 0 3 0x40014200 acpi0 acpi0 59163 219727 0 0 3 0x14200 bored softnet 32617 330023 0 0 3 0x14200 bored systqmp 38948 90533 0 0 3 0x14200 bored systq 71479 403078 0 0 3 0x40014200 bored softclock 21315 362177 0 0 3 0x40014200 idle0 1 99050 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9448 6323K 6840K 78643K 10658 0 pcb 13 8K 8K 78643K 21 0 rtable 84 2K 4K 78643K 220 0 ifaddr 38 9K 10K 78643K 47 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 4K 78643K 47 0 mount 1 1K 1K 78643K 1 0 vnodes 1219 77K 77K 78643K 1245 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 0K 0K 78643K 2 0 sem 5 0K 0K 78643K 6 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 4 9K 25K 78643K 75 0 proc 47 38K 63K 78643K 358 0 subproc 32 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 12 0 in_multi 30 2K 2K 78643K 39 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 37 175K 175K 78643K 37 0 exec 0 0K 1K 78643K 187 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 116 22K 23K 78643K 1007 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 5 0K 0K 78643K 9 0 temp 60 3847K 3911K 78643K 2403 0 kqueue 3 4K 6K 78643K 5 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 6 0 0 1 0 1 1 0 8 0 rtpcb 80 19 0 17 1 0 1 1 0 8 0 rtentry 112 46 0 13 2 0 2 2 0 8 0 unpcb 120 35 0 27 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 252 0 252 2 2 0 1 0 8 0 tcpcb 544 30 0 25 1 0 1 1 0 8 0 inpcb 296 86 0 78 3 1 2 2 0 8 1 nd6 48 6 0 0 1 0 1 1 0 8 0 pfrktable 1344 10 0 10 1 1 0 1 0 8 0 pfrule 1360 4 0 4 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 219 0 72 12 1 11 12 0 8 0 art_table 32 220 0 72 2 0 2 2 0 8 0 art_node 16 45 0 16 1 0 1 1 0 8 0 semapl 112 4 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1470 0 69 88 0 88 88 0 8 0 ffsino 240 1470 0 69 83 0 83 83 0 8 0 nchpl 144 1756 0 165 60 0 60 60 0 8 0 uvmvnodes 72 1535 0 0 28 0 28 28 0 8 0 vnodes 208 1535 0 0 81 0 81 81 0 8 0 namei 1024 4397 0 4397 3 2 1 1 0 8 1 pfiaddrpl 120 2 0 2 1 1 0 1 0 8 0 scxspl 192 5047 0 5047 4 3 1 1 0 8 1 plimitpl 152 14 0 7 1 0 1 1 0 8 0 sigapl 424 263 0 234 4 0 4 4 0 8 0 futexpl 56 817 0 817 1 0 1 1 0 8 1 knotepl 112 63 0 44 1 0 1 1 0 8 0 kqueuepl 144 6 0 4 1 0 1 1 0 8 0 pipepl 272 72 0 62 2 1 1 1 0 8 0 fdescpl 432 247 0 234 2 0 2 2 0 8 0 filepl 120 1251 0 1156 4 0 4 4 0 8 1 lockfpl 104 15 0 14 1 0 1 1 0 8 0 lockfspl 48 7 0 6 1 0 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 78 0 71 1 0 1 1 0 8 0 zombiepl 144 234 0 233 3 2 1 1 0 8 0 processpl 928 263 0 233 4 0 4 4 0 8 0 procpl 624 323 0 286 4 0 4 4 0 8 0 sosppl 128 2 0 2 1 0 1 1 0 8 1 sockpl 400 140 0 122 4 1 3 4 0 8 1 mcl12k 12288 2 0 2 1 1 0 1 0 8 0 mcl9k 9216 3 0 3 2 1 1 1 0 8 1 mcl8k 8192 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 11 0 11 2 2 0 1 0 8 0 mcl2k 2048 94991 0 94932 16 8 8 15 0 8 0 mtagpl 96 18 0 2 2 1 1 1 0 8 0 mbufpl 256 148232 0 148104 16 4 12 14 0 8 0 bufpl 280 3351 0 126 231 0 231 231 0 8 0 anonpl 16 38687 0 23673 63 2 61 61 0 107 0 amapchunkpl 152 1091 0 968 8 1 7 8 0 158 0 amappl16 192 1097 0 271 42 0 42 42 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 41 0 35 1 0 1 1 0 8 0 amappl13 168 27 0 24 2 1 1 1 0 8 0 amappl12 160 11 0 7 1 0 1 1 0 8 0 amappl11 152 68 0 58 1 0 1 1 0 8 0 amappl10 144 11 0 6 1 0 1 1 0 8 0 amappl9 136 28 0 26 1 0 1 1 0 8 0 amappl8 128 314 0 279 2 0 2 2 0 8 0 amappl7 120 104 0 92 1 0 1 1 0 8 0 amappl6 112 48 0 43 2 1 1 1 0 8 0 amappl5 104 890 0 880 1 0 1 1 0 8 0 amappl4 96 417 0 393 1 0 1 1 0 8 0 amappl3 88 125 0 118 1 0 1 1 0 8 0 amappl2 80 1144 0 1087 3 1 2 2 0 8 0 amappl1 72 14385 0 13989 23 13 10 17 0 8 0 amappl 80 540 0 503 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 247 0 234 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 247 0 234 1 0 1 1 0 8 0 vmmpekpl 168 5818 0 5791 2 0 2 2 0 8 0 vmmpepl 168 38224 0 36411 144 39 105 114 0 357 19 vmsppl 272 246 0 234 2 1 1 2 0 8 0 pdppl 4096 500 0 468 6 1 5 6 0 8 0 pvpl 32 131632 0 113724 159 12 147 147 0 265 1 pmappl 200 246 0 234 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 247 0 24 7 0 7 7 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823f875f) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6b7d8,9,fffffd8058c26100,0,0,ffff80001d71d120) at tcp_usrreq+0xa54 sosend(fffffd805da6b7d8,0,ffff80001d723458,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d120,4,ffff80001d723458,0,ffff80001d723540) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d120,ffff80001d7234f0,ffff80001d723540) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7235c0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe8260, count: -9 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823f875f) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6b7d8,9,fffffd8058c26100,0,0,ffff80001d71d120) at tcp_usrreq+0xa54 sosend(fffffd805da6b7d8,0,ffff80001d723458,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d120,4,ffff80001d723458,0,ffff80001d723540) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d120,ffff80001d7234f0,ffff80001d723540) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7235c0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe8260, count: -9