From owner-freebsd-current@FreeBSD.ORG Sat Sep 25 19:53:37 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FD5E1065672 for ; Sat, 25 Sep 2010 19:53:37 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1F3208FC08 for ; Sat, 25 Sep 2010 19:53:36 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1OzaoR-00004W-Jr for freebsd-current@freebsd.org; Sat, 25 Sep 2010 20:53:35 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1OzaoR-00058z-Cj for freebsd-current@freebsd.org; Sat, 25 Sep 2010 20:53:35 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4) with ESMTP id o8PJrZ1a060290 for ; Sat, 25 Sep 2010 20:53:35 +0100 (BST) (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4/Submit) id o8PJrZnv060289 for freebsd-current@freebsd.org; Sat, 25 Sep 2010 20:53:35 +0100 (BST) (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Sat, 25 Sep 2010 20:53:34 +0100 From: Anton Shterenlikht To: freebsd-current@freebsd.org Message-ID: <20100925195334.GA58609@mech-cluster241.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: amd64 panic: lock (sleep mutex) ral0 not locked @ /usr/src/sys/dev/ral/rt2560.c:2012 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 19:53:37 -0000 On amd64 r213168 I've a ral(4) CardBus wireless device of obscure origin. It is identified as # pciconf -lv ral0@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: 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 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 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@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 Features2=0x2001 AMD Features=0xea500800 AMD Features2=0x11f real memory = 3221225472 (3072 MB) avail memory = 2962657280 (2825 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: 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 irqs 0-23 on motherboard acpi0: 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: on acpi0 cpu1: on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 vgapci0: port 0x4000-0x40ff mem 0xc0000000-0xc7ffffff,0xcc200000-0xcc20ffff,0xcc300000-0xcc3fffff irq 19 at device 5.0 on pci1 pcib2: at device 4.0 on pci0 pci16: on pcib2 bge0: mem 0xcc000000-0xcc00ffff irq 16 at device 0.0 on pci16 bge0: CHIP ID 0x0000c002; ASIC REV 0x0c; CHIP REV 0xc0; PCI-E miibus0: on bge0 brgphy0: PHY 1 on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto bge0: Ethernet address: 00:1a:4b:89:4b:4e pcib3: at device 5.0 on pci0 pci32: on pcib3 atapci0: 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: on atapci0 ohci0: mem 0xcc401000-0xcc401fff irq 23 at device 19.0 on pci0 usbus0: on ohci0 ohci1: mem 0xcc402000-0xcc402fff irq 17 at device 19.1 on pci0 usbus1: on ohci1 ohci2: mem 0xcc403000-0xcc403fff irq 17 at device 19.2 on pci0 usbus2: on ohci2 ohci3: mem 0xcc404000-0xcc404fff irq 17 at device 19.3 on pci0 usbus3: on ohci3 ohci4: mem 0xcc405000-0xcc405fff irq 17 at device 19.4 on pci0 usbus4: on ohci4 ehci0: mem 0xcc406000-0xcc4060ff irq 23 at device 19.5 on pci0 ehci0: AMD SB600/700 quirk applied usbus5: EHCI version 1.0 usbus5: on ehci0 pci0: at device 20.0 (no driver attached) atapci1: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x5040-0x504f irq 16 at device 20.1 on pci0 ata0: on atapci1 pci0: at device 20.2 (no driver attached) isab0: at device 20.3 on pci0 isa0: on isab0 pcib4: at device 20.4 on pci0 pci2: on pcib4 cbb0: mem 0xcc100000-0xcc100fff irq 20 at device 4.0 on pci2 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 battery0: on acpi0 battery1: on acpi0 acpi_acad0: on acpi0 acpi_button0: on acpi0 acpi_lid0: on acpi0 acpi_tz0: on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 atrtc0: port 0x70-0x71,0x72-0x73 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse, device ID 3 orm0: at iomem 0xd0000-0xd0fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 acpi_throttle0: on cpu0 powernow0: on cpu0 acpi_throttle1: on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 powernow1: 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: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 ugen4.1: at usbus4 uhub4: on usbus4 ugen5.1: at usbus5 uhub5: on usbus5 acd0: DVDR at ata0-master PIO4 ad4: 152627MB 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: 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: at usbus0 ugen1.2: at usbus1 ums0: 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 @ /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