panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ef27d) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2540) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2540) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_disconnect(ffff800000ac2540) at tcp_disconnect+0x229 sys/netinet/tcp_usrreq.c:678 tcp_usrreq(fffffd805da75e18,6,0,0,0,ffff80001d6f4138) at tcp_usrreq+0x478 sys/netinet/tcp_usrreq.c:274 soclose(fffffd805da75e18,0) at soclose+0x2c8 sodisconnect sys/kern/uipc_socket.c:423 [inline] soclose(fffffd805da75e18,0) at soclose+0x2c8 sys/kern/uipc_socket.c:313 soo_close(fffffd8057636808,ffff80001d6f4138) at soo_close+0x40 fdrop(fffffd8057636808,ffff80001d6f4138) at fdrop+0xc2 sys/kern/kern_descrip.c:1279 closef(fffffd8057636808,ffff80001d6f4138) at closef+0x117 sys/kern/kern_descrip.c:1263 fdfree(ffff80001d6f4138) at fdfree+0x100 sys/kern/kern_descrip.c:1195 exit1(ffff80001d6f4138,0,0,1) at exit1+0x32c sys/kern/kern_exit.c:197 sys_exit(ffff80001d6f4138,ffff80001e7c1a00,ffff80001e7c1a50) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff80001e7c1ad0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc3dd0, count: 1 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(ffffffff823ef27d) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2540) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2540) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_disconnect(ffff800000ac2540) at tcp_disconnect+0x229 sys/netinet/tcp_usrreq.c:678 tcp_usrreq(fffffd805da75e18,6,0,0,0,ffff80001d6f4138) at tcp_usrreq+0x478 sys/netinet/tcp_usrreq.c:274 soclose(fffffd805da75e18,0) at soclose+0x2c8 sodisconnect sys/kern/uipc_socket.c:423 [inline] soclose(fffffd805da75e18,0) at soclose+0x2c8 sys/kern/uipc_socket.c:313 soo_close(fffffd8057636808,ffff80001d6f4138) at soo_close+0x40 fdrop(fffffd8057636808,ffff80001d6f4138) at fdrop+0xc2 sys/kern/kern_descrip.c:1279 closef(fffffd8057636808,ffff80001d6f4138) at closef+0x117 sys/kern/kern_descrip.c:1263 fdfree(ffff80001d6f4138) at fdfree+0x100 sys/kern/kern_descrip.c:1195 exit1(ffff80001d6f4138,0,0,1) at exit1+0x32c sys/kern/kern_exit.c:197 sys_exit(ffff80001d6f4138,ffff80001e7c1a00,ffff80001e7c1a50) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff80001e7c1ad0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc3dd0, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e7c1470 rbx 0xffff80001e7c1520 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8147206f kprintf+0x15f r9 0x1 r10 0x2 r11 0x39f543c345715207 r12 0x3000000008 r13 0xffff80001e7c1480 r14 0x100 r15 0x1 rip 0xffffffff81e985d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e7c1460 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=10817 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6f3028,0xffff80001d6f3c68 process=0xffff80001d6e8030 user=0xffff80001e7bc000, vmspace=0xfffffd8058ebd340 estcpu=36, cpticks=3, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 94957 241951 8460 0 2 0 syz-executor.1 94957 55446 8460 0 3 0x4000080 fsleep syz-executor.1 65349 352783 0 0 3 0x14280 nfsidl nfsio 37843 301659 0 0 3 0x14280 nfsidl nfsio 64459 108280 0 0 3 0x14280 nfsidl nfsio 79241 359541 0 0 3 0x14280 nfsidl nfsio 19025 210553 0 0 3 0x14280 nfsidl nfsio 40 275557 0 0 3 0x14280 nfsidl nfsio 70768 484384 0 0 3 0x14280 nfsidl nfsio 75209 343190 0 0 3 0x14280 nfsidl nfsio 28628 206560 0 0 3 0x14280 nfsidl nfsio 92074 162988 0 0 3 0x14280 nfsidl nfsio 14024 37627 0 0 3 0x14280 nfsidl nfsio 16439 126984 0 0 3 0x14280 nfsidl nfsio 25765 375236 0 0 3 0x14280 nfsidl nfsio 29098 229974 0 0 3 0x14280 nfsidl nfsio 81155 519020 0 0 3 0x14280 nfsidl nfsio 82440 330718 0 0 3 0x14280 nfsidl nfsio 25005 468758 0 0 3 0x14280 nfsidl nfsio 1794 139593 0 0 3 0x14280 nfsidl nfsio 95434 412989 0 0 3 0x14280 nfsidl nfsio 29883 282392 0 0 3 0x14280 nfsidl nfsio 67660 215743 0 0 3 0x14200 acct acct 33636 88187 0 0 3 0x14200 bored sosplice 76388 377783 75595 0 3 0x82 nanosleep syz-executor.0 8460 520865 75595 0 3 0x82 nanosleep syz-executor.1 75595 118561 66301 0 3 0x82 thrsleep syz-fuzzer 75595 456700 66301 0 3 0x4000082 thrsleep syz-fuzzer 75595 269990 66301 0 3 0x4000082 thrsleep syz-fuzzer 75595 278030 66301 0 3 0x4000082 thrsleep syz-fuzzer 75595 498602 66301 0 3 0x4000082 thrsleep syz-fuzzer 75595 364814 66301 0 3 0x4000082 thrsleep syz-fuzzer 75595 39915 66301 0 3 0x4000082 thrsleep syz-fuzzer 75595 32508 66301 0 3 0x4000082 kqread syz-fuzzer 66301 349520 46429 0 3 0x10008a pause ksh 46429 159104 75324 0 3 0x92 select sshd 41035 61826 1 0 3 0x100083 ttyin getty 75324 371955 1 0 3 0x80 select sshd 6016 21133 84308 73 3 0x100090 kqread syslogd 84308 62216 1 0 3 0x100082 netio syslogd 25358 19223 1 77 3 0x100090 poll dhclient 34435 296031 1 0 3 0x80 poll dhclient 9368 472911 0 0 3 0x14200 bored smr 68393 238044 0 0 2 0x14200 zerothread 42280 84548 0 0 3 0x14200 aiodoned aiodoned 58659 123037 0 0 3 0x14200 syncer update 1210 376545 0 0 3 0x14200 cleaner cleaner 85493 516050 0 0 3 0x14200 reaper reaper 83889 434472 0 0 3 0x14200 pgdaemon pagedaemon 79313 121915 0 0 3 0x14200 bored crynlk 40421 308097 0 0 3 0x14200 bored crypto 34596 334621 0 0 3 0x40014200 acpi0 acpi0 80695 383000 0 0 3 0x14200 bored softnet 25307 175598 0 0 3 0x14200 bored systqmp 6866 448826 0 0 3 0x14200 bored systq 83321 115800 0 0 3 0x40014200 bored softclock 11995 43225 0 0 3 0x40014200 idle0 1 198258 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 9524 6423K 7303K 78643K 14082 0 pcb 13 8K 8K 78643K 153 0 rtable 140 22K 26K 78643K 1162 0 ifaddr 118 25K 25K 78643K 393 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 17K 78643K 41 0 ioctlops 0 0K 4K 78643K 181 0 iov 0 0K 32K 78643K 172 0 mount 1 1K 1K 78643K 1 0 vnodes 1219 77K 77K 78643K 2153 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 8 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 130 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 6 17K 25K 78643K 812 0 sigio 0 0K 0K 78643K 20 0 proc 52 38K 63K 78643K 440 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 153 0 in_multi 111 4K 4K 78643K 234 0 ether_multi 1 0K 0K 78643K 26 0 mrt 0 0K 0K 78643K 12 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 49 228K 228K 78643K 49 0 exec 0 0K 1K 78643K 283 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 153 105K 105K 78643K 2855 0 UVM aobj 33 4K 5K 78643K 51 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 126 0 NDP 14 0K 0K 78643K 47 0 temp 153 3904K 3971K 78643K 26275 0 kqueue 3 4K 14K 78643K 56 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 10 0 2 1 0 1 1 0 8 0 rtpcb 80 81 0 79 1 0 1 1 0 8 0 rtentry 112 84 0 50 2 0 2 2 0 8 0 unpcb 120 649 0 641 1 0 1 1 0 8 0 syncache 264 25 0 25 6 5 1 1 0 8 1 tcpqe 32 138 0 138 3 3 0 1 0 8 0 tcpcb 544 389 0 381 1 0 1 1 0 8 0 inpcb 296 1070 0 1060 3 1 2 2 0 8 1 rttmr 72 3 0 3 1 1 0 1 0 8 0 nd6 48 18 0 16 1 0 1 1 0 8 0 pkpcb 40 8 0 8 2 1 1 1 0 8 1 pfstscr 40 5 0 0 1 0 1 1 0 8 0 pfosfp 40 1 0 0 1 0 1 1 0 8 0 pfosfpen 112 1 0 0 1 0 1 1 0 8 0 pfrke_plain 160 202 0 194 1 0 1 1 0 8 0 pfrktable 1344 324 0 303 5 2 3 3 0 8 1 pftag 88 48 0 44 2 1 1 1 0 8 0 pfstitem 24 9 0 0 1 0 1 1 0 8 0 pfstkey 112 9 0 0 1 0 1 1 0 8 0 pfstate 328 5 0 0 1 0 1 1 0 8 0 pfrule 1360 74 0 44 3 0 3 3 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 412 0 246 14 2 12 13 0 8 0 art_table 32 413 0 246 2 0 2 2 0 8 0 art_node 16 79 0 49 1 0 1 1 0 8 0 sysvmsgpl 40 32 0 10 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 128 0 118 1 0 1 1 0 8 0 shmpl 112 49 0 18 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2595 0 1200 88 0 88 88 0 8 0 ffsino 240 2595 0 1200 83 0 83 83 0 8 0 nchpl 144 3956 0 2362 60 0 60 60 0 8 0 rtmask 32 6 0 4 1 0 1 1 0 8 0 uvmvnodes 72 3416 0 0 63 0 63 63 0 8 0 vnodes 208 3416 0 0 180 0 180 180 0 8 0 namei 1024 11772 0 11772 2 1 1 1 0 8 1 vcpupl 1984 11 0 1 2 0 2 2 0 8 0 vmpool 528 23 0 13 1 0 1 1 0 8 0 pfiaddrpl 120 102 0 82 2 1 1 1 0 8 0 scxspl 192 11542 0 11542 1 0 1 1 0 8 1 plimitpl 152 86 0 79 1 0 1 1 0 8 0 sigapl 424 1020 0 969 6 0 6 6 0 8 0 futexpl 56 19195 0 19194 2 1 1 1 0 8 0 knotepl 112 126 0 107 1 0 1 1 0 8 0 kqueuepl 144 480 0 476 1 0 1 1 0 8 0 pipelkpl 16 222 0 212 1 0 1 1 0 8 0 pipepl 120 444 0 425 3 1 2 2 0 8 1 fdescpl 432 984 0 969 2 0 2 2 0 8 0 filepl 120 7199 0 7099 5 1 4 5 0 8 0 lockfpl 104 239 0 238 1 0 1 1 0 8 0 lockfspl 48 80 0 79 1 0 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 23 0 13 1 0 1 1 0 8 0 ucredpl 96 757 0 750 1 0 1 1 0 8 0 zombiepl 144 970 0 969 1 0 1 1 0 8 0 processpl 920 1020 0 969 7 0 7 7 0 8 0 procpl 624 1998 0 1939 6 1 5 5 0 8 0 sosppl 128 11 0 11 4 3 1 1 0 8 1 sockpl 400 1817 0 1797 6 3 3 4 0 8 0 mcl64k 65536 865 0 865 66 65 1 65 0 8 1 mcl16k 16384 16 0 16 2 1 1 1 0 8 1 mcl12k 12288 21 0 21 4 3 1 1 0 8 1 mcl9k 9216 14 0 14 2 2 0 1 0 8 0 mcl8k 8192 34 0 34 4 3 1 1 0 8 1 mcl4k 4096 100 0 100 3 2 1 1 0 8 1 mcl2k2 2112 7 0 7 3 2 1 1 0 8 1 mcl2k 2048 78088 0 78028 19 9 10 14 0 8 0 mtagpl 96 478 0 50 12 1 11 11 0 8 0 mbufpl 256 131713 0 130682 116 31 85 85 0 8 19 bufpl 280 4959 0 131 345 0 345 345 0 8 0 anonpl 16 105426 0 88859 87 16 71 83 0 107 2 amapchunkpl 152 4753 0 4586 31 24 7 19 0 158 0 amappl16 192 5107 0 4195 67 18 49 59 0 8 3 amappl15 184 397 0 394 1 0 1 1 0 8 0 amappl14 176 25 0 21 1 0 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 393 0 389 1 0 1 1 0 8 0 amappl11 152 452 0 439 1 0 1 1 0 8 0 amappl10 144 15 0 11 1 0 1 1 0 8 0 amappl9 136 370 0 369 1 0 1 1 0 8 0 amappl8 128 343 0 295 2 0 2 2 0 8 0 amappl7 120 104 0 93 1 0 1 1 0 8 0 amappl6 112 425 0 415 1 0 1 1 0 8 0 amappl5 104 920 0 907 1 0 1 1 0 8 0 amappl4 96 823 0 796 1 0 1 1 0 8 0 amappl3 88 140 0 132 1 0 1 1 0 8 0 amappl2 80 7072 0 6997 2 0 2 2 0 8 0 amappl1 72 26504 0 26078 24 15 9 17 0 8 0 amappl 80 2217 0 2169 2 0 2 2 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 50 0 18 1 0 1 1 0 8 0 uaddrrnd 24 1007 0 982 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1007 0 982 1 0 1 1 0 8 0 vmmpekpl 168 9610 0 9577 2 0 2 2 0 8 0 vmmpepl 168 121840 0 119713 139 38 101 114 0 357 8 vmsppl 272 1006 0 982 3 1 2 2 0 8 0 pdppl 4096 2020 0 1974 7 1 6 6 0 8 0 pvpl 32 296795 0 277572 195 16 179 193 0 265 21 pmappl 200 1006 0 982 3 1 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 429 0 122 10 0 10 10 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(ffffffff823ef27d) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2540) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2540) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_disconnect(ffff800000ac2540) at tcp_disconnect+0x229 sys/netinet/tcp_usrreq.c:678 tcp_usrreq(fffffd805da75e18,6,0,0,0,ffff80001d6f4138) at tcp_usrreq+0x478 sys/netinet/tcp_usrreq.c:274 soclose(fffffd805da75e18,0) at soclose+0x2c8 sodisconnect sys/kern/uipc_socket.c:423 [inline] soclose(fffffd805da75e18,0) at soclose+0x2c8 sys/kern/uipc_socket.c:313 soo_close(fffffd8057636808,ffff80001d6f4138) at soo_close+0x40 fdrop(fffffd8057636808,ffff80001d6f4138) at fdrop+0xc2 sys/kern/kern_descrip.c:1279 closef(fffffd8057636808,ffff80001d6f4138) at closef+0x117 sys/kern/kern_descrip.c:1263 fdfree(ffff80001d6f4138) at fdfree+0x100 sys/kern/kern_descrip.c:1195 exit1(ffff80001d6f4138,0,0,1) at exit1+0x32c sys/kern/kern_exit.c:197 sys_exit(ffff80001d6f4138,ffff80001e7c1a00,ffff80001e7c1a50) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff80001e7c1ad0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc3dd0, count: -14 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ef27d) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2540) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2540) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_disconnect(ffff800000ac2540) at tcp_disconnect+0x229 sys/netinet/tcp_usrreq.c:678 tcp_usrreq(fffffd805da75e18,6,0,0,0,ffff80001d6f4138) at tcp_usrreq+0x478 sys/netinet/tcp_usrreq.c:274 soclose(fffffd805da75e18,0) at soclose+0x2c8 sodisconnect sys/kern/uipc_socket.c:423 [inline] soclose(fffffd805da75e18,0) at soclose+0x2c8 sys/kern/uipc_socket.c:313 soo_close(fffffd8057636808,ffff80001d6f4138) at soo_close+0x40 fdrop(fffffd8057636808,ffff80001d6f4138) at fdrop+0xc2 sys/kern/kern_descrip.c:1279 closef(fffffd8057636808,ffff80001d6f4138) at closef+0x117 sys/kern/kern_descrip.c:1263 fdfree(ffff80001d6f4138) at fdfree+0x100 sys/kern/kern_descrip.c:1195 exit1(ffff80001d6f4138,0,0,1) at exit1+0x32c sys/kern/kern_exit.c:197 sys_exit(ffff80001d6f4138,ffff80001e7c1a00,ffff80001e7c1a50) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff80001e7c1ad0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc3dd0, count: -14