On 05/08/10 11:02 +0900, Jorgen Lundman wrote:
>
> > <snip>
> > fbt:nfssrv:rfs4_findopenowner:entry
> > {
> > self->traceme = 1;
> > }
> >
> > fbt:nfssrv:rfs4_dbsearch:entry
> > /self->traceme/
> > {
> > printf("%s %p ...", stringof(args[0]->dbi_keyname), args[1]);
> > }
> >
> > fbt:nfssrv:rfs4_findopenowner:return
> > {
> > self->traceme = 0;
> > }
> > </snip>
> >
> > cheers
> > -jan
> >
>
> Fascinating. The sources that I look at online
>
> (http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/nfs/nfs4_srv.c#7343)
> ... differ a little bit with the actual binaries (Since we run Sol 10 u8,
> and I don't think I can see those sources anywhere).
>
> But I managed to change it to:
>
> printf("%s %s %p ...", stringof(args[0]->keyname),
> stringof(args[0]->table->name),
> args[1]);
>
> and added to the "return" provider:
> printf("%p", args[1]);
>
Happy reverse engineering :)
>
> Which would presumably be equivalent to:
>
> 522 NFS4_DEBUG(table->debug & SEARCH_DEBUG,
> 523 (CE_NOTE, "Searching for key %p in table %s by %s",
> 524 key, table->name, idx->keyname));
>
> and prints items like:
>
> CPU ID FUNCTION:NAME
> 1 45602 rfs4_dbsearch:entry open_owner4 OpenOwner
> fffffe88ff5cbe90 ...
> 1 45619 rfs4_findopenowner:return ffffffff9bbcd598
> 3 45602 rfs4_dbsearch:entry open_owner4 OpenOwner
> fffffe88fd665090 ...
> 3 45619 rfs4_findopenowner:return ffffffff9bbcd9d8
>
> which is pleasing. Not entirely sure what it means of course. I guess I need
> to inspect the void *key to see what/who is actually looking up, but I can
> start with running this and confirming that it does sometimes return NULL
> when we get the troubles.
>
> I don't think I realised just how powerful dtrace is.
>
AFAIK rfs4_dbsearch can return NULL in two cases:
*) constructor of table entry fails
*) table reached maximum of its size (creation of new
entries is disabled). The limit seems to be 2147483647
(INT32_MAX).
best
-jan
_______________________________________________
nfs-discuss mailing list
[email protected]