From owner-freebsd-current@FreeBSD.ORG Tue Mar 24 21:29:40 2009 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 2755810657A0 for ; Tue, 24 Mar 2009 21:29:40 +0000 (UTC) (envelope-from mwest@zeeb.org) Received: from zeeb.org (zeeb.org [88.198.32.244]) by mx1.freebsd.org (Postfix) with ESMTP id B75BB8FC7C for ; Tue, 24 Mar 2009 21:29:20 +0000 (UTC) (envelope-from mwest@zeeb.org) Received: from mwest by zeeb.org with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LmEBT-000Gpl-SS; Tue, 24 Mar 2009 21:29:19 +0000 Date: Tue, 24 Mar 2009 21:29:19 +0000 From: Matthew West To: Jaakko Heinonen Message-ID: <20090324212919.GA64083@zeeb.org> References: <20090323140820.GA37093@zeeb.org> <20090324180437.GA952@a91-153-125-115.elisa-laajakaista.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090324180437.GA952@a91-153-125-115.elisa-laajakaista.fi> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: Matthew West Cc: 7ogcg7g02@sneakemail.com, freebsd-current@freebsd.org Subject: Re: panic: Bad link elm, nfsd related? 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, 24 Mar 2009 21:29:49 -0000 Hi Jaakko, On Tue, Mar 24, 2009 at 08:04:38PM +0200, Jaakko Heinonen wrote: > On 2009-03-23, Matthew West wrote: > > panic: Bad link elm 0xffffff0011febc00 next->prev != elm > > It looks like an attempt to remove xprt twice from tail queue due to > race. Does this patch make any difference? > > %%% > Index: sys/rpc/svc.c > =================================================================== > --- sys/rpc/svc.c (revision 189918) > +++ sys/rpc/svc.c (working copy) > @@ -296,8 +296,10 @@ xprt_unregister_locked(SVCXPRT *xprt) > TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); > xprt->xp_active = FALSE; > } > - TAILQ_REMOVE(&pool->sp_xlist, xprt, xp_link); > - xprt->xp_registered = FALSE; > + if (xprt->xp_registered) { > + TAILQ_REMOVE(&pool->sp_xlist, xprt, xp_link); > + xprt->xp_registered = FALSE; > + } > } > > void > %%% Thanks for the patch. I applied it, and after a couple of hours, the machine produced another panic: ---------- Fatal trap 9: general protection fault while in kernel mode cpuid = 3; apic id = 03 instruction pointer = 0x8:0xffffffff80716808 stack pointer = 0x10:0xfffffffe9b979ae0 frame pointer = 0x10:0xfffffffe9b979af0 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 920 (nfsd: service) [thread pid 920 tid 100283 ] Stopped at xprt_assignthread+0x8: movq 0x70(%rdx),%rax db> bt Tracing pid 920 tid 100283 td 0xffffff0001b62720 xprt_assignthread() at xprt_assignthread+0x8 svc_run_internal() at svc_run_internal+0x49e svc_thread_start() at svc_thread_start+0xb fork_exit() at fork_exit+0x12a fork_trampoline() at fork_trampoline+0xe --- trap 0xc, rip = 0x800695c4c, rsp = 0x7fffffffe8e8, rbp = 0 --- ---------- I was unfortunately unable to generate a crash dump, and for now I have gone back to the previous kernel. Let me know if there's anything else you'd like to try. Thanks, Matthew