From owner-freebsd-questions Fri Nov 28 07:40:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA20074 for questions-outgoing; Fri, 28 Nov 1997 07:40:10 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from BIGFUN.vwcom.com (BIGFUN.vwcom.com [151.197.101.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id HAA20066 for ; Fri, 28 Nov 1997 07:40:05 -0800 (PST) (envelope-from bmc@WillsCreek.COM) Received: from WillsCreek.COM (gw.willscreek.com [151.197.101.46]) by BIGFUN.vwcom.com (8.8.6/8.8.6) with ESMTP id KAA23525 for ; Fri, 28 Nov 1997 10:35:07 -0500 (EST) Received: from current.willscreek.com (current.willscreek.com [172.16.87.1]) by WillsCreek.COM (8.8.5/8.8.5) with ESMTP id KAA02499 for ; Fri, 28 Nov 1997 10:39:56 -0500 (EST) Received: (from bmc@localhost) by current.willscreek.com (8.8.5/8.8.5) id KAA11894; Fri, 28 Nov 1997 10:39:56 -0500 (EST) Date: Fri, 28 Nov 1997 10:39:56 -0500 (EST) Message-Id: <199711281539.KAA11894@current.willscreek.com> From: Brian Clapper MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: questions@freebsd.org Subject: Re: Natd ??? In-Reply-To: <37379100@toto.iv> X-Mailer: VM 6.23 under Emacs 19.34.1 Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Frederico Pereira da Costa wrote: > I am using Free BSD 2.2.2 and i have added > the daemon natd, and now i am receiving this > error randomly ... > > autor kernel log messages: > > enabled, logging disabled > > WARNING: / was not properly dismounted. > > > > Fatal trap 12: page fault while in kernel mode > > fault virtual address = 0xf0582000 > > fault code = supervisor read, page not present > > instruction pointer = 0x8:0xf014452e > > stack pointer = 0x10:0xefbffde4 > > frame pointer = 0x10:0xefbffde8 > > 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 = 166 (natd) > > interrupt mask = net tty > > panic: page fault > > > > syncing disks... Copyright (c) 1992-1997 FreeBSD Inc. > > Anyone can help me, because this happen on 10 a 20 min interval, > and this is our server connect to internet > > Thanks in advance > > Frederico This is a known problem with natd on 2.2.2-RELEASE; if you search the archive for this mailing list (go to http://www.freebsd.org and follow the `search' link), you'll find it's come up before. I solved it here by adapting a kernel source patch that was posted to the list. I've enclosed the patch I used, as a shar (shell archive) file. Here's the README from that file: This file patches the FreeBSD 2.2.2-RELEASE version of `/usr/src/sys/net/ppp_tty.c' so it won't panic the system when used with natd(8). According to traffic on the `freebsd-questions' mailing list, the problem was that pppfcs() was being called sometimes with a negative `m->m_len'. The patch simply ensures that a negative `m->m_len' value is reset to 0 before calls to pppfcs(). According to a message posted by Brian Somers (brian@freebsd.org, `http://freebsd.org/~brian/') on the `freebsd-questions' mailing list, the real underlying problem has been corrected for newer versions of FreeBSD. Thus, if you upgrade to 2.2.5-RELEASE, your problem should go away and you should need this patch. If, however, upgrading is not practical for you at this time, you can try the enclosed kernel patch. To unpack it, save the `shar' portion to a file and run it through /bin/sh. Or, if you have the `sharutils' port/package installed, just run the entire mail message through `gunshar'. To install the patch, run the `pppd+natd-panic-patch' through patch(1), while in the `/usr/src/sys/net/' directory. Then rebuild your kernel, install the new kernel, and reboot. Make sure the diffs were applied properly *before* you rebuild your kernel. I've been using a 2.2.2-RELEASE kernel with the enclosed patch for more than two months now, and the problem has not recurred. Of course, your mileage may vary; as always, when patching the kernel, be aware that you may actually make your problems worse. ----- Brian Clapper, bmc@WillsCreek.COM, http://WWW.WillsCreek.COM/ Government expands to absorb all revenue and then some. #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'README' <<'END_OF_FILE' XFile: pppd+natd-panic-patch X X This file patches the FreeBSD 2.2.2-RELEASE version of X `/usr/src/sys/net/ppp_tty.c' so it won't panic the system when used X with natd(8). According to traffic on the `freebsd-questions' X mailing list, the problem was that pppfcs() was being called X sometimes with a negative `m->m_len'. The patch simply ensures X that a negative `m->m_len' value is reset to 0 before calls to X pppfcs(). X X According to a message posted by Brian Somers (brian@freebsd.org, X `http://freebsd.org/~brian/') on the `freebsd-questions' mailing X list, the real underlying problem has been corrected for newer X versions of FreeBSD. X Xbmc@WillsCreek.COM END_OF_FILE if test 660 -ne `wc -c <'README'`; then echo shar: \"'README'\" unpacked with wrong size! fi # end of 'README' fi if test -f 'pppd+natd-panic-patch' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'pppd+natd-panic-patch'\" else echo shar: Extracting \"'pppd+natd-panic-patch'\" \(610 characters\) sed "s/^X//" >'pppd+natd-panic-patch' <<'END_OF_FILE' X*** ppp_tty.c.orig Fri Sep 5 09:10:37 1997 X--- ppp_tty.c Fri Sep 5 09:18:13 1997 X*************** X*** 671,676 **** X--- 671,678 ---- X } X X /* Calculate the FCS for the first mbuf's worth. */ X+ if (m->m_len < 0) X+ m->m_len = 0; X sc->sc_outfcs = pppfcs(PPP_INITFCS, mtod(m, u_char *), m->m_len); X } X X*************** X*** 775,780 **** X--- 777,784 ---- X sc->sc_if.if_obytes = sc->sc_bytessent; X break; X } X+ if (m->m_len < 0) X+ m->m_len = 0; X sc->sc_outfcs = pppfcs(sc->sc_outfcs, mtod(m, u_char *), m->m_len); X } X END_OF_FILE if test 610 -ne `wc -c <'pppd+natd-panic-patch'`; then echo shar: \"'pppd+natd-panic-patch'\" unpacked with wrong size! fi # end of 'pppd+natd-panic-patch' fi echo shar: End of shell archive. exit 0