From owner-freebsd-current@FreeBSD.ORG Mon Jan 28 20:53:04 2008 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 A352616A469 for ; Mon, 28 Jan 2008 20:53:04 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 55CF613C4E5 for ; Mon, 28 Jan 2008 20:53:04 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id E854E47D9C; Mon, 28 Jan 2008 15:53:03 -0500 (EST) Date: Mon, 28 Jan 2008 20:53:03 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Kip Macy In-Reply-To: Message-ID: <20080128205036.S56811@fledge.watson.org> References: <20080128180840.GA9582@lizzy.catnook.local> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org Subject: Re: panic: Lock so_rcv_sx not exclusively locked 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: Mon, 28 Jan 2008 20:53:04 -0000 On Mon, 28 Jan 2008, Kip Macy wrote: > Thanks for the bug report. It looks like this can probably be fixed by > simply not calling sbunlock if sblock failed. I anticipate this being fixed > shortly. It looks like the logic is in somewhat the wrong order in sorflush() -- likely we should be issuing socantrcvmore_locked() before sblock() in order to dislodge the threads currently using the socket/socket buffer, then perform a non-interruptible sblock() to wait for them to fall out. However, it would be useful to confirm what the other threads are doing--most likely blocked on read, but I want to be sure. Robert N M Watson Computer Laboratory University of Cambridge > > > -Kip > > > On Jan 28, 2008 10:08 AM, Jos Backus wrote: >> Recent -current kernels can reliably be made to panic by killing npviewer.bin. >> Right before killing, npviewer.bin shows up like this in top: >> >> 6288 jos 1 45 5 62844K 36788K so_rcv 0:08 0.00% npviewer.bin >> >> lizzy:~/crash% kgdb /usr/obj/usr/src/sys/LIZZY/kernel.debug vmcore.1 >> kgdb: kvm_nlist(_stopped_cpus): >> kgdb: kvm_nlist(_stoppcbs): >> [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"] >> GNU gdb 6.1.1 [FreeBSD] >> Copyright 2004 Free Software Foundation, Inc. >> GDB is free software, covered by the GNU General Public License, and you are >> welcome to change it and/or distribute copies of it under certain conditions. >> Type "show copying" to see the conditions. >> There is absolutely no warranty for GDB. Type "show warranty" for details. >> This GDB was configured as "i386-marcel-freebsd". >> >> Unread portion of the kernel message buffer: >> panic: Lock so_rcv_sx not exclusively locked @ /usr/src/sys/kern/uipc_sockbuf.c:157 >> >> Uptime: 5h23m39s >> Physical memory: 1527 MB >> Dumping 247 MB: 232 216 200 184 168 152 136 120 104 88 72 56 40 24 8 >> >> #0 doadump () at pcpu.h:195 >> 195 pcpu.h: No such file or directory. >> in pcpu.h >> (kgdb) bt >> #0 doadump () at pcpu.h:195 >> #1 0xc05435ef in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:417 >> #2 0xc0543867 in panic (fmt=Variable "fmt" is not available. >> ) at /usr/src/sys/kern/kern_shutdown.c:571 >> #3 0xc054a427 in _sx_assert (sx=0xc4fb89a0, what=4, >> file=0xc06d49ca "/usr/src/sys/kern/uipc_sockbuf.c", line=157) >> at /usr/src/sys/kern/kern_sx.c:931 >> #4 0xc054a8da in _sx_xunlock (sx=0xc4fb89a0, >> file=0xc06d49ca "/usr/src/sys/kern/uipc_sockbuf.c", line=157) >> at /usr/src/sys/kern/kern_sx.c:316 >> #5 0xc0595444 in sbunlock (sb=0xc4fb8968) >> at /usr/src/sys/kern/uipc_sockbuf.c:157 >> #6 0xc0598245 in sorflush (so=0xc4fb8918) >> at /usr/src/sys/kern/uipc_socket.c:1902 >> #7 0xc05982df in soshutdown (so=0xc4fb8918, how=2) >> at /usr/src/sys/kern/uipc_socket.c:1866 >> #8 0xc059ce86 in shutdown (td=0xc4b31880, uap=0xe7219c58) >> at /usr/src/sys/kern/uipc_syscalls.c:1248 >> #9 0xc07ffa80 in ?? () >> #10 0xc4b31880 in ?? () >> #11 0xe7219c58 in ?? () >> #12 0x00000008 in ?? () >> #13 0x00000000 in ?? () >> #14 0x00000000 in ?? () >> #15 0xc103d800 in ?? () >> #16 0x00000c1e in ?? () >> #17 0x00000000 in ?? () >> #18 0xc4e25488 in ?? () >> #19 0xc5007e9c in ?? () >> #20 0x00000000 in ?? () >> #21 0x00000000 in ?? () >> #22 0xe7219c72 in ?? () >> #23 0x00000004 in ?? () >> #24 0x80000000 in ?? () >> #25 0xe7219c8c in ?? () >> ---Type to continue, or q to quit--- >> #26 0xc06a1a44 in __qdivrem (uq=Unhandled dwarf expression opcode 0x93 >> ) at /usr/src/sys/libkern/qdivrem.c:186 >> #27 0xc0697b93 in syscall (frame=0xe7219d38) >> at /usr/src/sys/i386/i386/trap.c:1034 >> #28 0xc06818b0 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:203 >> #29 0x00000033 in ?? () >> Previous frame inner to this frame (corrupt stack?) >> (kgdb) >> >> >> -- >> Jos Backus >> jos at catnook.com >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >> > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >