From owner-freebsd-current@FreeBSD.ORG Wed Apr 29 21:14:45 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 8F0FF1065674 for ; Wed, 29 Apr 2009 21:14:45 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from skerryvore.cs.uoguelph.ca (skerryvore.cs.uoguelph.ca [131.104.94.204]) by mx1.freebsd.org (Postfix) with ESMTP id 52C988FC13 for ; Wed, 29 Apr 2009 21:14:44 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by skerryvore.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id n3TLEZjs030657; Wed, 29 Apr 2009 17:14:39 -0400 Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n3TLLaK08605; Wed, 29 Apr 2009 17:21:36 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Wed, 29 Apr 2009 17:21:36 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Matthew West In-Reply-To: <20090429182440.GA74110@zeeb.org> Message-ID: References: <20090323140820.GA37093@zeeb.org> <20090429182440.GA74110@zeeb.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.63 on 131.104.94.204 Cc: 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: Wed, 29 Apr 2009 21:14:45 -0000 On Wed, 29 Apr 2009, Matthew West wrote: > > Unread portion of the kernel message buffer: > panic: Bad link elm 0xffffff00074ef400 next->prev != elm > cpuid = 1 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2a > panic() at panic+0x182 > xprt_inactive_locked() at xprt_inactive_locked+0x78 > svc_vc_rendezvous_recv() at svc_vc_rendezvous_recv+0x335 > svc_run_internal() at svc_run_internal+0x347 > svc_run() at svc_run+0x94 > nlm_syscall() at nlm_syscall+0x826 > syscall() at syscall+0x1e7 > Xfast_syscall() at Xfast_syscall+0xab > --- syscall (154, FreeBSD ELF64, nlm_syscall), rip = 0x8008b7c6c, rsp = 0x7fffffffecf8, rbp = 0x7fffffffee20 --- > > Any suggestions? Should I go back to the newer RPC implementation? > The crash was in the new rpc, which is always used by the nlm. You could try the following patch to sys/rpc/svc.c, if you wanted to live on the "bleeding edge". Good luck with it, if you try it, rick --- untested patch for sys/rpc/svc.c --- *** svc.c.sav Wed Apr 29 17:04:38 2009 --- svc.c Wed Apr 29 17:13:36 2009 *************** *** 362,367 **** --- 362,375 ---- mtx_lock(&pool->sp_lock); + if (!xprt->xp_registered) { + /* + * Race with xprt_unregister - we lose. + */ + mtx_unlock(&pool->sp_lock); + return; + } + if (!xprt->xp_active) { TAILQ_INSERT_TAIL(&pool->sp_active, xprt, xp_alink); xprt->xp_active = TRUE;