🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.bugs
Article #341

[Bug 300487] crash on resume if microcode update is configured and applicable

#341
From: bugzilla-noreply
Date: Tue, 03 Nov 2026 18:35
87 lines
5285 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300487

            Bug ID: 300487
           Summary: crash on resume if microcode update is configured and
                    applicable
           Product: Base System
           Version: 15.1-STABLE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: avg@FreeBSD.org

The affected system runs on AMD processor and is configured to apply microcode
updates via preloaded image:

cpu_microcode_load="YES"
cpu_microcode_name="/boot/firmware/amd-ucode.bin"

Typically, I do not suspend the system, but it "happened".
On resume, the system crashed.

Thanks to serial console the crash got logged.

Fatal trap 9: general protection fault while in kernel mode^M
cpuid = 0; apic id = 00^M
instruction pointer     = 0x20:0xffffffff80d8736f^M
stack pointer           = 0x28:0xfffffe03172ce9c0^M
frame pointer           = 0x28:0xfffffe03172ce9f0^M
processor eflags        = resume, IOPL = 0^M
current thread          = 77297/552357 (acpiconf/acpiconf)^M
rdi: ffffffff820a35d6 rsi: 0000000000000001 rdx: 00000000ffffffff^M
rcx: 00000000c0010020  r8: ffffffff80f5d9bf  r9: ffffffff80fae827^M
rax: 00000000820a35d6 rbx: ffffffff820a35d6 rbp: fffffe03172ce9f0^M
r10: 0000000000000070 r11: ffffffff80efdb07 r12: 0000000000000000^M
r13: 000000000a201016 r14: 0000000000000000 r15: 0000000000000000^M
^M
^M
Fatal trap 9: general protection fault while in kernel mode^M
cpuid = 0; apic id = 00^M
instruction pointer     = 0x20:0xffffffff80dd993c^M
stack pointer           = 0x28:0xfffffe03172ce390^M
frame pointer           = 0x28:0xfffffe03172ce390^M
processor eflags        = resume, IOPL = 0^M
current thread          = 77297/552357 (acpiconf/acpiconf)^M
rdi: 0000000000004400 rsi: 0000000000000001 rdx: 0000000000000001^M
rcx: 0000000000000830  r8: 0000000000004401  r9: 0000000000000001^M
rax: 0000000000004400 rbx: 0000000000000000 rbp: fffffe03172ce390^M
r10: 0000000000000002 r11: fffffe03172ce341 r12: 000000000000fffc^M
r13: 0000000080000000 r14: 0000000000000001 r15: fffffe03172ce400^M

The second block repeated about 10 times after which the system just hung.

The first reported instruction pointer, 0xffffffff80d8736f, is in
ucode_amd_load:
   0xffffffff80d87361 <+65>:    mov    %rbx,%rdx
   0xffffffff80d87364 <+68>:    shr    $0x20,%rdx
   0xffffffff80d87368 <+72>:    mov    %ebx,%eax
   0xffffffff80d8736a <+74>:    mov    $0xc0010020,%ecx
   0xffffffff80d8736f <+79>:    wrmsr

It seems that the resume code applies microcode updates just like the boot code
does.
But it looks like the microcode image gets freed, via ucode_release(), after it
is used during the boot.
That was not a problem before commit base 16f21c5af350 (bug 294630) because the
image was copied into its own buffer, but now ucode_data and early_ucode_data
are left pointing to the released memory.

debug.ucode.release=0 can be used as a workaround.

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <bug-300487-227@https.bugs.freebsd.org/bugzilla/>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: bugzilla-noreply@freebsd.org
Newsgroups: muc.lists.freebsd.bugs
Subject: [Bug 300487] crash on resume if microcode update is configured and
 applicable
Date: Tue, 03 Nov 2026 18:35:56 +0000
Organization: Newsgate at muc.de e.V.
Sender: owner-freebsd-bugs@FreeBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <bug-300487-227@https.bugs.freebsd.org/bugzilla/>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="51335"; mail-complaints-to="news-admin@muc.de"
X-Original-To: bugs@mlmmj.nyi.freebsd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1793730956;
	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=C8moSO9YKch/V3ADa1RB9hnPgm0AFbB/ch8ORlGp1Tg=;
	b=YruLaYqeroAmt8AVFw0DSbpaqpZm42VOuASYqM1HRSC+S4SA6IycTKCUOgQaSWiW/Hv5uu
	xLVNdEIwJQyeSY2UwL1r5RsOvi7pOeI4aNLILNNxmExa1q9KPc1N5gLNKRiilwKoB15yeO
	4iblo9WlOXjLcmsBYyYwsJ4iIdmIrosFBSRYo+Oi/SHxluMYSt43BKxcE8yTdbO5qDoZzK
	02Vgwd+E2msvFQjeced3OL0Blu+Oq8tJKx/ZGmM3tXP+Dpaa5L+yrAS71V8KnSGO7Pmj/P
	FewOdL5BrVCg1boUaWwaECC7VrFRUu7quep704nVvNwPxR02QlA3WYIcZm6gnw==
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
Auto-Submitted: auto-generated
Precedence: list
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes