NetBSD Problem Report #57000

From gson@gson.org  Wed Sep  7 13:38:05 2022
Return-Path: <gson@gson.org>
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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E92B01A921F
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  7 Sep 2022 13:38:04 +0000 (UTC)
Message-Id: <20220907133759.0345C2547A9@guava.gson.org>
Date: Wed,  7 Sep 2022 16:37:59 +0300 (EEST)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: i386 install fails with panic: x86_hotpatch_apply failed
X-Send-Pr-Version: 3.95

>Number:         57000
>Category:       port-i386
>Synopsis:       i386 install fails with panic: x86_hotpatch_apply failed
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    knakahara
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 07 13:40:00 +0000 2022
>Closed-Date:    Thu Sep 08 14:19:33 +0000 2022
>Last-Modified:  Thu Sep 08 14:19:33 +0000 2022
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current, source date >= 2022.09.07.00.34.19
>Organization:

>Environment:
System: NetBSD
Architecture: i386
Machine: i386
>Description:

The TNF i386 testbed is now failing at the install stage, with the
INSTALL kernel reporting "panic: x86_hotpatch_apply failed":

  http://releng.netbsd.org/b5reports/i386/commits-2022.09.html#2022.09.07.00.40.19

This is installing NetBSD/i386 in a qemu VM using NVMM acceleration.

The problem appears to have started with knakahara's commit
of 2022.09.07.00.40.19 with the commit message

  NetBSD/x86: Raise the number of interrupt sources per CPU from 32 to 56.

  There has been no objection for three years.
      https://mail-index.netbsd.org/port-amd64/2019/09/22/msg003012.html
  Implemented by nonaka@n.o, updated by me.

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/57000: i386 install fails with panic: x86_hotpatch_apply failed
Date: Wed, 7 Sep 2022 18:07:59 +0300

 This also happens on real hardware:

   [   1.5905409] panic: x86_hotpatch_apply failed
   [   1.5905409] cpu0: Begin traceback...
   [   1.5905409] vpanic(c0ec24d8,c1803ef8,c1803ef8,c04b193f,c0ec24d8,c1803f24,c0127f82,ffffffff,202,c04b1a85) at netbsd:vpanic+0x196
   [   1.5905409] panic(c0ec24d8,c1803f24,c0127f82,ffffffff,202,c04b1a85,6,0,0,0) at netbsd:panic+0x18
   [   1.5905409] x86_hotpatch_cleanup(ffffffff,202,c04b1a85,6,0,0,0,0,0,c1803f60) at netbsd:x86_hotpatch_cleanup+0x1d
   [   1.5905409] x86_hotpatch(0,0,1fe49000,0,c1803f60,c095d472,c0f1a038,1,1,c15b4040) at netbsd:x86_hotpatch+0x32
   [   1.5905409] cpu_boot_secondary_processors(c15b4040,4,64,0,0,0,0,0,15430000,0) at netbsd:cpu_boot_secondary_processors+0x15
   [   1.5905409] main(0,0,0,0,0,0,0,0,0,0) at netbsd:main+0x3ca
   [   1.5905409] cpu0: End traceback...
   [   2.4026139] fatal breakpoint trap in supervisor mode
   [   2.4618804] trap type 1 code 0 eip 0xc0128134 cs 0x8 eflags 0x2 cr2 0 ilevel 0 esp 0xc1803edc
   [   2.5638009] curlwp 0xc15c7b40 pid 0 lid 0 lowest kstack 0xc18012c0
   Stopped in pid 0.0 (system) at	netbsd:breakpoint+0x4:	popl	%ebp
   db{0}>

 The full log is at

   https://www.gson.org/netbsd/bugs/build/i386-laptop/2022/2022.09.07.11.37.25/install.log

 -- 
 Andreas Gustafsson, gson@gson.org

Responsible-Changed-From-To: port-i386-maintainer->knakahara
Responsible-Changed-By: knakahara@NetBSD.org
Responsible-Changed-When: Thu, 08 Sep 2022 01:12:01 +0000
Responsible-Changed-Why:
mine


State-Changed-From-To: open->feedback
State-Changed-By: knakahara@NetBSD.org
State-Changed-When: Thu, 08 Sep 2022 06:59:34 +0000
State-Changed-Why:


From: "Kengo NAKAHARA" <knakahara@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57000 CVS commit: src/sys/arch/i386/i386
Date: Thu, 8 Sep 2022 06:57:44 +0000

 Module Name:	src
 Committed By:	knakahara
 Date:		Thu Sep  8 06:57:44 UTC 2022

 Modified Files:
 	src/sys/arch/i386/i386: lock_stubs.S spl.S

 Log Message:
 Fix PR port-i386/57000 (boot failure on qemu).


 To generate a diff of this commit:
 cvs rdiff -u -r1.37 -r1.38 src/sys/arch/i386/i386/lock_stubs.S
 cvs rdiff -u -r1.56 -r1.57 src/sys/arch/i386/i386/spl.S

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed
State-Changed-By: gson@NetBSD.org
State-Changed-When: Thu, 08 Sep 2022 14:19:33 +0000
State-Changed-Why:
Confirmed fixed.  Thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.