From nobody Thu Feb 8 17:38:14 2024 X-Original-To: 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 4TW42Z26rPz5B5hF for ; Thu, 8 Feb 2024 17:38:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TW42Z0zT1z4bNS for ; Thu, 8 Feb 2024 17:38:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707413894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rURI4zxyFyBl5WZN/UxyCYiyFAcfDnicuUSZWMaeAgI=; b=Mm4e53T5CP0kFE+lUdqQkCf3d3EBYtj3DIESXJdfB3Jb/FtRu7ZE3TWl7Pv03su7FeN1qK 24NblWXUYbn90X775aCI2c8in9FRmT/0LHxn+k7OzGBBhdoUQZeUzACBHt8UPvwUg3TbKZ Aa75CyDyArB9ROTPdtUghkwn4p8TdKFDT/V0hwBhI9fsPWjS6YuQrL9PyYmNb5sNcZkBjY xkTpaFqdNcjlzGfxQ3jBnddb+soF5ATiFEYkSbicjdoaGvu1xLgfw5tNyf/wR/X7qjOPlm Xlq8iPfa6Tf7Ing+aUMfRFSnjJoBBpZTJmXaZIyqOJLFOgFXjeql8wX+Y5Odgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707413894; a=rsa-sha256; cv=none; b=DctRijSnB2P+eaHHESw4V7x3Hb9Em7GEluLQQtmbGbvyEGfeg3zcAYN8R0wA0EY++KCToE qibBA4e2vX8LGEW4FtkXT0XmPvYg5inBB+6TskisnXqn4inevI2400eqngEYph1lclBPEm oeJjIEXJ6e7ekX5ACqiYIFM0kueEAw/cluxVIiiManXZ8oCX4Fb2zqpkTfXr8FMchZb+6a wKebBaatb9jGwceSzUqBZfR7g51eSKgY++wexTrz1jVWC60CI44QIq2pOttZlHX1FWPK1O BhR2YTRiAx+CAofnuVv0b/Ni/vMpTwyjoS1f8QQ4l5rpJ/H/7T08bGtDYqR5Rw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TW42Y74zSzyrS for ; Thu, 8 Feb 2024 17:38:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 418HcDtc057425 for ; Thu, 8 Feb 2024 17:38:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 418HcD9K057424 for net@FreeBSD.org; Thu, 8 Feb 2024 17:38:13 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 276674] [panic] [htcp] sysctl net.inet.tcp.cc.algorithm=htcp produces kernel panic Date: Thu, 08 Feb 2024 17:38:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.2-STABLE X-Bugzilla-Keywords: crash, needs-qa X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rscheff@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276674 --- Comment #9 from Richard Scheffenegger --- Looking at the code in question, a div/0 could happen when cwnd < t_maxseg.= =20 While it's not clear why and how that may happen, addressing the div/0 shou= ld be easy by max(maxseg, cwnd)/maxseg so that this term will be at least 1, a= nd a div/0 is avoided. HTCP is not actively maintained, so tracking why cwnd could end up smaller = than maxseg would be more involved (running with active BBLog and extracting the relevant data once another crash happens; running BBlog continously will probably cost some performance. diff --git a/sys/netinet/cc/cc_htcp.c b/sys/netinet/cc/cc_htcp.c index d31720d0099f..a858558d7aa5 100644 --- a/sys/netinet/cc/cc_htcp.c +++ b/sys/netinet/cc/cc_htcp.c @@ -229,9 +229,9 @@ htcp_ack_received(struct cc_var *ccv, uint16_t type) * per RTT. */ CCV(ccv, snd_cwnd) +=3D (((htcp_data->alpha= << - HTCP_SHIFT) / (CCV(ccv, snd_cwnd) / - CCV(ccv, t_maxseg))) * CCV(ccv, t_maxse= g)) - >> HTCP_SHIFT; + HTCP_SHIFT) / (max(CCV(ccv, t_maxseg), + CCV(ccv, snd_cwnd)) / CCV(ccv, t_maxseg= ))) * + CCV(ccv, t_maxseg)) >> HTCP_SHIFT; } } } --=20 You are receiving this mail because: You are the assignee for the bug.=