Panic connecting to (broken) NFS server
Panic connecting to (broken) NFS server
- Subject: Panic connecting to (broken) NFS server
- From: Casey Marshall <email@hidden>
- Date: Fri, 3 Nov 2006 16:43:23 -0800
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.
No documentation exists anywhere that I can find that helps explain
how one writes a user-space NFS server, so I started with the Linux
user-space NFSD source, and then just resorted to using `rpcgen' on
the NFS and MOUNT XDR source. The code that produces is a little
strange, but usable. I would appreciate advice on how to write this
server, though, if anyone cares to offer it.
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.
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:
Fri Nov 3 15:51:03 2006
panic(cpu 0 caller 0x001A3135): Unresolved kernel trap (CPU 0, Type
0=divide error), registers:
CR0: 0x8001003b, CR2: 0x019dca04, CR3: 0x00d8c000, CR4: 0x000006e0
EAX: 0x00000001, EBX: 0x00000001, ECX: 0x00000000, EDX: 0x00000000
CR2: 0x13f13a94, EBP: 0x13f13ad8, ESI: 0x00000000, EDI: 0x00000000
EFL: 0x00010246, EIP: 0x003c827c, CS: 0x00000004, DS: 0x0257000c
Backtrace, Format - Frame : Return Address (4 potential args on stack)
0x13f138f8 : 0x128d1f (0x3c9540 0x13f1391c 0x131df4 0x0)
0x13f13938 : 0x1a3135 (0x3cf1f4 0x0 0x0 0x3ce954)
0x13f13a48 : 0x19a8d4 (0x13f13a60 0x1 0x454bd5aa 0x13f13abc)
0x13f13ad8 : 0x1e5cd8 (0x0 0x1 0x0 0x0)
0x13f13b38 : 0x1ddc80 (0x34a9318 0x13f13b54 0x13f13f18 0x13f13960)
0x13f13c48 : 0x1d7086 (0x34a9318 0x13f13cfc 0x0 0x13f13f18)
0x13f13d78 : 0x1d74a1 (0xbfffcf0c 0x0 0x0 0x0)
0x13f13f38 : 0x1d7536 (0xbfffcf0c 0x0 0x0 0x0)
0x13f13f68 : 0x378337 (0x2c695dc 0x24f5970 0x24f59b4 0x0)
0x13f13fc8 : 0x19acae (0x24fa2d8 0x0 0x19d0b5 0x24f8b04) No mapping
exists for frame pointer
Backtrace terminated-invalid frame pointer 0xbfff9558
Kernel version:
Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006;
root:xnu-792.13.8.obj~1/RELEASE_I386
This is on a MacBook Pro.
I'd appreciate any help or advice here, because now it seems like
this project will be impossible for me to work on, if each tiny bug
in my program crashes the kernel.
I'll gladly explain further what I'm trying to do with this file
system, and can post the code (it will be GPL, and part of a project
for school).
Thanks.
1. http://developer.apple.com/qa/qa2001/qa1242.html
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