login: panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 10366 67962 0 0x12 0 1 sshd 212603 90596 0 0x14000 0x200 0 reaper db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82420d55) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ad7660) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ad7660) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eaefaf8,9,fffffd806f300600,0,0,ffff800020e4d760) at tcp_usrreq+0xa55 sosend(fffffd806eaefaf8,0,ffff800020e24628,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020e4d760,4,ffff800020e24628,0,ffff800020e24710) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020e4d760,ffff800020e246c0,ffff800020e24710) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e24790) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e24790) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffde890, 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(ffffffff82420d55) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ad7660) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ad7660) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eaefaf8,9,fffffd806f300600,0,0,ffff800020e4d760) at tcp_usrreq+0xa55 sosend(fffffd806eaefaf8,0,ffff800020e24628,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020e4d760,4,ffff800020e24628,0,ffff800020e24710) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020e4d760,ffff800020e246c0,ffff800020e24710) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e24790) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e24790) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffde890, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020e24190 rbx 0xffff800020e24240 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffff800020e24150 r9 0xffffffff81379bbf kprintf+0x16f r10 0x1 r11 0x938c5896ecae81b8 r12 0x3000000008 r13 0xffff800020e241a0 r14 0x100 r15 0x1 rip 0xffffffff81f0e6b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020e24180 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (sshd) pid=10366 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020e4d4f0,0xffffffff82939488 process=0xffff8000ffffe018 user=0xffff800020e1f000, vmspace=0xfffffd806e90c178 estcpu=0, cpticks=0, pctcpu=0.2 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *67962 10366 10819 0 7 0x12 sshd 92576 235224 1 0 3 0x100083 ttyin getty 10819 468519 1 0 3 0x80 select sshd 26750 230977 7371 74 3 0x100092 bpf pflogd 7371 385585 1 0 3 0x80 netio pflogd 76632 392731 26914 73 3 0x100090 kqread syslogd 26914 260906 1 0 3 0x100082 netio syslogd 93600 293121 1 77 3 0x100090 poll dhclient 26945 357022 1 0 3 0x80 poll dhclient 99867 168516 0 0 3 0x14200 bored smr 67014 52184 0 0 2 0x14200 zerothread 82467 117947 0 0 3 0x14200 aiodoned aiodoned 58353 474114 0 0 3 0x14200 syncer update 95795 312711 0 0 3 0x14200 cleaner cleaner 90596 212603 0 0 7 0x14200 reaper 36201 479467 0 0 3 0x14200 pgdaemon pagedaemon 52430 322219 0 0 3 0x14200 bored crynlk 88964 30267 0 0 3 0x14200 bored crypto 10323 122136 0 0 3 0x40014200 acpi0 acpi0 62805 132639 0 0 3 0x40014200 idle1 78455 378727 0 0 3 0x14200 bored softnet 90538 81164 0 0 3 0x14200 bored systqmp 51259 107972 0 0 3 0x14200 bored systq 8758 226003 0 0 3 0x40014200 bored softclock 90262 189955 0 0 3 0x40014200 idle0 1 58984 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 0: exclusive mutex &uvm.fpageqlock r = 0 (0xffffffff828eca20) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #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:1254 #4 pmap_do_remove+0x68b sys/arch/amd64/amd64/pmap.c:1871 #5 uvm_map_teardown+0x195 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:176 [inline] #5 uvm_map_teardown+0x195 sys/uvm/uvm_map.c:2739 #6 uvmspace_free+0x86 sys/uvm/uvm_map.c:3646 #7 uvm_exit+0x29 sys/uvm/uvm_glue.c:297 #8 reaper+0x189 sys/kern/kern_exit.c:456 #9 proc_trampoline+0x1c Process 67962 (sshd) thread 0xffff800020e4d760 (10366) exclusive rwlock netlock r = 0 (0xffffffff82716f68) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 solock+0x5a sys/kern/uipc_socket2.c:282 #2 sosend+0x559 sys/kern/uipc_socket.c:543 #3 dofilewritev+0x1b6 sys/kern/sys_generic.c:365 #4 sys_write+0x83 sys/kern/sys_generic.c:285 #5 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] #5 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 #6 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9461 6392K 6394K 78643K 10557 0 pcb 13 8K 8K 78643K 13 0 rtable 61 2K 2K 78643K 167 0 ifaddr 29 8K 9K 78643K 39 0 counters 39 33K 33K 78643K 41 0 ioctlops 0 0K 4K 78643K 1468 0 mount 1 1K 1K 78643K 1 0 vnodes 1183 74K 75K 78643K 1188 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 1824 197K 290K 78643K 13058 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 19 95K 95K 78643K 19 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 56 2K 12K 78643K 954 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 4 0K 0K 78643K 7 0 temp 24 3849K 3913K 78643K 1874 0 kqueue 2 2K 4K 78643K 3 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 12 1 0 1 1 0 8 0 unpcb 120 29 0 19 1 0 1 1 0 8 0 syncache 264 5 0 5 2 1 1 1 0 8 1 tcpcb 544 8 0 5 1 0 1 1 0 8 0 inpcb 296 34 0 28 1 0 1 1 0 8 0 nd6 48 3 0 3 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 144 0 48 9 0 9 9 0 8 3 art_table 32 145 0 48 2 0 2 2 0 8 1 art_node 16 33 0 13 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1422 0 27 88 0 88 88 0 8 0 ffsino 272 1422 0 27 94 0 94 94 0 8 0 nchpl 144 1644 0 59 61 1 60 60 0 8 0 uvmvnodes 72 1432 0 0 27 0 27 27 0 8 0 vnodes 208 1432 0 0 76 0 76 76 0 8 0 namei 1024 4245 0 4245 2 1 1 1 0 8 1 percpumem 16 31 0 1 1 0 1 1 0 8 0 scxspl 192 4564 0 4564 8 1 7 7 0 8 7 plimitpl 152 15 0 9 1 0 1 1 0 8 0 sigapl 424 241 0 215 4 0 4 4 0 8 0 knotepl 112 48 0 43 1 0 1 1 0 8 0 kqueuepl 144 2 0 1 1 0 1 1 0 8 0 pipepl 304 78 0 77 2 1 1 1 0 8 0 fdescpl 496 226 0 215 3 0 3 3 0 8 0 filepl 152 1119 0 1076 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 62 0 53 1 0 1 1 0 8 0 zombiepl 144 215 0 214 2 1 1 1 0 8 0 processpl 992 241 0 214 5 0 5 5 0 8 1 procpl 624 247 0 220 3 0 3 3 0 8 0 sockpl 400 80 0 62 2 0 2 2 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 76 0 0 10 0 10 10 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 141 0 0 8 0 8 8 0 8 0 bufpl 280 2987 0 126 205 0 205 205 0 8 0 anonpl 16 22170 0 21010 14 2 12 12 0 124 5 amapchunkpl 152 883 0 847 5 0 5 5 0 158 3 amappl16 192 155 0 151 2 0 2 2 0 8 1 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 3 0 3 1 0 1 1 0 8 1 amappl13 168 24 0 24 2 1 1 1 0 8 1 amappl12 160 23 0 21 1 0 1 1 0 8 0 amappl11 152 50 0 35 1 0 1 1 0 8 0 amappl10 144 20 0 18 1 0 1 1 0 8 0 amappl9 136 206 0 205 1 0 1 1 0 8 0 amappl8 128 280 0 279 1 0 1 1 0 8 0 amappl7 120 113 0 107 1 0 1 1 0 8 0 amappl6 112 32 0 30 1 0 1 1 0 8 0 amappl5 104 134 0 120 1 0 1 1 0 8 0 amappl4 96 491 0 465 1 0 1 1 0 8 0 amappl3 88 127 0 119 1 0 1 1 0 8 0 amappl2 80 904 0 855 3 1 2 2 0 8 0 amappl1 72 15185 0 14817 23 5 18 18 0 8 8 amappl 80 477 0 458 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 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 6448 0 6425 2 0 2 2 0 8 0 vmmpepl 168 32927 0 32175 82 9 73 73 0 357 32 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 113185 0 110380 109 5 104 104 0 265 77 pmappl 232 225 0 215 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 234 0 4 7 0 7 7 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff82752ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x5f sys/dev/kcov.c:86 mtx_enter(ffffffff82797820) at mtx_enter+0x4b sys/kern/kern_lock.c:266 msleep(ffffffff828b71e8,ffffffff82797820,4,ffffffff824aaf2d,0) at msleep+0x242 reaper(ffff800020d89380) at reaper+0xcb sys/kern/kern_exit.c:427 end trace frame: 0x0, count: 8 ddb{0}> trace x86_ipi_db(ffffffff82752ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x5f sys/dev/kcov.c:86 mtx_enter(ffffffff82797820) at mtx_enter+0x4b sys/kern/kern_lock.c:266 msleep(ffffffff828b71e8,ffffffff82797820,4,ffffffff824aaf2d,0) at msleep+0x242 reaper(ffff800020d89380) at reaper+0xcb sys/kern/kern_exit.c:427 end trace frame: 0x0, count: -7 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x18: addq $0x8,%rsp db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82420d55) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ad7660) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ad7660) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eaefaf8,9,fffffd806f300600,0,0,ffff800020e4d760) at tcp_usrreq+0xa55 sosend(fffffd806eaefaf8,0,ffff800020e24628,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020e4d760,4,ffff800020e24628,0,ffff800020e24710) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020e4d760,ffff800020e246c0,ffff800020e24710) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e24790) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e24790) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffde890, count: 6 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82420d55) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ad7660) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ad7660) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eaefaf8,9,fffffd806f300600,0,0,ffff800020e4d760) at tcp_usrreq+0xa55 sosend(fffffd806eaefaf8,0,ffff800020e24628,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020e4d760,4,ffff800020e24628,0,ffff800020e24710) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020e4d760,ffff800020e246c0,ffff800020e24710) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e24790) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e24790) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffde890, count: -9 ddb{1}>