From nobody Thu Oct 5 10:27:39 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 4S1SRv3q1zz4wD0Q for ; Thu, 5 Oct 2023 10:27:39 +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 4S1SRv2dYpz3P2v for ; Thu, 5 Oct 2023 10:27:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696501659; a=rsa-sha256; cv=none; b=w3qdOzQ1GfHWx0bcGXMb7yLOXLlCfJjbDchQrxzsI7EQOrXd9glvzL6sMTOx150FQ8MXAl 3NO5dKm/dalTkVFc4x2fjRoslbcnSD0XB/sDDwAhS7fkS0E7bSDZjBizMwHzqtfM3K5Gte ihRCSPUPr8ua/7Gd60/F+hUlILEWS8qqd1WMWU5LbgFkR4LpZA2YkCAHZ7psvJvZbV47sV /sd+4jCPg/h+oqI6cD2DI0j8DV7zQYmeOflX+sazqqiO/OBEGeTG6W3NHyLUvw5X8j8r3c ke7r1GlhlrAM/m+9bvtwHekg436SrUGTl4tfq//Wbwa2067XwM/VOyq6gdvUPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696501659; 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=u14CxuysRfpSFr361TsgRzE8JhB+EowRqexFjVEYyao=; b=XGzl+Ji5nrMnFDKz0i5d1RG8WVob8yo/4nO3wRZejWXibIRQhNxYMSjmj6PaH/9vyRW08r IaeGjC/ykokDxgH6BlPN0vZUIM+jRiqfLOiPpGZLAgd2cUIS/SS7UM0Y5pbC3kvK9iv4sO 6gXHvKoK7wVq7Ih5TWQFwEqAQGkIrWYJiESsLLoUA7dS1n0Zzvyjmo3ZOugqEA8HVSYy6Z tugQplZbGKQI1uBd9fX0WSqFhyeoB/dYGBIjEmmSLdPwXilA0Iw6WE2KlXP5i468lPwYma gy19S9ZWEfFwF6f+ab89Yh2/iZw0OdvK3AcIC8GxPmKB5EjIbYGvEkK2wBeFLg== 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 4S1SRv1jXzz1GdR for ; Thu, 5 Oct 2023 10:27:39 +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 395ARdo8034328 for ; Thu, 5 Oct 2023 10:27:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 395ARdoa034327 for bugs@FreeBSD.org; Thu, 5 Oct 2023 10:27:39 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 274278] "debug.late_console=0" option causes kernel panic Date: Thu, 05 Oct 2023 10:27:39 +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.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: oliver.giersch@b-tu.de 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 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274278 Bug ID: 274278 Summary: "debug.late_console=3D0" option causes kernel panic Product: Base System Version: 13.2-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: oliver.giersch@b-tu.de Setting "debug.late_console=3D0" in loader.conf leads to machdep.c:hammer_t= ime to initialize console device(s) before `getmemsize` is called. This causes a kernel panic: "pmap_mapdev_internal:too many preinit mappings= ", with the following callstack (examined through QEMU+GDB): pmap_mapdev_internal@0xffffffff808cf591 (/usr/local/src/freebsd/sys/amd64/amd64/pmap.c:9094) pmap_mapdev_attr@0xffffffff808cf518 (/usr/local/src/freebsd/sys/amd64/amd64/pmap.c:9150) vt_efifb_init@0xffffffff803cc9f2 (/usr/local/src/freebsd/sys/dev/vt/hw/efifb/efifb.c:143) vtterm_cnprobe@0xffffffff803d0852 (/usr/local/src/freebsd/sys/dev/vt/vt_core.c:1677) termcn_cnprobe@0xffffffff805555df (/usr/local/src/freebsd/sys/kern/subr_terminal.c:579) cninit@0xffffffff80435f79 (/usr/local/src/freebsd/sys/kern/kern_cons.c:166) hammer_time@0xffffffff808b349e (/usr/local/src/freebsd/sys/amd64/amd64/machdep.c:1532) btext@0xffffffff8029ffc0 (/usr/local/src/freebsd/sys/amd64/amd64/locore.S:7= 8) >From a quick look at the code, the cause of the panic seems to stem from th= is: `pmap_mapdev_internal` expects `virtual_avail` (defined in amd64/pmap.c) to= be initialized to a non-zero value, but `virtual_avail` is only initialized in `pmap_bootstrap`, which is called during execution of `getmemsize`, i.e., a= fter the attempted early console init. --=20 You are receiving this mail because: You are the assignee for the bug.=