From owner-freebsd-current Mon Aug 19 23:47:37 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCCA537B401; Mon, 19 Aug 2002 23:47:31 -0700 (PDT) Received: from white.imgsrc.co.jp (ns.imgsrc.co.jp [210.226.20.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EFF843E3B; Mon, 19 Aug 2002 23:47:29 -0700 (PDT) (envelope-from kuriyama@imgsrc.co.jp) Received: from localhost (localhost [127.0.0.1]) by white.imgsrc.co.jp (Postfix) with ESMTP id 4499024D42; Tue, 20 Aug 2002 15:47:28 +0900 (JST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [2001:218:422:2::130]) by white.imgsrc.co.jp (Postfix) with ESMTP id 349B824D02; Tue, 20 Aug 2002 15:47:24 +0900 (JST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [2001:218:422:2::130]) by black.imgsrc.co.jp (Postfix) with ESMTP id 19F211E46F2; Tue, 20 Aug 2002 15:47:22 +0900 (JST) Date: Tue, 20 Aug 2002 15:47:22 +0900 Message-ID: <7mr8guowlh.wl@black.imgsrc.co.jp> From: Jun Kuriyama To: Orion Hodson Cc: Current Subject: panic: mutex pcm0:play:0 not owned at ../../../kern/kern_mutex.c:339 In-Reply-To: <200208181417.g7IEH7UK059727@freefall.freebsd.org> References: <200208181417.g7IEH7UK059727@freefall.freebsd.org> User-Agent: Wanderlust/2.9.10 (Unchained Melody) SEMI/1.14.4 (Hosorogi) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS on ns.imgsrc.co.jp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Sun, 18 Aug 2002 07:17:07 -0700 (PDT), Orion Hodson wrote: > Modified files: > sys/dev/sound/pcm dsp.c > Log: > Apply reference counting patch. Fixes problem of two applications > opening the device, eg one read only and one write only, and the > reference count being non-zero when both exit rendering device > permanently busy. After this, I got a panic around sound. With r1.54 of dsp.c, it looks fine. panic: mutex pcm0:play:0 not owned at ../../../kern/kern_mutex.c:339 panic: from debugger panic messages: --- dmesg: kernel message buffer has different magic number --- #0 doadump () at ../../../kern/kern_shutdown.c:213 213 dumping++; (kgdb) where #0 doadump () at ../../../kern/kern_shutdown.c:213 #1 0xc01ffcc9 in boot (howto=260) at ../../../kern/kern_shutdown.c:345 #2 0xc01ffef8 in panic () at ../../../kern/kern_shutdown.c:493 #3 0xc0142152 in db_panic () at ../../../ddb/db_command.c:449 #4 0xc01420d2 in db_command (last_cmdp=0xc03d5f20, cmd_table=0xc0380688, aux_cmd_tablep=0x104, aux_cmd_tablep_end=0xc1fbf6c0) at ../../../ddb/db_command.c:345 #5 0xc01421e6 in db_command_loop () at ../../../ddb/db_command.c:471 #6 0xc014473e in db_trap (type=3, code=0) at ../../../ddb/db_trap.c:72 #7 0xc0352d0f in kdb_trap (type=3, code=0, regs=0xcb5a0a64) at ../../../i386/i386/db_interface.c:161 #8 0xc0362487 in trap (frame= {tf_fs = -883294184, tf_es = -883294192, tf_ds = -1071841264, tf_edi = 256, tf_esi = -1040451904, tf_ebp = -883291472, tf_isp = -883291504, tf_ebx = 0, tf_edx = 0, tf_ecx = 32, tf_eax = 18, tf_trapno = 3, tf_err = 0, tf_eip = -1070256204, tf_cs = 8, tf_eflags = 662, tf_esp = -1069786017, tf_ss = -1069952868}) at ../../../i386/i386/trap.c:605 #9 0xc03543d8 in calltrap () at {standard input}:98 #10 0xc01ffee0 in panic (fmt=0x0) at ../../../kern/kern_shutdown.c:479 #11 0xc01f696c in _mtx_assert (m=0x0, what=0, file=0xc1fbf6c0 "", line=256) at ../../../kern/kern_mutex.c:800 #12 0xc01f6200 in _mtx_unlock_flags (m=0x0, opts=0, file=0x0, line=0) at ../../../kern/kern_mutex.c:339 #13 0xc01a63aa in pcm_chnrelease (c=0x0) at ../../../dev/sound/pcm/sound.c:229 #14 0xc01a144b in dsp_close (i_dev=0x100, flags=6, mode=8192, td=0xc1fbf6c0) at ../../../dev/sound/pcm/dsp.c:382 #15 0xc01d5af7 in spec_close (ap=0xcb5a0ba4) at ../../../fs/specfs/spec_vnops.c:631 #16 0xc01d4fd8 in spec_vnoperate (ap=0x0) at ../../../fs/specfs/spec_vnops.c:124 #17 0xc0255a56 in vn_close (vp=0xc210cde0, flags=0, file_cred=0x0, td=0x0) at vnode_if.h:224 #18 0xc02568c0 in vn_closefile (fp=0x0, td=0x0) at ../../../kern/vfs_vnops.c:877 #19 0xc01e4253 in fdrop_locked (fp=0xc210cde0, td=0x0) at file.h:256 #20 0xc01e3cfe in fdrop (fp=0xc200eb40, td=0x0) at ../../../kern/kern_descrip.c:1625 #21 0xc01e3cac in closef (fp=0xc210cde0, td=0xc200eb40) at ../../../kern/kern_descrip.c:1611 #22 0xc01e2328 in close (td=0xc1fbf6c0, uap=0x0) at ../../../kern/kern_descrip.c:803 #23 0xc0362da1 in syscall (frame= {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 1, tf_esi = -1077936672, tf_ebp = -1077936884, tf_isp = -883290764, tf_ebx = 672599680, tf_edx = 0, tf_ecx = 191, tf_eax = 6, tf_trapno = 22, tf_err = 2, tf_eip = 672156459, tf_cs = 31, tf_eflags = 643, tf_esp = -1077936912, tf_ss = 47}) at ../../../i386/i386/trap.c:1050 #24 0xc035442d in Xint0x80_syscall () at {standard input}:140 ---Can't read userspace from dump, or kernel process--- (kgdb) up 14 #14 0xc01a144b in dsp_close (i_dev=0x100, flags=6, mode=8192, td=0xc1fbf6c0) at ../../../dev/sound/pcm/dsp.c:382 382 pcm_chnrelease(wrch); (kgdb) list 377 } 378 if (wrch) { 379 chn_flush(wrch); /* may sleep */ 380 wrch->flags &= ~(CHN_F_RUNNING | CHN_F_MAPPED | CHN_F_DEAD); 381 chn_reset(wrch, 0); 382 pcm_chnrelease(wrch); 383 } 384 i_dev->si_drv1 = NULL; 385 i_dev->si_drv2 = NULL; 386 -- Jun Kuriyama // IMG SRC, Inc. // FreeBSD Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message