NetBSD Problem Report #60614

From stix@stix.id.au  Mon Aug 17 12:15:19 2026
Return-Path: <stix@stix.id.au>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.netbsd.org", Issuer "YR2" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3FF061A923C
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 17 Aug 2026 12:15:19 +0000 (UTC)
Message-Id: <20260817120940.04E0219E9D@stix.id.au>
Date: Mon, 17 Aug 2026 22:09:40 +1000 (AEST)
From: stix@stix.id.au
Reply-To: stix@stix.id.au
To: gnats-bugs@NetBSD.org
Subject: Assert in gallium llvmpipe on Ryzen 9 7900
X-Send-Pr-Version: 3.95
X-From4GNATS: "stix@stix.id.au via gnats" <gnats-admin@NetBSD.org>

>Number:         60614
>Category:       lib
>Synopsis:       Assert in gallium llvmpipe on Ryzen 9 7900
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 17 12:20:00 +0000 2026
>Originator:     Paul Ripke
>Release:        NetBSD 11.0_STABLE 20260816
>Organization:
Paul Ripke
"Great minds discuss ideas, average minds discuss events, small minds
 discuss people."
-- Disputed: Often attributed to Eleanor Roosevelt. 1948.
>Environment:
System: NetBSD slave 11.0_STABLE NetBSD 11.0_STABLE (SLAVE) #0: Sat Aug 15 09:42:47 AEST 2026 stix@slave:/home/netbsd/netbsd-11/obj.amd64/home/netbsd/netbsd-11/src/sys/arch/amd64/compile/SLAVE amd64
Architecture: x86_64
Machine: amd64
>Description:

I am using llvmpipe due to lack of support. In netbsd-10, this worked without
issues. After upgrading to netbsd-11, some apps started failing, including
prusaslicer, freecad, xroar, etc. Failed assertions like:

libEGL warning: DRI2: failed to authenticate                                                                                                                                                                                                                                                                               
DefIdx 1 exceeds machine model writes for early-clobber renamable $ymm5, dead early-clobber renamable $ymm0 = VPGATHERDDYrm killed renamable $ymm5(tied-def 0), renamable $rcx, 1, killed renamable $ymm1, 0, $noreg, killed renamable $ymm0(tied-def 1) :: (load 32, align 1)                                             
 (Try with MCSchedModel.CompleteModel set to false)incomplete machine model                                                                                                                                                                                                                                                
UNREACHABLE executed at /home/netbsd/netbsd-11/src/external/apache2/llvm/librt/libLLVMCodeGen/../../lib/../dist/llvm/lib/CodeGen/TargetSchedule.cpp:246!                                                                                                                                                                   
Abort (core dumped)                                                                                                                                                                                                                                                                                                        

Some apps are still fine with OpenGL, e.g. chromium with webglsamples.

Additionally, starting apps with 'GALLIUM_DRIVER=softpipe' also works, but is
unusably slow.

>How-To-Repeat:

Start OpenGL app using llvmpipe. Likely only applies to Zen3 or Zen4
architectures, based on the patch below.

>Fix:

The following avoids the specific assertion above; I had also tried defining
NDEBUG, which just resulted in other assertions elsewhere, or build failures.

diff --git a/external/apache2/llvm/dist/llvm/lib/Target/X86/X86ScheduleZnver3.td b/external/apache2/llvm/dist/llvm/lib/Target/X86/X86ScheduleZnver3.td
index fae9b1b51ef1..1229f68760a5 100644
--- a/external/apache2/llvm/dist/llvm/lib/Target/X86/X86ScheduleZnver3.td
+++ b/external/apache2/llvm/dist/llvm/lib/Target/X86/X86ScheduleZnver3.td
@@ -60,7 +60,7 @@ def Znver3Model : SchedMachineModel {

   let PostRAScheduler = 1; // Enable Post RegAlloc Scheduler pass.

-  let CompleteModel = 1;
+  let CompleteModel = 0;
 }

 let SchedModel = Znver3Model in {

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.