panic: nfssvc_nfsd(): debug.mpsafenet=1 && Giant

Christian Brueffer chris at
Wed Aug 25 08:07:33 PDT 2004

On Tue, Aug 24, 2004 at 11:18:55PM -0400, Robert Watson wrote:
> On Tue, 24 Aug 2004, Christian Brueffer wrote:
> > I'm getting the following panic on 6-CURRENT as well as 5.3-BETA1 with
> > sources from today.  It's easily reproducible on both, with
> > debug.mpsafenet=1. 
> Hmm.  Looks like something has acquired and failed to release Giant in the
> NFS server.  It could be we're leaking Giant in an error case that didn't
> turn up in previous testing, but for some reason is more common in your
> environment.  Unfortunately, as Giant can be acquired recursively, the
> "last acquired" information presented by WITNESS isn't useful to us.
> There are a couple of ways we could approach debugging this.  I think the
> easiest might be the following:
> - Recompile your kernel with the following options:
>   options KTR
>   options KTR_ENTRIES=16384
> - At run-time, before triggering the crash, use sysctl to set the
>   following settings:
>   sysctl debug.ktr.cpumask=0xff
>   sysctl debug.ktr.mask=`sysctl -n debug.ktr.compile`
> - When the crash occurs, use "show ktr" to list recent lock operations.
>   Using your serial console, copy and paste a few pages of locking
>   operations into an e-mail, probably until you hit the next context
>   switch (mi_switch: new thread).  You'll notice that the entries are
>   sorted by event id, which generally results in reverse-chronological
>   order with most recent event earliest.  We'd like to look at all
>   acquisitions of Giant and releases of Giant since that context switch.
>   There should be one or more acquires than releases in the event stream,
>   and we'd like to figure out which is the one not associated with a
>   matching unlock.

The complete output is available at

- Christian

Christian Brueffer	chris at	brueffer at
GPG Key:
GPG Fingerprint: A5C8 2099 19FF AACA F41B  B29B 6C76 178C A0ED 982D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-current mailing list