NetBSD Problem Report #51380

From www@NetBSD.org  Sat Jul 30 14:48:15 2016
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7D09B7A271
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 30 Jul 2016 14:48:15 +0000 (UTC)
Message-Id: <20160730144813.D67747A28B@mollari.NetBSD.org>
Date: Sat, 30 Jul 2016 14:48:13 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: Mutex error: mutex_vector_enter: locking against myself
X-Send-Pr-Version: www-1.0

>Number:         51380
>Category:       port-arm
>Synopsis:       Mutex error: mutex_vector_enter: locking against myself
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-arm-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 30 14:50:00 +0000 2016
>Closed-Date:    Sat Nov 24 01:20:32 +0000 2018
>Last-Modified:  Sat Nov 24 01:20:32 +0000 2018
>Originator:     Sevan Janiyan
>Release:        NetBSD-HEAD
>Organization:
>Environment:
>Description:
Attempting to boot the NetBSD-HEAD snapshot on a BeagleBone Black results in a panic 

U-Boot# fatload mmc 0:1 82000000 netbsd-beaglebone.ub 
reading netbsd-beaglebone.ub
3837716 bytes read in 213 ms (17.2 MiB/s)
U-Boot# bootm 82000000
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   NetBSD/beagle 7.99.34
   Created:      2016-07-29  14:28:13 UTC
   Image Type:   ARM NetBSD Kernel Image (uncompressed)
   Data Size:    3837652 Bytes = 3.7 MiB
   Load Address: 80300000
   Entry Point:  80300000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
## Transferring control to NetBSD stage-2 loader (at address 80300000) ...

uboot arg = 0x9e730fb0, 0, 0x9f7a0af1, 0x9f7a0af1
[ Kernel symbol table missing! ]
Loaded initial symtab at 0x8063ed58, strtab at 0x80673da8, # entries 12751
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 7.99.34 (BEAGLEBONE.201607291230Z)
total memory = 512 MB
avail memory = 500 MB
sysctl_createv: sysctl_create(machine_arch) returned 17
timecounter: Timecounters tick every 10.000 msec
mainbus0 (root)
cpu0 at mainbus0 core 0: 1000 MHz Cortex-A8 r3p2 (Cortex V7A core)
cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
cpu0: 32KB/64B 4-way L1 VIPT Instruction cache
cpu0: 32KB/64B 4-way write-back-locking-C L1 PIPT Data cache
cpu0: 256KB/64B 8-way write-through L2 PIPT Unified cache
vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
obio0 at mainbus0 base 0x44c00000-0x44ffffff: On-Board IO
prcm0 at obio0 addr 0x44e00000-0x44e01fff: Power, Reset and Clock Management
sitaracm0 at obio0 addr 0x44e10000-0x44e11fff: control module, rev 1.0
obio1 at mainbus0 base 0x48000000-0x48ffffff: On-Board IO
omapgpio1 at obio1 addr 0x4804c000-0x4804cfff
gpio1 at omapgpio1: 32 pins
omapgpio2 at obio1 addr 0x481ac000-0x481acfff
gpio2 at omapgpio2: 32 pins
omapgpio3 at obio1 addr 0x481ae000-0x481aefff
gpio3 at omapgpio3: 32 pins
omapicu0 at obio1 addr 0x48200000-0x48200fff intrbase 0
obio2 at mainbus0 base 0x4a000000-0x4affffff: On-Board IO
gpmc0 at mainbus0 base 0x50000000: General Purpose Memory Controller, rev 6.0
gpmc0: CS#0 valid, addr 0x00000000, size  16MB
edma0 at mainbus0 base 0x49000000-0x490fffff
tiotg0 at mainbus0 base 0x47400000-0x47404fff: TI dual-port USB controller: version v1.0.0.13
motg0 at tiotg0 port 0: 0x4ea20800 version v0.0.0
motg1 at tiotg0 port 1: 0x4ea20800 version v0.0.0
motg1: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
usb0 at motg1: USB revision 2.0
com0 at obio0 addr 0x44e09000-0x44e09fff intr 72: OMAP UART, working fifo
com0: console
omapgpio0 at obio0 addr 0x44e07000-0x44e07fff
gpio0 at omapgpio0: 32 pins
tiiic0 at obio0 addr 0x44e0b000-0x44e0bfff intr 70: rev 0.11
iic0 at tiiic0: I2C bus
seeprom0 at iic0 addr 0x50: AT24Cxx or compatible EEPROM: size 32768
tps65217pmic0 at iic0 addr 0x24: TPS65217C Power Management Multi-Channel IC (rev 1.2)
tps65217pmic0: power sources [USB] max 1800 mA, AC max 2500 mA
tps65217pmic0: [LDO1: 1800 mV] [LDO2: 3300 mV] [LDO3: 1800 mV] [LDO4: 3300 mV] [DCDC1: 1500 mV] [DCDC2: 1325 mV] [DCDC3: 1125 mV] 
omapdmtimer1 at obio0 addr 0x44e31000-0x44e31fff intr 67: DMTIMER1ms
omapwdt32k0 at obio0 addr 0x44e35000-0x44e35fff: rev 0.1
sdhc0 at obio1 addr 0x48060000-0x48060fff intr 64sdhc0: EDMA tx channel 24, rx channel 25
: SDHC controller (EDMA)
sdhc0: SDHC 2.0, rev 49, platform DMA, 96000 kHz, HS 1.8V 3.0V, 1024 byte blocks
sdmmc0 at sdhc0 slot 0
sdhc1 at obio1 addr 0x481d8000-0x481d8fff intr 28sdhc1: EDMA tx channel 2, rx channel 3
: SDHC controller (EDMA)
sdhc1: SDHC 2.0, rev 49, platform DMA, 96000 kHz, HS 3.0V, 1024 byte blocks
sdmmc1 at sdhc1 slot 0
sdhc1: INIT Procedure timeout
omapdmtimer0 at obio1 addr 0x48040000-0x48040fff intr 68: DMTIMER2
omapdmtimer2 at obio1 addr 0x48044000-0x48044fff intr 92: DMTIMER4
trng0 at obio1 addr 0x48310000-0x48311fff intr 111
cpsw0 at obio2 addr 0x4a100000-0x4a107fff intrbase 40: TI CPSW Ethernet
cpsw0: Ethernet address c8:a0:30
ukphy0 at cpsw0 phy 0: OUI 0x00800f, model 0x000f, rev. 1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "dmtimer" frequency 24000000 Hz quality 100
uhub0 at usb0: Mentor Graphics MOTG root hub, class 9/0, rev 2.00/1.00, addr 1
uhub0: 1 port with 1 removable, self powered
ld1 at sdmmc1: <0xfe:0x014e:MMC02G:0x00:0x26ca609b:0x000>
ld1: 1832 MB, 930 cyl, 64 head, 63 sec, 512 bytes/sect x 3751936 sectors
Mutex error: mutex_vector_enter: locking against myself

lock address : 0x000000009ffd5d88
current cpu  :                  0
current lwp  : 0x000000009fdf30c0
owner field  : 0x0000000000010500 wait/spin:                0/1

panic: lock error: Mutex: mutex_vector_enter: locking against myself: lock 0x9ffd5d88 cpu 0 lwp 0x9fdf30c0
Stopped in pid 0.28 (system) at netbsd:cpu_Debugger+0x4:        bx      r14


0x9fde9b4c: netbsd:vpanic+0x10
0x9fde9b64: netbsd:snprintf
0x9fde9b9c: netbsd:lockdebug_abort+0x64
0x9fde9bbc: netbsd:obiosdhc_edma_done+0x24
0x9fde9c0c: netbsd:edma_intr+0x278
0x9fde9c2c: netbsd:pic_dispatch+0x28
0x9fde9cac: netbsd:pic_do_pending_ints+0x2b0
0x9fde9d34: netbsd:irq_entry+0x68
0x9fde9dbc: netbsd:obiosdhc_edma_xfer_data+0x570
0x9fde9e0c: netbsd:sdhc_exec_command+0x200
0x9fde9e2c: netbsd:sdmmc_mmc_command+0x40
0x9fde9ea4: netbsd:sdmmc_app_command+0x9c
0x9fde9f54: netbsd:sdmmc_mem_init+0x1d8
0x9fde9f84: netbsd:sdmmc_discover_task+0x1c8
0x9fde9fac: netbsd:sdmmc_task_thread+0x18
>How-To-Repeat:
The evbarm-earmv7hf/binary/gzimg/armv7.img.gz images generated are not bootable on the Beaglebone Black.
As a workaround, boot the system using a FreeBSD/arm image just to get started. I used
/pub/FreeBSD/releases/ISO-IMAGES/11.0/FreeBSD-11.0-BETA2-arm-armv6-BEAGLEBONE.img.xz from a mirror.

Power the system to get started & abort the boot immediately with a key press to drop to the u-boot prompt.
Swap SD card with one containing NetBSD image.
At the u-boot promt issue:
mmc rescan
fatload mmc 0:1 82000000 netbsd-beaglebone.ub 
bootm 82000000
>Fix:

>Release-Note:

>Audit-Trail:
From: Sevan Janiyan <venture37@geeklan.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-arm/51380: Mutex error: mutex_vector_enter: locking against
 myself
Date: Sat, 30 Jul 2016 16:23:17 +0100

 Thanks to mlelstv for pointing to

 sc->sc_ih = intr_establish(mb->mb_intrbase + 0,
              IPL_SCHED, IST_LEVEL, edma_intr, sc);

 and

 sc->sc_ih = intr_establish(oa->obio_intr, IPL_VM, IST_LEVEL,
              sdhc_intr, &sc->sc);


 Sevan

From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/51380: Mutex error: mutex_vector_enter: locking against myself
Date: Sat, 30 Jul 2016 18:08:07 +0000 (UTC)

 venture37@geeklan.co.uk (Sevan Janiyan) writes:

 > sc->sc_ih = intr_establish(mb->mb_intrbase + 0,
 >              IPL_SCHED, IST_LEVEL, edma_intr, sc);
 > 
 > and
 > 
 > sc->sc_ih = intr_establish(oa->obio_intr, IPL_VM, IST_LEVEL,
 >              sdhc_intr, &sc->sc);


 sdhc is using IPL_SDMMC (== IPL_BIO == IPL_VM) and shares a
 lock (sdhc_host_lock) with lower level drivers. The interrupts
 must therefore also operate at this level.

 The omap sdhc driver uses IPL_VM, changing that to IPL_SDMMC is
 just cosmetic.

 The omap edma driver however uses IPL_SCHED and there is only
 a single interrupt source for all channels. This could either
 be changed to IPL_BIO (sdhc is the only client so far), or
 must be defererred to a lower level, for example by using
 a softint.

 -- 
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."

From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/51380: Mutex error: mutex_vector_enter: locking against
 myself
Date: Wed, 31 Aug 2016 06:56:40 +0000

 Hi, I've got a similar issue on an rpi.

 ...
 ukbd0 at uhidev0: 8 modifier keys, 6 key codes
 panic: lock error: Mutex: mutex_vector_enter: locking against myself:
 lock 0x8bdae02c cpu 0 lwp 0x8b926600
 cpu0: Begin traceback...
 0x8a1f57d4: netbsd:db_panic+0xc
 0x8a1f57ec: netbsd:vpanic+0x144
 0x8a1f5804: netbsd:snprintf
 0x8a1f583c: netbsd:lockdebug_abort+0x60
 0x8a1f5884: netbsd:mutex_enter+0x1b8
 0x8a1f58dc: netbsd:pmap_fault_fixup+0x4c
 0x8a1f5964: netbsd:data_abort_handler+0x144
 0x8a1f59fc: netbsd:address_exception_entry+0x58
 0x8a1f5a34: netbsd:dwc2_hcd_select_transactions+0xb0
 0x8a1f5a84: netbsd:dwc2_handle_hcd_intr+0x464
 0x8a1f5a9c: netbsd:dwc2_interrupt+0x28
 0x8a1f5abc: netbsd:dwc2_intr+0xd0
 0x8a1f5adc: netbsd:pic_dispatch+0x28
 0x8a1f5b5c: netbsd:pic_do_pending_ints+0x29c
 0x8a1f5be4: netbsd:irq_entry+0x60
 0x8a1f5c54: netbsd:pmap_remove+0x194
 0x8a1f5c9c: netbsd:uvm_unmap_remove+0x208
 0x8a1f5ccc: netbsd:uvm_unmap1+0x3c
 0x8a1f5cfc: netbsd:uvmspace_exec+0xdc
 0x8a1f5d94: netbsd:execve_runproc+0x23c
 0x8a1f5f1c: netbsd:execve1+0x44
 0x8a1f5f34: netbsd:sys_execve+0x20

 Is the issue that src/sys/arch/arm/broadcom/bcm2835_dmac.c:130 uses
 IPL_SCHED too?

 Thanks.

From: Nick Hudson <skrll@netbsd.org>
To: gnats-bugs@NetBSD.org, port-arm-maintainer@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, venture37@geeklan.co.uk
Cc: 
Subject: Re: port-arm/51380: Mutex error: mutex_vector_enter: locking against
 myself
Date: Wed, 31 Aug 2016 08:08:14 +0100

 On 08/31/16 08:00, coypu@SDF.ORG wrote:
 > The following reply was made to PR port-arm/51380; it has been noted by GNATS.
 >
 > From: coypu@SDF.ORG
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: port-arm/51380: Mutex error: mutex_vector_enter: locking against
 >   myself
 > Date: Wed, 31 Aug 2016 06:56:40 +0000
 >
 >   Hi, I've got a similar issue on an rpi.
 >   
 >   ...
 The following shouldn't happen and points to a bug in dwc2
 >   0x8a1f5964: netbsd:data_abort_handler+0x144
 >   0x8a1f59fc: netbsd:address_exception_entry+0x58
 >   0x8a1f5a34: netbsd:dwc2_hcd_select_transactions+0xb0

 [snip]
 >   Is the issue that src/sys/arch/arm/broadcom/bcm2835_dmac.c:130 uses
 >   IPL_SCHED too?

 dwc2 doesn't use bcm2835_dmac, so no.

 Please raise a separate PR.

 Thanks,
 Nick

From: Sevan Janiyan <venture37@geeklan.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-arm/51380: Mutex error: mutex_vector_enter: locking against
 myself
Date: Fri, 10 Mar 2017 05:01:48 +0000

 Image still unbootable but I have a couple of pointers from Maya to try.
 I was able to boot the latest earmv7hf image on my rev a5c bbb without
 issue.

 dmesg: http://dmesgd.nycbug.org/index.cgi?do=view&id=3112

 Will confirm issue does not exist on 7.1RC and close PR.



 Sevan

From: Sevan Janiyan <venture37@geeklan.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-arm/51380: Mutex error: mutex_vector_enter: locking against
 myself
Date: Tue, 14 Mar 2017 02:01:50 +0000

 On 10/03/2017 05:01, Sevan Janiyan wrote:
 > I was able to boot the latest earmv7hf image on my rev a5c bbb without
 > issue.
 > 
 > dmesg: http://dmesgd.nycbug.org/index.cgi?do=view&id=3112
 > 
 > Will confirm issue does not exist on 7.1RC and close PR.

 I must've been randomly been lucky. following day the machine started
 crashing.
 I was able to boot 7.1RC after several attempts.

 Attempting to boot an image built from head today result in the same. I
 notice that the sd card is not detected when the system crashes (ld0 is
 not present).

 => mmc rescan
 => fatload mmc 0:1 82000000 netbsd-beaglebone.ub
 reading netbsd-beaglebone.ub
 3985108 bytes read in 256 ms (14.8 MiB/s)
 => bootm 82000000
 ## Booting kernel from Legacy Image at 82000000 ...
    Image Name:   NetBSD/beagle 7.99.65
    Created:      2017-03-14   0:28:22 UTC
    Image Type:   ARM NetBSD Kernel Image (uncompressed)
    Data Size:    3985044 Bytes = 3.8 MiB
    Load Address: 80300000
    Entry Point:  80300000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
 ## Transferring control to NetBSD stage-2 loader (at address 80300000) ...

 uboot arg = 0x9df31fb0, 0, 0x9ff9bb5b, 0x9df34350
 [ Kernel symbol table missing! ]
 Loaded initial symtab at 0x8065ee2c, strtab at 0x80695c4c, # entries 13225
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
     The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

 NetBSD 7.99.65 (BEAGLEBONE) #0: Tue Mar 14 00:28:17 GMT 2017
 	:/src/sys/arch/evbarm/compile/obj/BEAGLEBONE
 total memory = 512 MB
 avail memory = 500 MB
 sysctl_createv: sysctl_create(machine_arch) returned 17
 timecounter: Timecounters tick every 10.000 msec
 mainbus0 (root)
 cpu0 at mainbus0 core 0: 1000 MHz Cortex-A8 r3p2 (Cortex V7A core)
 cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
 cpu0: 32KB/64B 4-way L1 VIPT Instruction cache
 cpu0: 32KB/64B 4-way write-back-locking-C L1 PIPT Data cache
 cpu0: 256KB/64B 8-way write-through L2 PIPT Unified cache
 vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
 obio0 at mainbus0 base 0x44c00000-0x44ffffff: On-Board IO
 prcm0 at obio0 addr 0x44e00000-0x44e01fff: Power, Reset and Clock Management
 sitaracm0 at obio0 addr 0x44e10000-0x44e11fff: control module, rev 1.0
 sitaracm0: AM3359 Silicon Revision 2.0:
 0x20ff0383<ICSS,CPSW,DCAN,ICSS_FEA EtherCAT
 functionality=0x0=disabled,ICSS_FEA TX_AUTO_SEQUENCE=0x0=disabled>
 obio1 at mainbus0 base 0x48000000-0x48ffffff: On-Board IO
 omapicu0 at obio1 addr 0x48200000-0x48200fff intrbase 0
 omapgpio1 at obio1 addr 0x4804c000-0x4804cfff
 gpio1 at omapgpio1: 32 pins
 omapgpio2 at obio1 addr 0x481ac000-0x481acfff
 gpio2 at omapgpio2: 32 pins
 omapgpio3 at obio1 addr 0x481ae000-0x481aefff
 gpio3 at omapgpio3: 32 pins
 obio2 at mainbus0 base 0x4a000000-0x4affffff: On-Board IO
 gpmc0 at mainbus0 base 0x50000000: General Purpose Memory Controller,
 rev 6.0
 gpmc0: CS#0 valid, addr 0x00000000, size  16MB
 edma0 at mainbus0 base 0x49000000-0x490fffff
 tiotg0 at mainbus0 base 0x47400000-0x47404fff: TI dual-port USB
 controller: version v1.0.0.13
 motg0 at tiotg0 port 0: 0x4ea20800 version v0.0.0
 motg0: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
 usb0 at motg0: USB revision 2.0
 motg1 at tiotg0 port 1: 0x4ea20800 version v0.0.0
 motg1: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
 usb1 at motg1: USB revision 2.0
 com0 at obio0 addr 0x44e09000-0x44e09fff intr 72: OMAP UART, working fifo
 com0: console
 omapgpio0 at obio0 addr 0x44e07000-0x44e07fff
 gpio0 at omapgpio0: 32 pins
 tiiic0 at obio0 addr 0x44e0b000-0x44e0bfff intr 70: rev 0.11, scheme 1
 tiiic0: 32-bytes FIFO
 iic0 at tiiic0: I2C bus
 seeprom0 at iic0 addr 0x50: AT24Cxx or compatible EEPROM: size 32768
 tps65217pmic0 at iic0 addr 0x24: TPS65217C Power Management
 Multi-Channel IC (rev 1.2)
 tps65217pmic0: power sources [USB] max 1800 mA, AC max 2500 mA
 tps65217pmic0: [LDO1: 1800 mV] [LDO2: 3300 mV] [LDO3: 1800 mV] [LDO4:
 3300 mV] [DCDC1: 1500 mV] [DCDC2: 1325 mV] [DCDC3: 1125 mV]
 omapdmtimer1 at obio0 addr 0x44e31000-0x44e31fff intr 67: DMTIMER1ms
 omapwdt32k0 at obio0 addr 0x44e35000-0x44e35fff: rev 0.1
 sdhc0 at obio1 addr 0x48060000-0x48060fff intr 64: SDHC controller
 sdhc0: EDMA tx channel 24, rx channel 25
 sdhc0: SDHC 2.0, rev 49, platform DMA, 96000 kHz, HS 1.8V 3.0V, 1024
 byte blocks
 sdmmc0 at sdhc0 slot 0
 sdhc1 at obio1 addr 0x481d8000-0x481d8fff intr 28: SDHC controller
 sdhc1: EDMA tx channel 2, rx channel 3
 sdhc1: SDHC 2.0, rev 49, platform DMA, 96000 kHz, HS 1.8V 3.0V, 1024
 byte blocks
 sdmmc1 at sdhc1 slot 0
 omapdmtimer0 at obio1 addr 0x48040000-0x48040fff intr 68: DMTIMER2
 omapdmtimer2 at obio1 addr 0x48044000-0x48044fff intr 92: DMTIMER4
 trng0 at obio1 addr 0x48310000-0x48311fff intr 111
 cpsw0 at obio2 addr 0x4a100000-0x4a107fff intrbase 40: TI Layer 2 3-Port
 Switch
 cpsw0: Ethernet address c8:a0:30:
 ukphy0 at cpsw0 phy 0: OUI 0x00800f, model 0x000f, rev. 1
 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
 timecounter: Timecounter "dmtimer" frequency 24000000 Hz quality 100
 uhub0 at usb0: Mentor Graphics MOTG root hub, class 9/0, rev 2.00/1.00,
 addr 1
 uhub0: 1 port with 1 removable, self powered
 uhub1 at usb1: Mentor Graphics MOTG root hub, class 9/0, rev 2.00/1.00,
 addr 1
 uhub1: 1 port with 1 removable, self powered
 ld1 at sdmmc1: <0xfe:0x014e:MMC02G:0x00:0x26ca609b:0x000>
 ld1: 1832 MB, 930 cyl, 64 head, 63 sec, 512 bytes/sect x 3751936 sectors
 Mutex error: mutex_vector_enter,467: locking against myself

 lock address : 0x000000009ffd5d88
 current cpu  :                  0
 current lwp  : 0x000000009fdf1380
 owner field  : 0x0000000000010500 wait/spin:                0/1

 panic: lock error: Mutex: mutex_vector_enter,467: locking against
 myself: lock 0x9ffd5d88 cpu 0 lwp 0x9fdf1380
 Stopped in pid 0.27 (system) at netbsd:cpu_Debugger+0x4:        bx      r14

From: Nick Hudson <nick.hudson@gmx.co.uk>
To: gnats-bugs@NetBSD.org, port-arm-maintainer@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, venture37@geeklan.co.uk
Cc: 
Subject: Re: port-arm/51380: Mutex error: mutex_vector_enter: locking against
 myself
Date: Tue, 14 Mar 2017 07:19:15 +0000

 On 14/03/2017 02:05, Sevan Janiyan wrote:

 >   Mutex error: mutex_vector_enter,467: locking against myself
 >   
 >   lock address : 0x000000009ffd5d88
 >   current cpu  :                  0
 >   current lwp  : 0x000000009fdf1380
 >   owner field  : 0x0000000000010500 wait/spin:                0/1
 >   
 >   panic: lock error: Mutex: mutex_vector_enter,467: locking against
 >   myself: lock 0x9ffd5d88 cpu 0 lwp 0x9fdf1380
 >   Stopped in pid 0.27 (system) at netbsd:cpu_Debugger+0x4:        bx      r14
 >   
 Backtrace?

 Nic

From: Sevan Janiyan <venture37@geeklan.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-arm/51380: Mutex error: mutex_vector_enter: locking against
 myself
Date: Tue, 14 Mar 2017 12:00:38 +0000

 On 14/03/2017 07:20, Nick Hudson wrote:
 >  Backtrace?

 Mutex error: mutex_vector_enter,467: locking against myself

 lock address : 0x000000009ffd5d88
 current cpu  :                  0
 current lwp  : 0x000000009fdf1380
 owner field  : 0x0000000000010500 wait/spin:                0/1

 panic: lock error: Mutex: mutex_vector_enter,467: locking against
 myself: lock 0x9ffd5d88 cpu 0 lwp 0x9fdf1380
 Stopped in pid 0.27 (system) at netbsd:cpu_Debugger+0x4:        bx      r14
 db> bt
 0x9fde3b2c: netbsd:vpanic+0x10
 0x9fde3b44: netbsd:snprintf
 0x9fde3b7c: netbsd:lockdebug_abort+0x70
 0x9fde3b9c: netbsd:mutex_abort+0x34
 0x9fde3bbc: netbsd:mmchs_edma_done+0x24
 0x9fde3c0c: netbsd:edma_intr+0x278
 0x9fde3c2c: netbsd:pic_dispatch+0x28
 0x9fde3cac: netbsd:pic_do_pending_ints+0x2b0
 0x9fde3d34: netbsd:irq_entry+0x68
 0x9fde3dbc: netbsd:mmchs_edma_xfer_data+0x570
 0x9fde3e0c: netbsd:sdhc_exec_command+0x220
 0x9fde3e2c: netbsd:sdmmc_mmc_command+0x40
 0x9fde3ea4: netbsd:sdmmc_app_command+0x9c
 0x9fde3f54: netbsd:sdmmc_mem_init+0x1d8
 0x9fde3f84: netbsd:sdmmc_discover_task+0x1e0
 0x9fde3fac: netbsd:sdmmc_task_thread+0x18
 db> ps
 PID    LID S CPU     FLAGS       STRUCT LWP *               NAME WAIT
 1        1 3   0         0           9fdf0b40               init lbolt
 0       36 3   0       200           9fdf0880          ld1attach biowait
 0       35 3   0       200           9fdf0e00            rt_free rt_free
 0       34 3   0       200           9fe945a0              unpgc unpgc
 0       33 3   0       200           9fe942e0    icmp6_wqinput/0
 icmp6_wqinput
 0       32 3   0       200           9fe94020          nd6_timer nd6_timer
 0       31 3   0       200           9fdf1bc0     icmp_wqinput/0
 icmp_wqinput
 0       30 3   0       200           9fdf1900           rt_timer rt_timer
 0       29 3   0       200           9fdf1640        vmem_rehash vmem_rehash
 0       28 2   0       200           9fdf10c0             sdmmc1
 0    >  27 7   0       200           9fdf1380             sdmmc0
 0       20 3   0       200           9fe94860         configintr usbdly
 0       19 3   0       200           9fe94b20         configintr usbdly
 0       18 3   0       200           9fe94de0               iic0 iicintr
 0       17 3   0       200           9fe950a0         usbtask-dr usbtsk
 0       16 3   0       200           9fe95360         usbtask-hc usbtsk
 0       15 3   0       200           9fe95620             sysmon smtaskq
 0       14 3   0       200           9fe958e0         pmfsuspend pmfsuspend
 0       13 3   0       200           9fe95ba0           pmfevent pmfevent
 0       12 3   0       200           9ff24000         sopendfree sopendfr
 0       11 3   0       200           9ff242c0           nfssilly nfssilly
 0       10 3   0       200           9ff24580            cachegc cachegc
 0        9 3   0       200           9ff24840             vdrain vdrain
 0        8 3   0       200           9ff24b00          modunload mod_unld
 0        7 3   0       200           9ff24dc0            xcall/0 xcall
 0        6 1   0       200           9ff25080          softser/0
 0        5 1   0       200           9ff25340          softclk/0
 0        4 1   0       200           9ff25600          softbio/0
 0        3 1   0       200           9ff258c0          softnet/0
 0        2 1   0       201           9ff25b80             idle/0
 0        1 3   0       200           8065a620            swapper cfgmisc

State-Changed-From-To: open->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Tue, 14 Mar 2017 15:14:26 +0000
State-Changed-Why:
Let me know if the testing says this isn't fixed


From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51380 CVS commit: src/sys/arch/arm/omap
Date: Tue, 14 Mar 2017 15:11:41 +0000

 Module Name:	src
 Committed By:	skrll
 Date:		Tue Mar 14 15:11:41 UTC 2017

 Modified Files:
 	src/sys/arch/arm/omap: omap_edma.c

 Log Message:
 PR/51380: Mutex error: mutex_vector_enter: locking against myself

 Change the interrupt handler IPL level to IPL_VM (aka IPL_BIO aka
 IPL_SDMMC) so that the sdhc_host_lock prevents edma_intr from running


 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/omap/omap_edma.c

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

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51380 CVS commit: [netbsd-7] src/sys/arch/arm/omap
Date: Fri, 12 May 2017 05:17:40 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Fri May 12 05:17:40 UTC 2017

 Modified Files:
 	src/sys/arch/arm/omap [netbsd-7]: omap_edma.c

 Log Message:
 Pull up following revision(s) (requested by sevan in ticket #1387):
 	sys/arch/arm/omap/omap_edma.c: revision 1.4 via patch
 PR/51380: Mutex error: mutex_vector_enter: locking against myself
 Change the interrupt handler IPL level to IPL_VM (aka IPL_BIO aka
 IPL_SDMMC) so that the sdhc_host_lock prevents edma_intr from running


 To generate a diff of this commit:
 cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/arm/omap/omap_edma.c

 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: sevan@NetBSD.org
State-Changed-When: Sat, 24 Nov 2018 01:20:32 +0000
State-Changed-Why:
Must've been fixed at the time, I requested the pullup.


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