From owner-cvs-src@FreeBSD.ORG Sat Apr 30 23:08:14 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3986516A4CE; Sat, 30 Apr 2005 23:08:14 +0000 (GMT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80BAC43D2D; Sat, 30 Apr 2005 23:08:13 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from mail.chesapeake.net (localhost [127.0.0.1]) by mail.chesapeake.net (8.12.10/8.12.10) with ESMTP id j3UN891h080333; Sat, 30 Apr 2005 19:08:09 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost)j3UN89Rj080330; Sat, 30 Apr 2005 19:08:09 -0400 (EDT) (envelope-from jroberson@chesapeake.net) X-Authentication-Warning: mail.chesapeake.net: jroberson owned process doing -bs Date: Sat, 30 Apr 2005 19:08:09 -0400 (EDT) From: Jeff Roberson To: Jonathan Noack In-Reply-To: <42740DC9.7030209@alumni.rice.edu> Message-ID: <20050430190731.M71837@mail.chesapeake.net> References: <42740DC9.7030209@alumni.rice.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@freebsd.org cc: phk@freebsd.org Subject: Re: panic: sleeping without a mutex (cvs commit: src/sys/fs/devfs devfs_vfsops.c) X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2005 23:08:14 -0000 On Sat, 30 Apr 2005, Jonathan Noack wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > jeff 2005-04-30 11:24:17 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/fs/devfs devfs_vfsops.c > > Log: > > - Mark devfs as MNTK_MPSAFE as I belive it does not require Giant. > > > > Sponsored by: Isilon Systems, Inc. > > Agreed in principle by: phk > > > > Revision Changes Path > > 1.44 +1 -0 src/sys/fs/devfs/devfs_vfsops.c > > devfs->ums->usb->usbd->msleep->KASSERT(mutex held when timo==0)->panic. > I have the dump if you're interested... > > Short version: > > panic: sleeping without a mutex > KDB: stack backtrace: > panic(c06b3b4f,0,c06b3b18,c06abfaa,200) at panic+0x13a > msleep(c23cc200,0,4c,c06abfaa,0) at msleep+0x4af > usbd_transfer(c23cc200,c23ac000,0,1388,e505c8f8) at usbd_transfer+0x158 > usbd_do_request_flags_pipe(c23ac000,c23ac180,e505c8f8,0,0) at > usbd_do_request_flags_pipe+0x7b > usbd_do_request_flags(c23ac000,e505c8f8,0,0,0) at usbd_do_request_flags+0x3c > usbd_do_request(c23ac000,e505c8f8,0,102,81) at usbd_do_request+0x37 > usbd_clear_endpoint_stall(c25f0680,c06df2c0,1,0,1) at > usbd_clear_endpoint_stall+0x56 > usbd_setup_pipe(c23ac000,c2392d00,c23c4ba0,ffffffff,e505c950) at > usbd_setup_pipe+0xa2 > usbd_open_pipe_ival(1,e505c988,ffffffff,0,c06b1682) at > usbd_open_pipe_ival+0xa1 > usbd_open_pipe_intr(c2392d00,81,4,c23ce008,c23ce000) at > usbd_open_pipe_intr+0x36 > ums_open(c23cc300,7,2000,c2360a80,c23cc300) at ums_open+0xf5 > devfs_open(e505ca50,e505cd04,7) at devfs_open+0x24e Looks like devfs needs to acquire Giant here. I'll sort it out soon. > VOP_OPEN_APV(c06df8a0,e505ca50,0,0,0) at VOP_OPEN_APV+0x69 > vn_open_cred(e505cbc0,e505ccc0,96c,c2275d00,3) at vn_open_cred+0x352 > vn_open(e505cbc0,e505ccc0,96c,3,3a4) at vn_open+0x33 > kern_open(c2360a80,bfbfef38,0,7,804eb7c) at kern_open+0xd2 > open(c2360a80,e505cd04,c,3ff,3) at open+0x36 > syscall(3b,3b,3b,804e65d,bfbfe9fc) at syscall+0x13b > Xint0x80_syscall() at Xint0x80_syscall+0x1f > - --- syscall (5, FreeBSD ELF32, open), eip = 0x280ca00f, esp = > 0xbfbfe89c, ebp = 0xbfbfee58 --- > > Long version (What's up with the line numbers? The KASSERT triggered in > frame #22 was on line 138-139, not 141.): > > #21 0xc04f4053 in panic (fmt=0xc06b3b4f "sleeping without a mutex") at > /usr/src/sys/kern/kern_shutdown.c:537 > #22 0xc04fb8e1 in msleep (ident=0xc23cc200, mtx=0x0, priority=76, > wmesg=0xc06abfaa "usbsyn", timo=0) > at /usr/src/sys/kern/kern_synch.c:141 > #23 0xc049c999 in usbd_transfer (xfer=0xc23cc200) at > /usr/src/sys/dev/usb/usbdi.c:344 > #24 0xc049d255 in usbd_do_request_flags_pipe (dev=0xc23ac000, pipe=0x0, > req=0xe505c8f8, data=0x0, flags=0, actlen=0x0, timeout=0) > at /usr/src/sys/dev/usb/usbdi.c:978 > #25 0xc049d3a8 in usbd_do_request_flags (dev=0x0, req=0x0, data=0x0, > flags=0, actlen=0x0, timo=0) > at /usr/src/sys/dev/usb/usbdi.c:949 > #26 0xc049d3e1 in usbd_do_request (dev=0x0, req=0x0, data=0x0) at > /usr/src/sys/dev/usb/usbdi.c:941 > #27 0xc049d515 in usbd_clear_endpoint_stall (pipe=0xc25f0680) at > /usr/src/sys/dev/usb/usbdi.c:587 > #28 0xc049b83d in usbd_setup_pipe (dev=0x0, iface=0x0, ep=0xc23c4ba0, > ival=0, pipe=0x0) at /usr/src/sys/dev/usb/usb_subr.c:783 > #29 0xc049c789 in usbd_open_pipe_ival (iface=0xc2392d00, address=129 > '\201', flags=1 '\001', pipe=0x0, ival=0) > at /usr/src/sys/dev/usb/usbdi.c:210 > #30 0xc049cb7f in usbd_open_pipe_intr (iface=0xc2392d00, address=129 > '\201', flags=4 '\004', pipe=0x0, priv=0x0, buffer=0x0, > len=0, cb=0, ival=0) at /usr/src/sys/dev/usb/usbdi.c:231 > #31 0xc0498d02 in ums_open (dev=0x0, flag=7, fmt=8192, p=0xc2360a80) at > /usr/src/sys/dev/usb/ums.c:600 > #32 0xc04a1c97 in devfs_open (ap=0xe505ca50) at > /usr/src/sys/fs/devfs/devfs_vnops.c:821 > #33 0xc06903c8 in VOP_OPEN_APV (vop=0x0, a=0xe505ca50) at vnode_if.c:373 > #34 0xc0562d80 in vn_open_cred (ndp=0xe505cbc0, flagp=0xe505ccc0, > cmode=2412, cred=0xc2275d00, fdidx=3) at vnode_if.h:198 > #35 0xc0562fb1 in vn_open (ndp=0x0, flagp=0x0, cmode=0, fdidx=0) at > /usr/src/sys/kern/vfs_vnops.c:91 > #36 0xc0559e3c in kern_open (td=0xc2360a80, path=0x0, > pathseg=UIO_USERSPACE, flags=7, mode=134540156) > at /usr/src/sys/kern/vfs_syscalls.c:972 > #37 0xc055a65f in open (td=0x0, uap=0xe505cd04) at > /usr/src/sys/kern/vfs_syscalls.c:938 > #38 0xc0678f99 in syscall (frame= > {tf_fs = 59, tf_es = 59, tf_ds = 59, tf_edi = 134538845, tf_esi = > - -1077941764, tf_ebp = -1077940648, tf_isp = -452604572, tf_ebx = 0, > tf_edx = 0, tf_ecx = 2, tf_eax = 5, tf_trapno = 12, tf_err = 2, tf_eip = > 671916047, tf_cs = 51, tf_eflags = 582, tf_esp = -1077942116, tf_ss = > 59}) at /usr/src/sys/i386/i386/trap.c:951 > #39 0xc06672bf in Xint0x80_syscall () at > /usr/src/sys/i386/i386/exception.s:200 > > - -- > Jonathan Noack | noackjr@alumni.rice.edu | OpenPGP: 0x991D8195 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (FreeBSD) > > iD8DBQFCdA3JUFz01pkdgZURArTDAJ9gy5MO8SESNJj8Xp7zBHje0YLh9wCfbyHv > cwjq0KIIpXapO47xIDhbsnA= > =3foK > -----END PGP SIGNATURE----- >