NetBSD Problem Report #56289

From martin@aprisoft.de  Thu Jul  1 09:25:14 2021
Return-Path: <martin@aprisoft.de>
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 26EB11A921F
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  1 Jul 2021 09:25:14 +0000 (UTC)
Message-Id: <20210701092503.DBF225CC7E5@emmas.aprisoft.de>
Date: Thu,  1 Jul 2021 11:25:03 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: kernel spinout on macppc when runing ATF tests with LOCKDEBUG
X-Send-Pr-Version: 3.95

>Number:         56289
>Category:       port-macppc
>Synopsis:       kernel spinout on macppc when runing ATF tests with LOCKDEBUG
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-macppc-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 01 09:30:00 +0000 2021
>Closed-Date:    Fri Jul 02 10:29:21 +0000 2021
>Last-Modified:  Fri Jul 02 10:29:21 +0000 2021
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.86
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD gethsemane.aprisoft.de 9.99.86 NetBSD 9.99.86 (GETHSEMANE) #101: Thu Jul 1 10:04:58 CEST 2021 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/macppc/compile/GETHSEMANE macppc
Architecture: powerpc
Machine: macppc
>Description:

Running ATF tests with a LOCKDEBUG kernel triggers this on my machine:

[ 1125.5385404] Mutex error: mutex_vector_enter,517: spin lock held

[ 1125.5385404] lock address : 0x000000005f8b7430 type     :               spin
[ 1125.5385404] initialized  : 0x00000000001245f0
[ 1125.5385404] shared holds :                  0 exclusive:                  1
[ 1125.5385404] shares wanted:                  0 exclusive:                  0
[ 1125.5385404] relevant cpu :                  0 last held:                  0
[ 1125.5385404] relevant lwp : 0x000000001b00fd00 last held: 0x000000001b00fd00
[ 1125.5385404] last locked* : 0x0000000000517d64 unlocked : 0x000000000051178c
[ 1125.5385404] owner field  : 000000000000000000 wait/spin:                0/1

[ 1125.5385404] panic: LOCKDEBUG: Mutex error: mutex_vector_enter,517: spin lock held
[ 1125.5385404] cpu0: Begin traceback...
[ 1125.5385404] 0x16cf6940: at vpanic+0x12c
[ 1125.5385404] 0x16cf6970: at panic+0x50
[ 1125.5385404] 0x16cf69b0: at lockdebug_abort1+0x128
[ 1125.5385404] 0x16cf69d0: at mutex_enter+0x264
[ 1125.5385404] 0x16cf6a20: at iic_acquire_bus+0xb0
[ 1125.5385404] 0x16cf6a40: at tas3004_write+0xa4
[ 1125.5385404] 0x16cf6a60: at snapper_set_rate+0x28c
[ 1125.5385404] 0x16cf6a90: at snapper_trigger_input+0x48
[ 1125.5385404] 0x16cf6b00: at audio_rmixer_input+0xa4
[ 1125.5385404] 0x16cf6b40: at audio_rmixer_start+0x48
[ 1125.5385404] 0x16cf6b50: at audio_open.constprop.0+0x524
[ 1125.5385404] 0x16cf6c10: at audioopen+0x2a0
[ 1125.5385404] 0x16cf6c60: at spec_open+0x224
[ 1125.5385404] 0x16cf6cc0: at VOP_OPEN+0x4c
[ 1125.5385404] 0x16cf6ce0: at vn_open+0x30c
[ 1125.5385404] 0x16cf6e00: at do_open+0xf0
[ 1125.5385404] 0x16cf6e50: at do_sys_openat+0x9c
[ 1125.5385404] 0x16cf6e90: at sys_open+0x2c
[ 1125.5385404] 0x16cf6eb0: at syscall+0x368
[ 1125.5385404] 0x16cf6f20: user SC trap #5 by 0xfdc709f8: srr1=0xd032
[ 1125.5385404]             r1=0xffffe570 cr=0x24000444 xer=0 ctr=0xfdc709f0
[ 1125.5385404] cpu0: End traceback...
[ 1125.5385404] halting CPU 1
[ 1125.5385404] dumpsys: TBD
[ 1125.5385404] rebooting



>How-To-Repeat:
s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-macppc/56289: kernel spinout on macppc when runing ATF
 tests with LOCKDEBUG
Date: Thu, 1 Jul 2021 12:09:27 +0200

 The lockdebug info does not all make sense, but the lock was initialized
 at:

  0x1245f0 is in ki2c_intr (../../../../arch/macppc/dev/ki2c.c:286).

 Martin

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-macppc/56289: kernel spinout on macppc when runing ATF
 tests with LOCKDEBUG
Date: Thu, 1 Jul 2021 13:03:10 +0200

 Ignore that gdb info - accidently used a different kernel for gdb.

State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Fri, 02 Jul 2021 10:29:21 +0000
State-Changed-Why:
Jared fixed it in r1.60 of sys/arch/macppc/dev/snapper.c


>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.