From nobody Mon Jan 13 19:01:59 2025 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YX1pL4RPKz5khJG for ; Mon, 13 Jan 2025 19:02:02 +0000 (UTC) (envelope-from michael.tuexen@lurchi.franken.de) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Certum Domain Validation CA SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YX1pL2TTqz3SS5; Mon, 13 Jan 2025 19:02:02 +0000 (UTC) (envelope-from michael.tuexen@lurchi.franken.de) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (p200300cd6f319900b1dba7325b9d9fc4.dip0.t-ipconnect.de [IPv6:2003:cd:6f31:9900:b1db:a732:5b9d:9fc4]) (Authenticated sender: lurchi) by mail-n.franken.de (Postfix) with ESMTPSA id 02C83721E281C; Mon, 13 Jan 2025 20:01:59 +0100 (CET) Content-Type: text/plain; charset=us-ascii List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.300.87.4.3\)) Subject: Re: panic: tcp_do_segment: sent too much From: Michael Tuexen In-Reply-To: Date: Mon, 13 Jan 2025 20:01:59 +0100 Cc: freebsd-net@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <020C5409-C587-4D06-B764-1AD0C5783AB2@lurchi.franken.de> References: To: Kyle Evans X-Mailer: Apple Mail (2.3826.300.87.4.3) X-Rspamd-Queue-Id: 4YX1pL2TTqz3SS5 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:193.174.0.0/15, country:DE] > On 13. Jan 2025, at 02:44, Kyle Evans wrote: >=20 > Hi, >=20 > I seem to have hit this panic during normal laptop usage with a = -CURRENT running at 2832af7b4ea256b18ef4dbf2ff97a50765f0609a: >=20 > panic: tcp_do_segment: sent too much > cpuid =3D 5 > time =3D 1736731772 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xfffffe015b74b9b0 > vpanic() at vpanic+0x136/frame 0xfffffe015b74bae0 > panic() at panic+0x43/frame 0xfffffe015b74bb40 > tcp_do_segment() at tcp_do_segment+0x2998/frame 0xfffffe015b74bc20 > tcp_input_with_port() at tcp_input_with_port+0x10f8/frame = 0xfffffe015b74bd70 > tcp_input() at tcp_input+0xb/frame 0xfffffe015b74bd80 > ip_input() at ip_input+0x28f/frame 0xfffffe015b74bde0 > swi_net() at swi_net+0x19b/frame 0xfffffe015b74be60 > ithread_loop() at ithread_loop+0x266/frame 0xfffffe015b74bef0 > fork_exit() at fork_exit+0x82/frame 0xfffffe015b74bf30 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe015b74bf30 >=20 > Doing a little bit of inspection: >=20 > (kgdb) print tp->t_dupacks > $1 =3D 1 > (kgdb) print tp->snd_limited > $6 =3D 0 '\000' > (kgdb) p/x tp->t_flags > $4 =3D 0x10000264 > (kgdb) print maxseg > $1 =3D 1428 >=20 > `sent` appears to be optimized out. As far as I know, I don't hit = this one often, but I'm wondering if there's anything else useful I = could extract here / if anyone has a theory about what happened. Hi Kyle, you can run your system with TCP black box logging enabled by using sysctl net.inet.tcp.bb.log_auto_all=3D1 sysctl net.inet.tcp.bb.log_auto_ratio=3D1 sysctl net.inet.tcp.bb.log_auto_mode=3D1 Also have the tcplog_dumper running. You can use tcplog_dumper_enable=3D"YES" in /etc/rc.conf You can install tcplog_dumper by pkg intall tcplog_dumper Using these settings (mode =3D TCP_LOG_STATE_TAIL), keeps the trailing = events of all TCP connections, but does not dump anything to disk. If = the kernel panics, we can get the BBLog information from the core. Please note that Gleb has just committed two fixes which also address a = panic() like the one you are experiencing. Best regards Michael >=20 > Thanks, >=20 > Kyle Evans >=20