From owner-freebsd-hackers Wed Jan 22 10:49:11 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AFBB37B401 for ; Wed, 22 Jan 2003 10:49:09 -0800 (PST) Received: from mgw-dax1.ext.nokia.com (mgw-dax1.ext.nokia.com [63.78.179.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6991043ED8 for ; Wed, 22 Jan 2003 10:49:08 -0800 (PST) (envelope-from Vijay.Singh@nokia.com) Received: from davir02nok.americas.nokia.com (davir02nok.americas.nokia.com [172.18.242.85]) by mgw-dax1.ext.nokia.com (Switch-2.2.1/Switch-2.2.0) with ESMTP id h0MImnB21300 for ; Wed, 22 Jan 2003 12:48:59 -0600 (CST) Received: from daebh002.NOE.Nokia.com (unverified) by davir02nok.americas.nokia.com (Content Technologies SMTPRS 4.2.5) with ESMTP id for ; Wed, 22 Jan 2003 12:48:33 -0600 Received: from mvebe001.NOE.Nokia.com ([172.18.140.37]) by daebh002.NOE.Nokia.com with Microsoft SMTPSVC(5.0.2195.5329); Wed, 22 Jan 2003 12:48:05 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Subject: panic with kqueue Date: Wed, 22 Jan 2003 10:48:04 -0800 Message-ID: <4D7B558499107545BB45044C63822DDE8588CD@mvebe001.americas.nokia.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: panic with kqueue Thread-Index: AcLCRsuWgIZPoC3nEdeaKgAAhky2+w== From: To: X-OriginalArrivalTime: 22 Jan 2003 18:48:05.0330 (UTC) FILETIME=[CC71BB20:01C2C246] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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=20 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 =3D 0x46 fault code =3D supervisor read, page not present instruction pointer =3D 0x8:0xc01716c8 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, def32 1, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 1 (init) interrupt mask =3D=20 kernel: type 12 trap, code=3D0 panic: page fault syncing disks... done kernel stack backtrace: _panic(fmt=3D100) at _panic+0x64 _panic(fmt=3Dc02dbdac) at _panic+0x64 _trap_fatal(frame=3Dbfbffebc) at _trap_fatal+0x2b3 _trap_pfault(frame=3Dbfbffebc,usermode=3D0) at _trap_pfault+0x1ac _trap(frame=3De7710010) at _trap+0x277 calltrap() at calltrap+0x15 --- trap 12, eip =3D 0xc01716c8, ebp =3D 0xbfbfff00 --- _knote(list=3Dc7c8f700,hint=3D40000005) at _knote+0x14 _fork1(p1=3Dc7c8f600,isvfork=3D0,retval=3Dbfbfff8c) at _fork1+0x3fb _fork(p=3Dc7c8f600,uap=3Dbfbfff94,retval=3Dbfbfff8c) at _fork+0x10 _syscall(frame=3D27) at _syscall+0x172 _Xsyscall() at _Xsyscall+0x2b --- syscall 2, eip =3D 0x7d05, ebp =3D 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