From nobody Mon Mar 13 00:20:58 2023 X-Original-To: bugs@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 4PZckz00Lmz3xrMr for ; Mon, 13 Mar 2023 00:20:59 +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 4PZcky578Bz3Ql0 for ; Mon, 13 Mar 2023 00:20:58 +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=1678666858; 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; bh=8MsiWEfcDNbnKPtDlOJ0tkKH4pl4c8pl7d1U3BM+TyI=; b=yx/JDxcSLlRBo+wYZCTgBnp2JLo6vyyEWXceZsQO8jHG6vFOFiiQwm00XbyvrVeust/MCF vEMw+RvN81HKHl/s4yt7LrVfwMWkt+q9i0k2+NsuqllJ8nsBfUCBopPQyfIXQOm1x9ttfs RLWaTdzta5dN76kWUPnUjTk34jLuRLVmHbSVRXWRSoUZJXHgyJkFQ8vh0XuxfQad9DM1CQ r57fi5XvBLT0S32TmaNM9SgTIiF+NV8QiVYIq7Xd7hs4KakShFYd3Q/+iEtahLM13uGW6y 02dw8vSdqtickdgV3n+CeSQI51Dqq2GGGZXjR8lKu0NBFXh3s+T0vMni6BeXpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678666858; a=rsa-sha256; cv=none; b=crAak+eZOWo8p3acKajKpZXPV92GUhDqeHf2zA7SZWlYZqayuOfsWFFlUha43eLTcJu2/6 LXeBH9jxF5cHrgj+S3oOSfHiR/DqSu+1n4BmMHlazBbHV3nb7ASOkky0Mi11IdXza7JY7Q NH1JoPde/k0L3Y9HroahSb4eqSMbFCNacJG5mCmYyOa3ORuzTGQ0r3yUiDpLmeiWi7RBkD 7hqDW24JC2GbnN3vob7U9MeCgUS5+sApGw6PV684Iy1iAtj2SdLedF0r1Mf/LDu4+bynMg eSwGBjVIZBNvg+MxNdbyctuKZYOwv0O6Unt0HIgxP+CFAQG2XAwzuKeB8O9eMw== 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 4PZcky4CpwzXFv for ; Mon, 13 Mar 2023 00:20:58 +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 32D0Kw6c079475 for ; Mon, 13 Mar 2023 00:20:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 32D0KwWp079474 for bugs@FreeBSD.org; Mon, 13 Mar 2023 00:20:58 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: bugs@FreeBSD.org Subject: [Bug 270166] Upgrade to/new install of RELEASE 13.1 causes boot freeze (subr_clockcalib.c) Date: Mon, 13 Mar 2023 00:20:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kronenpj@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270166 Bug ID: 270166 Summary: Upgrade to/new install of RELEASE 13.1 causes boot freeze (subr_clockcalib.c) Product: Base System Version: 13.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: kronenpj@gmail.com Created attachment 240805 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D240805&action= =3Dedit Hack to correct described problem w/instrumentation Addition of and changes related to sys/kern/subr_clockcalib.c causes infini= te loop / 1+ CPU 100% usage during boot. The termination condition of the loop= is indeterminate. System details: Virtualized FreeBSD 13.x KVM guest on Fedora Linux 37, AMD Ryzen 9 3900XT 12-Core Processor. After bisection to commit baee6cc1814b8e851555d2caa6410eedcef2c6c8, added instrumentation printfs. This isolated the problem to the exit condition for clockcalib. The cpu() call never returned a value larger than 4294967295 wh= en calibrating the LAPIC timer. The proposed solution (hack) captures the last clk() value and aborts the cpu_spinwait() loop if the current clk() and last value are the same. Becau= se freq in this situation always ends up at 0, which causes a divide-by-zero e= rror in the calling routine. A check for this condition with a return of 1 inste= ad is included. I acknowledge there are cleaner ways to correct this problem, and I explore= d a kernel command-line option to fall-back to the previous behavior if desired= . I have not figured how to accomplish this. --=20 You are receiving this mail because: You are the assignee for the bug.=