NetBSD Problem Report #53078

From www@NetBSD.org  Wed Mar  7 23:27:36 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 B83CD7A182
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  7 Mar 2018 23:27:36 +0000 (UTC)
Message-Id: <20180307232735.999757A21F@mollari.NetBSD.org>
Date: Wed,  7 Mar 2018 23:27:35 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: bogus mutex asserts in a MULTIPROCESSOR kernel
X-Send-Pr-Version: www-1.0

>Number:         53078
>Category:       port-mips
>Synopsis:       broken mutexes in a MULTIPROCESSOR kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-mips-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 07 23:30:00 +0000 2018
>Closed-Date:    Wed Oct 23 01:15:45 +0000 2019
>Last-Modified:  Wed Oct 23 01:15:45 +0000 2019
>Originator:     coypu
>Release:        NetBSD 8.99.12
>Organization:
>Environment:
NetBSD  8.99.12 NetBSD 8.99.12 (ERLITE) #32: Thu Mar  8 01:07:10 IST 2018  fly@planets:/home/fly/mips64eb-gcc6-current/sys/arch/evbmips/compile/ERLITE evbmips

>Description:
if I add
  options MULTIPROCESSOR
  options LOCKDEBUG # Yes, this one is necessary too, and it's also a bug.

to the ERLITE kernel, I can boot it and reach userland.

but running atf tests, I get to things like:


    g_variable_syntax: [69.040000s] Passed.
    h_var_assign: [1.430000s] Passed.
    i_pipelines: Mutex error: mutex_vector_exit,742: not held by current CPU

lock address : 0x980000041ff1d600 type     :               spin
initialized  : 0xffffffff80242d08
shared holds :                  0 exclusive:                  1
shares wanted:                  0 exclusive:                  0
current cpu  :                  0 last held:                  1
current lwp  : 0x980000041b86baa0 last held: 0x980000041b86baa0
last locked* : 0xffffffff80242550 unlocked : 0xffffffff802436fc
owner field  : 000000000000000000 wait/spin:                0/1

xanic: Skekirnppeiln dg icargnasohs tiducm pas osne rtreiocun rs"civie- >cpain_imtc
 _cpoanuinct:  ==LO C-1KD" EBfUaGil: edM:u tefxi leer r"o/cr:u rrmuetntex/s_vrec/ctsyors/_ekexirnt,/7ke42r:n _nsyontc hh.elc"d , byli ncue rr67wi6 t miCP_sU
  tccpuh:0: c Bpeug0:in  cti_ramctex_baccouk.nt.. (
-2pi)d ! 2= 78-157 (48bl48o ckno wti tfoh unspdi
n-cmpuu0te: x Ehned ldtr)a
inFabauclkt.e.d .
k r mebidoo-ttirnagc.e.b.ac
; 
  aborting...

dump to dev 8,1 not possible
rebooting...

>How-To-Repeat:

>Fix:
Probably re-do the llsc mutex code.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Wed, 23 Oct 2019 01:15:45 +0000
State-Changed-Why:
uninformative bug report - it'll send someone on a loose chase. I vaguely recall someone looking at the mutex code and find it acceptable. the problem lies elsewhere.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.