Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jul 2002 22:47:13 -0700
From:      Bakul Shah <bakul@bitblocks.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        Szilveszter Adam <sziszi@bsd.hu>, freebsd-current@FreeBSD.ORG
Subject:   Re: Interesting panic very early in the boot 
Message-ID:  <200207170547.BAA03460@illustrious.cnchost.com>
In-Reply-To: Your message of "Sun, 14 Jul 2002 15:15:44 PDT." <Pine.BSF.4.21.0207141511470.58654-100000@InterJet.elischer.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
I've run into a very similar bug -- the kernel panics almost
right after it is started by the loader.  With remote gdb
I've traced it to this point so far:

(kgdb) target remote /dev/cuaa0
Remote debugging using /dev/cuaa0
pmap_set_opt () at /usr/src/sys/i386/i386/pmap.c:449
449                                     if (*pte)
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
warning: shared library handler failed to enable breakpoint
(kgdb) where
#0  pmap_set_opt () at /usr/src/sys/i386/i386/pmap.c:449
#1  0xc0307c64 in pmap_bootstrap (firstaddr=3146924, loadaddr=0)
    at /usr/src/sys/i386/i386/pmap.c:403 
#2  0xc03056b2 in getmemsize (first=4947968)
    at /usr/src/sys/i386/i386/machdep.c:1473
#3  0xc0305e2f in init386 (first=4947968)
    at /usr/src/sys/i386/i386/machdep.c:1817
(kgdbl
444                             /* Turn on PG_G for text, data, bss pages. */
445                             va = (vm_offset_t)btext;
446                             endva = KERNBASE + KERNend;
447                             while (va < endva) {
448                                     pte = vtopte(va);
449                                     if (*pte)
450                                             *pte |= pgeflag;
451                                     va += PAGE_SIZE;
452                             }
453                             invltlb();      /* Insurance */
(kgdb) p/x va
$2 = 0xc012be70

I can't get to pte for some reason.  So hand computing vtopte(va) we get

(kgdb) p/x btext
$3 = 0xc012be70
(kgdb) p PTmap
$7 = 0xbfc00000
(kgdb) p/x PTmap+0xc012b
$8 = 0xbff004ac

This address matches the page fault address.  It is a
supervisor read, protection violation fault.

More details:

This is with today's (July 16) kernel (synced at about 5PM
PDT) on a Ppro system.  This system can take two PPros but
I've plugged in just one Pentium Pro.  It has 64MB ECC
memory.  I'll continue investigating but I haven't been in
this part of code for ages hence the call for help!

If it matters, a kernel built from sources before the KSE
changes works fine on this machine.

Thanks for any hints.

-- bakul

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207170547.BAA03460>