NetBSD Problem Report #57363

From www@netbsd.org  Mon Apr 17 23:12:44 2023
Return-Path: <www@netbsd.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 B15961A9239
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 17 Apr 2023 23:12:44 +0000 (UTC)
Message-Id: <20230417231243.1BB451A923A@mollari.NetBSD.org>
Date: Mon, 17 Apr 2023 23:12:43 +0000 (UTC)
From: ltning-netbsd@anduin.net
Reply-To: ltning-netbsd@anduin.net
To: gnats-bugs@NetBSD.org
Subject: sb (Sound Blaster) driver causes endless panic loop on boot
X-Send-Pr-Version: www-1.0

>Number:         57363
>Category:       kern
>Synopsis:       sb (Sound Blaster) driver causes endless panic loop on boot
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          feedback
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 17 23:15:00 +0000 2023
>Closed-Date:    
>Last-Modified:  Tue Aug 01 15:05:01 +0000 2023
>Originator:     Eirik Øverby
>Release:        10-BETA
>Organization:
Modirum
>Environment:
>Description:
On a dual Pentium Pro machine with ISA+PCI bus and a Sound Blaster 32 PnP, 10-BETA kernel will panic immediately upon trying to init the sound card and continue to panic in a loop until after 1-2 minutes it reboots.

Text scrolls too quickly to determine the exact panic messages, however a partial transcript of the initial panic is below.

This sound card works flawlessly on 9.3.

Panic (note the text overwriting the expected output):

attimer0: attached to pcppi0
isapnp0: read port 0x203
sb1 at isapnp0 port 0x220/16,0x330/2,0x388/4 irq 5 drq 1,5
sb1: Creative SB32 PnP Audiopanic: kernel diagnostic assertion "mutex_owned(&sc->sc_intr_lock)" failed: file "/usr/src/sys/dev/isa/sbdsp.c", line 916
cpu0: begin traceback
vpanic(c12d4b18,c19f6b04,c19f6b20,c036e3d3,c12d4b12,c12d4a7f,c12ff7d0,c131819b3,394,c201c140) at netbsd:vpanic+0x196
kern_assert(c12d4b18,c12d4a7f,c12ff7d0,c13189b3,394,c209c140,c209c140,c209c158,c19f6b48,c036fb30) at netbsd:kern_assert+0x23
sbdsp_set_in_ports(c209c140,20,c133980d,c19f6b54,c209c154,c209c140,c209a744,c166b018,c19f6b8c,c037134d) at netbsd:sbdsp_set_in_ports+0x194
sbdsp_attach(c209c140,c19f6b8c,c04d5288,c2093c00,c1339c8a,c209a75c,c209a79c,c036f695,c209c140,c209c140) at netbsd:sbdsp_attach+0x35
......

Output from 9.3:
attimer0: attached to pcppi0
isapnp0: read port 0x203
sb1 at isapnp0 port 0x220/16,0x330/2,0x388/4 irq 5 drq 1,5
sb1: Creative SB32 PnP Audio: dsp v4.13
audio0 at sb1: playback, capture, half duplex, independent
audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for playback
audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for recording
mpu0 at sb1
midi1 at mpu0: SB MPU-401 MIDI UART
opl0 at sb1: model OPL3
midi2 at opl0: SB Yamaha OPL3
wdc2 at isapnp0 port 0x168/8,0x36e/2 irq 10: Creative SB32 PnP IDE
atabus2 at wdc2 channel 0
isapnp0: <Creative SB32 PnP, CTL0021, , WaveTable> port 0x620/4 not configured
joy0 at isapnp0 port 0x200/8
joy0: Creative SB32 PnP Game
joy0: joystick not connected
isapnp0: <Creative SB32 PnP, CTL0051, , StereoEnhance> port 0x100/1 not configured

>How-To-Repeat:
Install SB32 PnP card, boot 10-BETA.
>Fix:
Add "userconf=disable sb*" to boot.cfg

>Release-Note:

>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57363 CVS commit: src/sys/dev
Date: Tue, 18 Apr 2023 06:37:25 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Tue Apr 18 06:37:25 UTC 2023

 Modified Files:
 	src/sys/dev/isapnp: sb_isapnp.c
 	src/sys/dev/ofisa: sb_ofisa.c

 Log Message:
 sb(4): Fix missing mutex initialization at isapnp and ofisa.

 PR kern/57363

 XXX pullup-8
 XXX pullup-9
 XXX pullup-10


 To generate a diff of this commit:
 cvs rdiff -u -r1.53 -r1.54 src/sys/dev/isapnp/sb_isapnp.c
 cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ofisa/sb_ofisa.c

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

State-Changed-From-To: open->feedback
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Tue, 18 Apr 2023 08:01:47 +0000
State-Changed-Why:
Candidate fix committed.  Can you try a new kernel from HEAD?

If you don't want to build one yourself, you can wait until tomorrow
and use the autobuild product which will be here when ready:
https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/i386/binary/kernel/netbsd-GENERIC.gz
(but the build hasn't finished yet -- you can check
https://releng.netbsd.org/cgi-bin/builds.cgi
for the next HEAD build on 2023-04-18 or later to see when it's done)


From: Taylor R Campbell <riastradh@NetBSD.org>
To: ltning-netbsd@anduin.net
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/57363: sb (Sound Blaster) driver causes endless panic loop on boot
Date: Tue, 18 Apr 2023 08:04:58 +0000

 Also, when you say `panic loop', do you mean that:

 (a) the OS keeps scrolling panic output without rebooting, or
 (b)the OS panics, reboots, and panics again on reboot?

 If (a), can you discern any other output on the screen after the first
 panic?  That's definitely something that shouldn't happen.

From: =?UTF-8?Q?Eirik_=c3=98verby?= <ltning-netbsd@anduin.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/57363: sb (Sound Blaster) driver causes endless panic loop
 on boot
Date: Tue, 18 Apr 2023 11:00:33 +0200

 I mean (a); see https://anduin.net/~ltning/netbsd-isapnp-crash2.png for 
 a semi-sharp picture of the first (I think) panic that happens after the 
 one I transcribed. I believe it's the "trap (number 1)" that is being 
 repeated over and over a few hundred times before the machine reboots.

 This is filmed at 60fps so you can tell it's scrolling fast..

 /Eirik

 On 4/18/23 10:10, Taylor R Campbell wrote:
 > The following reply was made to PR kern/57363; it has been noted by GNATS.
 > 
 > From: Taylor R Campbell <riastradh@NetBSD.org>
 > To: ltning-netbsd@anduin.net
 > Cc: gnats-bugs@NetBSD.org
 > Subject: Re: kern/57363: sb (Sound Blaster) driver causes endless panic loop on boot
 > Date: Tue, 18 Apr 2023 08:04:58 +0000
 > 
 >   Also, when you say `panic loop', do you mean that:
 >   
 >   (a) the OS keeps scrolling panic output without rebooting, or
 >   (b)the OS panics, reboots, and panics again on reboot?
 >   
 >   If (a), can you discern any other output on the screen after the first
 >   panic?  That's definitely something that shouldn't happen.
 >   
 > 

From: Taylor R Campbell <riastradh@NetBSD.org>
To: ltning-netbsd@anduin.net
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/57363: sb (Sound Blaster) driver causes endless panic loop on boot
Date: Tue, 18 Apr 2023 20:00:08 +0000

 OK, the `i82489_icr_wait: busy' panic loop is PR port-i386/52525.

 Frustrating, apparently it's been reported since 2008 and nobody has
 figured it out, probably because most users have moved on to newer
 Intel CPUs...

 https://mail-index.netbsd.org/current-users/2008/07/20/msg003622.html
 https://gnats.netbsd.org/37787
 https://mail-index.netbsd.org/port-amd64/2015/10/27/msg002323
 https://gnats.netbsd.org/52525

 So let's focus on the soundblaster panic here.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57363 CVS commit: [netbsd-10] src/sys/dev
Date: Tue, 1 Aug 2023 14:57:27 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Tue Aug  1 14:57:27 UTC 2023

 Modified Files:
 	src/sys/dev/isapnp [netbsd-10]: sb_isapnp.c
 	src/sys/dev/ofisa [netbsd-10]: sb_ofisa.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #286):

 	sys/dev/isapnp/sb_isapnp.c: revision 1.54
 	sys/dev/ofisa/sb_ofisa.c: revision 1.24

 sb(4): Fix missing mutex initialization at isapnp and ofisa.
 PR kern/57363


 To generate a diff of this commit:
 cvs rdiff -u -r1.53 -r1.53.28.1 src/sys/dev/isapnp/sb_isapnp.c
 cvs rdiff -u -r1.23 -r1.23.18.1 src/sys/dev/ofisa/sb_ofisa.c

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

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57363 CVS commit: [netbsd-9] src/sys/dev
Date: Tue, 1 Aug 2023 14:59:57 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Tue Aug  1 14:59:57 UTC 2023

 Modified Files:
 	src/sys/dev/isapnp [netbsd-9]: sb_isapnp.c
 	src/sys/dev/ofisa [netbsd-9]: sb_ofisa.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #1689):

 	sys/dev/isapnp/sb_isapnp.c: revision 1.54
 	sys/dev/ofisa/sb_ofisa.c: revision 1.24

 sb(4): Fix missing mutex initialization at isapnp and ofisa.
 PR kern/57363


 To generate a diff of this commit:
 cvs rdiff -u -r1.53 -r1.53.2.1 src/sys/dev/isapnp/sb_isapnp.c
 cvs rdiff -u -r1.19 -r1.19.2.1 src/sys/dev/ofisa/sb_ofisa.c

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

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57363 CVS commit: [netbsd-8] src/sys/dev
Date: Tue, 1 Aug 2023 15:01:56 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Tue Aug  1 15:01:56 UTC 2023

 Modified Files:
 	src/sys/dev/isapnp [netbsd-8]: sb_isapnp.c
 	src/sys/dev/ofisa [netbsd-8]: sb_ofisa.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #1870):

 	sys/dev/isapnp/sb_isapnp.c: revision 1.54
 	sys/dev/ofisa/sb_ofisa.c: revision 1.24

 sb(4): Fix missing mutex initialization at isapnp and ofisa.
 PR kern/57363


 To generate a diff of this commit:
 cvs rdiff -u -r1.52 -r1.52.84.1 src/sys/dev/isapnp/sb_isapnp.c
 cvs rdiff -u -r1.18 -r1.18.8.1 src/sys/dev/ofisa/sb_ofisa.c

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.