Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2009 21:29:19 +0000
From:      Matthew West <mwest@l.zeeb.org>
To:        Jaakko Heinonen <jh@saunalahti.fi>
Cc:        7ogcg7g02@sneakemail.com, freebsd-current@freebsd.org
Subject:   Re: panic: Bad link elm, nfsd related?
Message-ID:  <20090324212919.GA64083@zeeb.org>
In-Reply-To: <20090324180437.GA952@a91-153-125-115.elisa-laajakaista.fi>
References:  <20090323140820.GA37093@zeeb.org> <20090324180437.GA952@a91-153-125-115.elisa-laajakaista.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090324212919.GA64083>