From owner-freebsd-current@FreeBSD.ORG Tue Jul 26 23:44:30 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org 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 5190116A41F; Tue, 26 Jul 2005 23:44:30 +0000 (GMT) (envelope-from mux@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D9C043D48; Tue, 26 Jul 2005 23:44:30 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 0BF1F5CB95; Tue, 26 Jul 2005 16:44:30 -0700 (PDT) Date: Wed, 27 Jul 2005 01:44:29 +0200 From: Maxime Henrion To: Jeremie Le Hen Message-ID: <20050726234429.GQ14567@elvis.mu.org> References: <20050726202330.GJ1610@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="7mxbaLlpDEyR1+x6" Content-Disposition: inline In-Reply-To: <20050726202330.GJ1610@obiwan.tataz.chchile.org> User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@FreeBSD.org, Paul Saab Subject: Re: panic in NFS/UDP code path 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: Tue, 26 Jul 2005 23:44:30 -0000 --7mxbaLlpDEyR1+x6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Jeremie Le Hen wrote: > Hi all, > > while doing a cvs diff with the repository living on an NFS mounted > volume, here is the panic I caught : > %%% > panic: mutex Giant not owned at ../../../netinet/ip_output.c:151 > KDB: stack backtrace: > kdb_backtrace() > panic() > _mtx_assert(c07a0a40,1,c07476c1,97,e5036b6c) at _mtx_assert+0x7c > ip_output(c2639200,0,e5036b70,0,0) at ip_output+0xcb > udp_output(c25f15a0,c2639200,0,0,c2307c80) at udp_output+0x550 > udp_send(c2a8e42c,0,c268a300,0,0) at udp_send+0x30 > nfs_timer(0,0,c073d3fc,125,c0777100) at nfs_timer+0x2b2 > softclock(0,0,c0739ca4,251,e5036d00) at softclock+0x29b > ithread_loop() > fork_exit() > fork_trampoline() > %%% > > I have a kernel dump, but it's very heavy (1 GB), so tell me what > commands you want me to issue in kgdb. > > The source are dated from the 2005.07.24... (I can't check the exact > date now, it's dumping ;p). You are running with debug.mpsafenet=0 ? This looks like a fallout from an earlier change to make nfs_timer() MPSAFE. I believe something like the atatched patch is needed, but ps@ would know best about this one. Cheers, Maxime --7mxbaLlpDEyR1+x6 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="nfs_socket.patch" ? nfs_socket.patch Index: nfs_socket.c =================================================================== RCS file: /home/ncvs/src/sys/nfsclient/nfs_socket.c,v retrieving revision 1.128 diff -u -r1.128 nfs_socket.c --- nfs_socket.c 19 Jul 2005 21:27:25 -0000 1.128 +++ nfs_socket.c 26 Jul 2005 23:39:32 -0000 @@ -1255,12 +1255,14 @@ */ rep->r_flags |= R_REXMIT_INPROG; mtx_unlock(&nfs_reqq_mtx); + NET_LOCK_GIANT(); if ((nmp->nm_flag & NFSMNT_NOCONN) == 0) error = (*so->so_proto->pr_usrreqs->pru_send) (so, 0, m, NULL, NULL, curthread); else error = (*so->so_proto->pr_usrreqs->pru_send) (so, 0, m, nmp->nm_nam, NULL, curthread); + NET_UNLOCK_GIANT(); mtx_lock(&nfs_reqq_mtx); rep->r_flags &= ~R_REXMIT_INPROG; wakeup((caddr_t)&rep->r_flags); --7mxbaLlpDEyR1+x6--