From owner-freebsd-current Tue May 28 9:38:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from polaris.we.lc.ehu.es (polaris.we.lc.ehu.es [158.227.6.43]) by hub.freebsd.org (Postfix) with ESMTP id 816A137B403 for ; Tue, 28 May 2002 09:38:04 -0700 (PDT) Received: from v-ger.we.lc.ehu.es (v-ger [158.227.6.51]) by polaris.we.lc.ehu.es (8.11.6/8.11.6) with ESMTP id g4SGbwb04244; Tue, 28 May 2002 18:37:58 +0200 (MET DST) Received: (from jose@localhost) by v-ger.we.lc.ehu.es (8.11.6/8.11.6) id g4SGcAt02599; Tue, 28 May 2002 18:38:10 +0200 (CEST) (envelope-from jose) Date: Tue, 28 May 2002 18:38:10 +0200 From: "Jose M. Alcaide" To: David Wolfskill Cc: current@FreeBSD.ORG Subject: Re: Panic for today, in dev2udev() Message-ID: <20020528183810.I229@v-ger.we.lc.ehu.es> References: <200205281458.g4SEwdmk027179@bunrab.catwhisker.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200205281458.g4SEwdmk027179@bunrab.catwhisker.org>; from david@catwhisker.org on Tue, May 28, 2002 at 07:58:39AM -0700 X-Operating-System: FreeBSD 4.5-RELEASE Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, May 28, 2002 at 07:58:39AM -0700, David Wolfskill wrote: > No problem up to yesterday's -CURRENT (well, other than the 'could > sleep with "___ lock" locked from ___' messages), and built today's > OK, but here's what I got on the serial console on reboot: > > [...] > > Entropy harvesting: interrupts ethernet point_to_point. > > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; lapic.id = 00000000 > fault virtual address = 0x1c > fault code = supervisor read, page not present > instruction pointer = 0x8:0xc0193c66 > stack pointer = 0x10:0xda25db10 > frame pointer = 0x10:0xda25db10 > 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 = 43 (sysctl) > kernel: type 12 trap, code=0 > Stopped at dev2udev+0x10: movl 0x1c(%edx),%eax The panic is triggered by a "sysctl -a" invoked from /etc/rc while harvesting entropy data. The cause is a bug introduced in sys/kern/tty.c. Try the following patch (suggested by jhay@FreeBSD.org): Index: sys/kern/tty.c =================================================================== RCS file: /home/ncvs/src/sys/kern/tty.c,v retrieving revision 1.179 diff -u -r1.179 tty.c --- sys/kern/tty.c 28 May 2002 06:53:41 -0000 1.179 +++ sys/kern/tty.c 28 May 2002 12:30:20 -0000 @@ -2593,12 +2593,15 @@ xt.xt_cancc = tp->t_canq.c_cc; xt.xt_outcc = tp->t_outq.c_cc; XT_COPY(line); - xt.xt_dev = dev2udev(tp->t_dev); + if (tp->t_dev) + xt.xt_dev = dev2udev(tp->t_dev); XT_COPY(state); XT_COPY(flags); XT_COPY(timeout); - xt.xt_pgid = tp->t_pgrp->pg_id; - xt.xt_sid = tp->t_session->s_sid; + if (tp->t_pgrp) + xt.xt_pgid = tp->t_pgrp->pg_id; + if (tp->t_session) + xt.xt_sid = tp->t_session->s_sid; XT_COPY(termios); XT_COPY(winsize); XT_COPY(column); -- ****** Jose M. Alcaide // jose@we.lc.ehu.es // jmas@FreeBSD.org ****** ** "Beware of Programmers who carry screwdrivers" -- Leonard Brandwein ** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message