Date: Wed, 22 Jan 2003 10:48:04 -0800 From: <Vijay.Singh@nokia.com> To: <hackers@freebsd.org> Subject: panic with kqueue Message-ID: <4D7B558499107545BB45044C63822DDE8588CD@mvebe001.americas.nokia.com>
index | next in thread | raw e-mail
Greetings. I am trying to port kqueue to a FreeBSD 2.x based system. I have taken the base code from the 4.4.0-Release and then merged fixes all the way to the current version of the kern_event.c file. Some other changes needed were
1. adding struct klist p_klist to the proc struct
2. adding struct klist si_note to the selinfo struct
3. adding function pointer fo_kqfilter and file type DTYPE_KUEUE to the file struct
etc
I have added a KNOTE(&p1->p_klist, NOTE_FORK | p2->p_pid); to kern_fork.c and I get this panic
Fatal trap 12: page fault while in kernel mode
fault virtual address = 0x46
fault code = supervisor read, page not present
instruction pointer = 0x8:0xc01716c8
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 1 (init)
interrupt mask =
kernel: type 12 trap, code=0
panic: page fault
syncing disks... done
kernel stack backtrace:
_panic(fmt=100) at _panic+0x64
_panic(fmt=c02dbdac) at _panic+0x64
_trap_fatal(frame=bfbffebc) at _trap_fatal+0x2b3
_trap_pfault(frame=bfbffebc,usermode=0) at _trap_pfault+0x1ac
_trap(frame=e7710010) at _trap+0x277
calltrap() at calltrap+0x15
--- trap 12, eip = 0xc01716c8, ebp = 0xbfbfff00 ---
_knote(list=c7c8f700,hint=40000005) at _knote+0x14
_fork1(p1=c7c8f600,isvfork=0,retval=bfbfff8c) at _fork1+0x3fb
_fork(p=c7c8f600,uap=bfbfff94,retval=bfbfff8c) at _fork+0x10
_syscall(frame=27) at _syscall+0x172
_Xsyscall() at _Xsyscall+0x2b
--- syscall 2, eip = 0x7d05, ebp = 0xbfbfbd3c ---
Rebooting...
I would really appreciate if someone could offer some help as this is my first real kernel work. I am guessing that either the kqueue module has not been inited (I dont have SYSINIT and zalloc stuff, I replaced the zalloc with malloc) or the p->p_klist isnt being initialized probably with a SLIST_INIT( ). Please help.
regards
vijay
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D7B558499107545BB45044C63822DDE8588CD>
