From owner-freebsd-hackers@FreeBSD.ORG Sun May 9 01:51:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E128916A4CF for ; Sun, 9 May 2004 01:51:21 -0700 (PDT) Received: from p233.if.pwr.wroc.pl (p233.if.pwr.wroc.pl [156.17.68.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A63143D2D for ; Sun, 9 May 2004 01:51:21 -0700 (PDT) (envelope-from junior@p233.if.pwr.wroc.pl) Received: from junior by p233.if.pwr.wroc.pl with local (Exim 4.32) id 1BMk4K-00040K-Uo for freebsd-hackers@freebsd.org; Sun, 09 May 2004 10:53:56 +0200 Date: Sun, 9 May 2004 10:53:56 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20040509085356.GA15318@p233.if.pwr.wroc.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i From: Bartek Marcinkiewicz Subject: non-recursive mutex, sbc, pcm, kernel panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2004 08:51:24 -0000 Hello, I've just experienced kernel panic while trying to play mp3 file. (My sound card: Creative Sound Blaster 16, ISA, worked fine on older 5.x system). While reading code: sys/dev/sound/pcm/sound.c::snd_mtxcreate() creates non-recursive mutex. But in sys/dev/sound/isa/sb16.c::sb_setup() we have: sb_setup() { sb_lock(sb); /* ... */ sb_reset_dsp(sb); /* ... */ } sb_reset_dsp() function locks this mutex again, causing panic with message: _mtx_lock_sleep: recursed on non-recursive mutex sbc0 @... Is this known issue? Why this mutex should be non-recursive? Attached patch makes it work again. best regards, bm. FreeBSD 5.2-CURRENT FreeBSD Sat Mar 27 18:25:15 CET 2004 sbc0: at port 0x388-0x38b,0x330-0x331,0x220-0x22f irq 5 drq 5,1 on isa0 sbc0: [GIANT-LOCKED] pcm0: on sbc0 --- sound.c Sun May 9 10:44:20 2004 +++ sound.c Sun May 9 10:48:31 2004 @@ -75,7 +75,7 @@ m = malloc(sizeof(*m), M_DEVBUF, M_WAITOK | M_ZERO); if (m == NULL) return NULL; - mtx_init(m, desc, type, MTX_DEF); + mtx_init(m, desc, type, MTX_DEF | MTX_RECURSE); return m; #else return (void *)0xcafebabe; From owner-freebsd-hackers@FreeBSD.ORG Sat May 8 13:18:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A59716A4CE; Sat, 8 May 2004 13:18:06 -0700 (PDT) Received: from smtp.web.de (smtp05.web.de [217.72.192.209]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4BB943D1F; Sat, 8 May 2004 13:18:05 -0700 (PDT) (envelope-from Silencium68@web.de) Received: from [80.110.74.100] (helo=[10.10.10.92]) by smtp.web.de with asmtp (WEB.DE 4.101 #91) id 1BMYGq-0001XI-00; Sat, 08 May 2004 22:18:04 +0200 Mime-Version: 1.0 (Apple Message framework v613) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-10-513576047" To: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org From: Silencium68 Date: Sat, 8 May 2004 22:17:54 +0200 X-Mailer: Apple Mail (2.613) Sender: Silencium68@web.de X-Mailman-Approved-At: Sun, 09 May 2004 05:11:53 -0700 Subject: FreeBSD 5.2.1: Booting Issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2004 20:18:06 -0000 --Apple-Mail-10-513576047 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hello, I am trying to setup FreeBSD 5.2.1 on a PC, which is equipped with * AMD K6/233 * 256 MB RAM * Adaptec AHA-1542 (SCSI-Id #7, I/O 0x0330, IRQ 15, DMA 0) * RealTek RTL8139 * Seagate ST34520N (SCSI-Id #0) * Quantum Fireball 540S (SCSI-Id #1) * Matshita CR-8005A (SCSI-Id #6) * SoundBlaster SB2 (I/O 0x0220, IRQ 2, DMA 1) * 1,44 MB/3,5" Floppy Booting from CDROM doesn't work, so I created two floppies, one made from kern.flp, the other made from mfsroot.flp, but unfortunately booting from the floppies doesn't work either! After replacing the boot floppy with the one containing the root file system, the kernel says something like AHA invalid DMA setting and stops after some time asking with file system to continue with. When going for ufs:md0 I am ending with the sysinstall, but I can't install anything because not a single disk can be found! How can I solve this one? - Martin --Apple-Mail-10-513576047 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-disposition: inline content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: PGP 8.1 (Build 307) Beta iQA/AwUBQJ1AeQuDObija0n2EQJPZgCeLWvPGHnpMRPJiY252D46eYqWK34AniiQ 7h4QG4BpzzoGy7MM9Sjvi8XZ =5Lbv -----END PGP SIGNATURE----- --Apple-Mail-10-513576047-- From owner-freebsd-hackers@FreeBSD.ORG Sat May 8 22:18:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17B6316A4CE for ; Sat, 8 May 2004 22:18:19 -0700 (PDT) Received: from angryfist.fasttrackmonkey.com (angryfist.fasttrackmonkey.com [216.223.196.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C250543D31 for ; Sat, 8 May 2004 22:18:17 -0700 (PDT) (envelope-from spork@fasttrackmonkey.com) Received: (qmail 61804 invoked by uid 2003); 9 May 2004 05:12:54 -0000 Received: from spork@fasttrackmonkey.com by angryfist.fasttrackmonkey.com by uid 1001 with qmail-scanner-1.20 (clamscan: 0.65. Clear:RC:1(216.220.116.154):. Processed in 0.053921 secs); 09 May 2004 05:12:54 -0000 Received: from unknown (HELO white.nat.fasttrackmonkey.com) (216.220.116.154) by 0 with DES-CBC3-SHA encrypted SMTP; 9 May 2004 05:12:54 -0000 Date: Sun, 9 May 2004 01:18:15 -0400 (EDT) From: Charles Sprickman X-X-Sender: spork@white.nat.fasttrackmonkey.com To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Sun, 09 May 2004 05:11:53 -0700 Subject: help with panic/kgdb X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2004 05:18:19 -0000 Hi, First off, let me say it's been a very long time since I've had to deal with a FreeBSD box panicing, so bear with me. Tried this on -questions and no takers. Not really sure if I've got the right list, my apologies if this should go elsewhere... This particular machine has been acting up since I upgraded to 4.8-p18 from 4.8-p6(?). The only bit of "odd" hardware in it is a 3Ware IDE RAID card (full dmesg below). This is the second panic since the upgrade. My main goal here is to try and figure out if it's a hardware issue (bad memory, dead CPU fan, etc.) or an OS issue, so anyone that can look at the gdb output below and give me some insight, go ahead. Thanks, Charles Here's what gdb tells me so far: root@angryfist[/usr/local/etc/rc.d]# gdb -k /kernel.debug /var/crash/vmcore.2 GNU gdb 4.18 (FreeBSD) [...] This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf IdlePTD at phsyical address 0x00414000 initial pcb at physical address 0x00364d20 panicstr: page fault panic messages: --- Fatal trap 12: page fault while in kernel mode fault virtual address = 0x10018 fault code = supervisor read, page not present instruction pointer = 0x8:0xc01c3f4c stack pointer = 0x10:0xc8fb0d68 frame pointer = 0x10:0xc8fb0d74 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 74356 (find) interrupt mask = none trap number = 12 panic: page fault syncing disks... 19 done Uptime: 9d13h5m50s dumping to dev #twed/0x20001, offset 1048608 dump 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 --- #0 dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487 487 if (dumping++) { (kgdb) where #0 dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487 #1 0xc019b007 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:316 #2 0xc019b42c in poweroff_wait (junk=0xc032cdec, howto=-1070413553) at /usr/src/sys/kern/kern_shutdown.c:595 #3 0xc02d82a2 in trap_fatal (frame=0xc8fb0d28, eva=65560) at /usr/src/sys/i386/i386/trap.c:974 #4 0xc02d7f75 in trap_pfault (frame=0xc8fb0d28, usermode=0, eva=65560) at /usr/src/sys/i386/i386/trap.c:867 #5 0xc02d7b5f in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16, tf_edi = -917549376, tf_esi = -923070808, tf_ebp = -923071116, tf_isp = -923071148, tf_ebx = 65536, tf_edx = 1068, tf_ecx = -917549356, tf_eax = -1057005568, tf_trapno = 12, tf_err = 0, tf_eip = -1071890612, tf_cs = 8, tf_eflags = 66050, tf_esp = 0, tf_ss = -917549376}) at /usr/src/sys/i386/i386/trap.c:466 #6 0xc01c3f4c in cache_lookup (dvp=0xc94f4ec0, vpp=0xc8fb0e94, cnp=0xc8fb0ea8) at /usr/src/sys/kern/vfs_cache.c:210 #7 0xc01c4448 in vfs_cache_lookup (ap=0xc8fb0e04) at /usr/src/sys/kern/vfs_cache.c:471 #8 0xc02920f5 in ufs_vnoperate (ap=0xc8fb0e04) at /usr/src/sys/ufs/ufs/ufs_vnops.c:2376 #9 0xc01c755d in lookup (ndp=0xc8fb0e80) at vnode_if.h:52 #10 0xc01c7050 in namei (ndp=0xc8fb0e80) at /usr/src/sys/kern/vfs_lookup.c:153 #11 0xc01cccb9 in lstat (p=0xc8e11a00, uap=0xc8fb0f80) at /usr/src/sys/kern/vfs_syscalls.c:1823 #12 0xc02d8551 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 134632704, tf_esi = 134632824, tf_ebp = -1077937436, tf_isp = -923070508, tf_ebx = 672084268, tf_edx = 134557696, tf_ecx = 0, tf_eax = 190, tf_trapno = 0, tf_err = 2, tf_eip = 671763988, tf_cs = 31, tf_eflags = 659, tf_esp = -1077937576, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1175 #13 0xc02cbf85 in Xint0x80_syscall () #14 0x280a1469 in ?? () #15 0x280a0cf2 in ?? () #16 0x804971e in ?? () #17 0x804b968 in ?? () #18 0x80493ce in ?? () If you need me to poke around at any variables, please let me know. As you can see, this crapped out during the daily run, I'm assuming the "find" process that tanked was some part of one of the daily scripts. Here's the dmesg: Copyright (c) 1992-2003 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 4.8-RELEASE-p18 #4: Tue Apr 27 14:32:39 EDT 2004 spork@angryfist.fasttrackmonkey.com:/usr/obj/usr/src/sys/MONKEY Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 451023566 Hz CPU: AMD-K6(tm) 3D processor (451.02-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x58c Stepping = 12 Features=0x8021bf AMD Features=0x80000800 real memory = 134201344 (131056K bytes) avail memory = 126578688 (123612K bytes) Preloaded elf kernel "kernel" at 0xc03f5000. Preloaded userconfig_script "/boot/kernel.conf" at 0xc03f509c. K6-family MTRR support enabled (2 registers) md0: Malloc disk Using $PIR table, 8 entries at 0xc00f0ca0 npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 ohci0: mem 0xe5800000-0xe5800fff irq 15 at device 2.0 on pci0 usb0: OHCI version 1.0, legacy support usb0: on ohci0 usb0: USB revision 1.0 uhub0: AcerLabs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered alpm0: at device 3.0 on pci0 alpm0: driver is using old-style compatibility shims isab0: at device 7.0 on pci0 isa0: on isab0 pci0: at 9.0 irq 12 dc0: port 0xd800-0xd8ff mem 0xe3800000-0xe38003ff irq 10 at device 11.0 on pci0 dc0: Ethernet address: 00:04:5a:6b:e4:d4 miibus0: on dc0 ukphy0: on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto twe0: <3ware Storage Controller> port 0xd400-0xd40f irq 11 at device 12.0 on pci0 twe0: 4 ports, Firmware FE6X 1.02.28.053, BIOS BE6X 1.07.02.005 atapci0: port 0xd000-0xd00f irq 0 at device 15.0 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 smbus0: on alsmb0 orm0: