amd64 panic: lock (sleep mutex) ral0 not locked _at_ /usr/src/sys/dev/ral/rt2560.c:2012

From: Anton Shterenlikht <mexas_at_bristol.ac.uk>
Date: Sat, 25 Sep 2010 20:53:34 +0100
On amd64 r213168 I've a ral(4) CardBus
wireless device of obscure origin.
It is identified as

# pciconf -lv
ral0_at_pci0:3:0:0:        class=0x028000 card=0x68351462 chip=0x02011814 rev=0x01 hdr=0x00
    vendor     = 'Ralink Technology, Corp.'
    device     = 'Ralink Chipset 802.11b/g WLAN Card ( RT2560F)'
    class      = network

and from dmesg:

# dmesg
ral0: <Ralink Technology RT2560> mem 0xb7fb0000-0xb7fb1fff irq 20 at device 0.0 on cardbus0
ral0: MAC/BBP RT2560 (rev 0x00), RF RT2522

The panic happens immediately after issuing
this command:

# ifconfig wlan0 up scan

In case it matters, I reported this
panic first back in July:

http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/2010-07/msg00389.html

Full details are below.

from kernel config

device		ral		# Ralink Technology RT2500 wireless NICs.
device		ralfw
device		wlan		# 802.11 support
options 	IEEE80211_DEBUG	# enable debug msgs
options 	IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
options 	IEEE80211_SUPPORT_MESH	# enable 802.11s draft support
device		wlan_wep	# 802.11 WEP support
device		wlan_ccmp	# 802.11 CCMP support
device		wlan_tkip	# 802.11 TKIP support
device		wlan_amrr	# AMRR transmit rate control algorithm


# ifconfig wlan0 create wlandev ral0
# ifconfig
ral0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:00:00:00:00:00
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:00:00:00:00:00
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid "" channel 1 (2412 MHz 11b)
        country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
        bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 1
        bintval 0

full dmesg:

Copyright (c) 1992-2010 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-CURRENT #0 r213168: Sat Sep 25 12:46:44 BST 2010
    root_at_zzz:/usr/obj/usr/src/sys/BUZI amd64
WARNING: WITNESS option enabled, expect reduced performance.
CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-60 (1994.98-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x60f82  Family = f  Model = 68  Stepping = 2
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x2001<SSE3,CX16>
  AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x11f<LAHF,CMP,SVM,ExtAPIC,CR8,Prefetch>
real memory  = 3221225472 (3072 MB)
avail memory = 2962657280 (2825 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <HP     0944    >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ACPI Error: 32/64X address mismatch in Pm2ControlBlock: 0x00008800/0x0000000000008100, using 32 (20100915/tbfadt-526)
ioapic0: Changing APIC ID to 2
ioapic0 <Version 2.1> irqs 0-23 on motherboard
acpi0: <HPQOEM SLIC-MPC> on motherboard
acpi0: Power Button (fixed)
unknown: I/O range not supported
acpi0: reservation of 0, 8000000 (3) failed
acpi0: reservation of 100000, fff00000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
acpi_ec0: <Embedded Controller: GPE 0x11> port 0x62,0x66 on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0x4000-0x40ff mem 0xc0000000-0xc7ffffff,0xcc200000-0xcc20ffff,0xcc300000-0xcc3fffff irq 19 at device 5.0 on pci1
pcib2: <ACPI PCI-PCI bridge> at device 4.0 on pci0
pci16: <ACPI PCI bus> on pcib2
bge0: <Broadcom BCM5906 A2, ASIC rev. 0x00c002> mem 0xcc000000-0xcc00ffff irq 16 at device 0.0 on pci16
bge0: CHIP ID 0x0000c002; ASIC REV 0x0c; CHIP REV 0xc0; PCI-E
miibus0: <MII bus> on bge0
brgphy0: <BCM5906 10/100baseTX PHY> PHY 1 on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bge0: Ethernet address: 00:1a:4b:89:4b:4e
pcib3: <ACPI PCI-PCI bridge> at device 5.0 on pci0
pci32: <ACPI PCI bus> on pcib3
atapci0: <ATI IXP600 SATA300 controller> port 0x9000-0x9007,0x9008-0x900b,0x9010-0x9017,0x5018-0x501b,0x5020-0x502f mem 0xcc409000-0xcc4093ff irq 16 at device 18.0 on pci0
atapci0: AHCI v1.10 controller with 4 3Gbps ports, PM not supported
ata2: <ATA channel 0> on atapci0
ohci0: <OHCI (generic) USB controller> mem 0xcc401000-0xcc401fff irq 23 at device 19.0 on pci0
usbus0: <OHCI (generic) USB controller> on ohci0
ohci1: <OHCI (generic) USB controller> mem 0xcc402000-0xcc402fff irq 17 at device 19.1 on pci0
usbus1: <OHCI (generic) USB controller> on ohci1
ohci2: <OHCI (generic) USB controller> mem 0xcc403000-0xcc403fff irq 17 at device 19.2 on pci0
usbus2: <OHCI (generic) USB controller> on ohci2
ohci3: <OHCI (generic) USB controller> mem 0xcc404000-0xcc404fff irq 17 at device 19.3 on pci0
usbus3: <OHCI (generic) USB controller> on ohci3
ohci4: <OHCI (generic) USB controller> mem 0xcc405000-0xcc405fff irq 17 at device 19.4 on pci0
usbus4: <OHCI (generic) USB controller> on ohci4
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xcc406000-0xcc4060ff irq 23 at device 19.5 on pci0
ehci0: AMD SB600/700 quirk applied
usbus5: EHCI version 1.0
usbus5: <EHCI (generic) USB 2.0 controller> on ehci0
pci0: <serial bus, SMBus> at device 20.0 (no driver attached)
atapci1: <ATI IXP600 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x5040-0x504f irq 16 at device 20.1 on pci0
ata0: <ATA channel 0> on atapci1
pci0: <multimedia, HDA> at device 20.2 (no driver attached)
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
pcib4: <ACPI PCI-PCI bridge> at device 20.4 on pci0
pci2: <ACPI PCI bus> on pcib4
cbb0: <RF5C476 PCI-CardBus Bridge> mem 0xcc100000-0xcc100fff irq 20 at device 4.0 on pci2
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
battery0: <ACPI Control Method Battery> on acpi0
battery1: <ACPI Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
acpi_button0: <Sleep Button> on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x73 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model IntelliMouse, device ID 3
orm0: <ISA Option ROM> at iomem 0xd0000-0xd0fff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
powernow0: <PowerNow! K8> on cpu0
acpi_throttle1: <ACPI CPU Throttling> on cpu1
acpi_throttle1: failed to attach P_CNT
device_attach: acpi_throttle1 attach returned 6
powernow1: <PowerNow! K8> on cpu1
Timecounters tick every 1.000 msec
IP Filter: v4.1.28 initialized.  Default = block all, Logging = enabled
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 12Mbps Full Speed USB v1.0
usbus4: 12Mbps Full Speed USB v1.0
usbus5: 480Mbps High Speed USB v2.0
ugen0.1: <ATI> at usbus0
uhub0: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <ATI> at usbus1
uhub1: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <ATI> at usbus2
uhub2: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <ATI> at usbus3
uhub3: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
ugen4.1: <ATI> at usbus4
uhub4: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4
ugen5.1: <ATI> at usbus5
uhub5: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus5
acd0: DVDR <MATSHITADVD-RAM UJ-861H/1.50> at ata0-master PIO4 
ad4: 152627MB <Seagate ST9160821AS 3.BHE> at ata2-master UDMA100 SATA 1.5Gb/s
SMP: AP CPU #1 Launched!
WARNING: WITNESS option enabled, expect reduced performance.
Root mount waiting for: cbb0 usbus5 usbus4 usbus3 usbus2 usbus1 usbus0
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
uhub4: 2 ports with 2 removable, self powered
cardbus0: Expecting link target, got 0x0
cardbus0: Expecting link target, got 0x0
ral0: <Ralink Technology RT2560> mem 0xb7fb0000-0xb7fb1fff irq 20 at device 0.0 on cardbus0
ral0: MAC/BBP RT2560 (rev 0x00), RF RT2522
Root mount waiting for: usbus5
Root mount waiting for: usbus5
Root mount waiting for: usbus5
uhub5: 10 ports with 10 removable, self powered
Root mount waiting for: usbus5
Trying to mount root from ufs:/dev/ad4s1a
ugen0.2: <Broadcom Corp> at usbus0
ugen1.2: <vendor 0x0430> at usbus1
ums0: <vendor 0x0430 product 0x0100, class 0/0, rev 2.00/1.07, addr 2> on usbus1
ums0: 3 buttons and [XY] coordinates ID=0
ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present;
            to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf.
ZFS filesystem version 4
ZFS storage pool version 15
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: could not read from BBP
ral0: timeout waiting for BBP
panic: lock (sleep mutex) ral0 not locked _at_ /usr/src/sys/dev/ral/rt2560.c:2012
cpuid = 0
KDB: enter: panic

(copied by hand)

panic
[ thread pid 0 tid 100068 ]
Stopped at kbd_enter+0x3d: movq $0,0x4c1ef0(%rip)

db> bt
Tracing pid 0 tid 100068 td 0xffffff0001b59440
kbd_enter() at kbd_enter+0x3d
panic() at panic+0x17b
witness_unlock() at witness_unlock+0x297
_mtx_unlock_flags() at _mtx_unlock_flags+0x7e
rt2560_ioctl() at rt2560_ioctl+0xbf
taskqueue_run() at taskqueue_run+0x63
taskqueue_thread_loop() at taskqueue_thread_loop+0x54
fork_exit() at fork_exit+0x12a
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip 0, rsp=0xffffff80b2d41cf0, rbp = 0 ---

Please advise

many thanks
anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
Received on Sat Sep 25 2010 - 17:53:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC