Re: Panic connecting to (broken) NFS server
Re: Panic connecting to (broken) NFS server
- Subject: Re: Panic connecting to (broken) NFS server
- From: Casey Marshall <email@hidden>
- Date: Sun, 5 Nov 2006 23:59:32 -0800
On Nov 5, 2006, at 11:36 PM, Mike Mackovitch wrote:
On Fri, Nov 03, 2006 at 04:43:23PM -0800, Casey Marshall wrote:
Hi. I hope this is on-topic enough for this list:
I'm trying to write a "toy" stacking file system, using a user-space
NFS server. I'm doing this partly on the advice of QA1242 [1],
because no nicer API (such as FUSE) exists for OS X at the moment,
and because I don't want to write any VFS code if I can help it. This
seemed like the best approach to take, since indeed, I don't feel
like hacking through VFS for this project, nor debugging kernel
panics.
But OS X still panics when calling my NFS server. I didn't expect
that to happen, and I am now sad.
[...]
Back to my own server -- it *is* currently broken, because I'm still
working on it, and some NFS functions are stubbed out. I'm sure the
functions I have implemented are probably buggy, too, and I'm
guessing at what values need to go into some structures (like the one
getattr returns). But, even if this is the case, it doesn't seem like
this should crash the kernel.
An NFS server shouldn't crash the kernel and so we would greatly
appreciate
it if you would file a bug. Doing so will help Apple to make sure
this
gets addressed and it will probably also help you as you can get
feedback
on what to do to avoid the panic(s) until a fix can be released.
(If you really don't want to file a bug at least email me off-
list. Thanks!).
I'll look into filing a bug. I should be able to get a test case
together, if needed.
(In the meantime, code before revision 8 of http://
birchfs.googlecode.com/svn/ *should* reproduce this panic reliably;
and I filed a bug against my own program: http://code.google.com/p/
birchfs/issues/detail?id=1)
I can very reliably cause a kernel panic by mounting the file system
(using either 'mount_nfs' or Finder), and trying to list the contents
of the root directory. This is what shows up in my panic.log:
My first guess would be to make sure you're returning a non-zero value
in the the NFSv2 STATFS reply's "bsize" field.
That's probable; STATFS wasn't implemented yet, and GETATTR calls
were filling in some bogus values. I implemented STATFS and fixed
GETATTR, and the panic went away. So, yeah, it's quite likely one of
those -- the panic log mentions a math exception, so a bad divide is
a likely cause.
Also, a tool like ethereal/wireshark is immensely useful for debugging
network protocols like NFS.
I *do* hope that I won't have to look at Sun RPC over the wire, but
I'll keep that in mind :-)
Thanks!
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden