On Wed, Sep 29, 1999 at 09:51:49AM -0700, Alfred Perlstein <[EMAIL PROTECTED]>
wrote:
> excellent, using kgbd, can you please type "up" until you hit
> frame 5 and print the value of the ndp and some of the other
> variables? A listing of the code at that location would also
> be great. ('list')
Sorry I don't know anything about debugging, so I did some
trial-and-error game and used print on something which seemed emit
useful information. Useful from my point of view ;-) Hope it's really
useful. Otherwise please give exact guidelines or I can try limit memory
and get 32MB dump or so suitable for downloading.
Script started on Wed Sep 29 20:42:14 1999
myhakas# gdb -k /sys/compile/Myhakas/kernel.debug vmcore.1
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
SMP 2 cpus
IdlePTD 3211264
initial pcb at 298e00
panicstr: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
mp_lock = 01000002; cpuid = 1; lapic.id = 01000000
fault virtual address = 0x17
fault code = supervisor read, page not present
instruction pointer = 0x8:0xc017ad2c
stack pointer = 0x10:0xc8e5fca0
frame pointer = 0x10:0xc8e5fcf0
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 = 666 (netscape)
interrupt mask = none <- SMP: XXX
trap number = 12
panic: page fault
mp_lock = 01000002; cpuid = 1; lapic.id = 01000000
boot() called on cpu#1
syncing disks... 19 5 1 done
dumping to dev #da/0x20001, offset 0
dump 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109
108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83
82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54
53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25
24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
---
#0 boot (howto=256) at ../../kern/kern_shutdown.c:281
281 dumppcb.pcb_cr3 = rcr3();
(kgdb) where
#0 boot (howto=256) at ../../kern/kern_shutdown.c:281
#1 0xc0155349 in panic (fmt=0xc026de2f "page fault")
at ../../kern/kern_shutdown.c:531
#2 0xc0236400 in trap_fatal (frame=0xc8e5fc60, eva=23)
at ../../i386/i386/trap.c:907
#3 0xc0236071 in trap_pfault (frame=0xc8e5fc60, usermode=0, eva=23)
at ../../i386/i386/trap.c:800
#4 0xc0235ce7 in trap (frame={tf_fs = 1048600, tf_es = 16, tf_ds = 16,
tf_edi = -924451276, tf_esi = -924451236, tf_ebp = -924451600,
tf_isp = -924451700, tf_ebx = -1061078179, tf_edx = -924572480,
tf_ecx = 7, tf_eax = 7, tf_trapno = 12, tf_err = 0,
tf_eip = -1072190164, tf_cs = 8, tf_eflags = 66198,
tf_esp = -1061078179, tf_ss = 0}) at ../../i386/i386/trap.c:426
#5 0xc017ad2c in namei (ndp=0xc8e5fe34) at ../../kern/vfs_lookup.c:91
#6 0xc0c12eb5 in ?? ()
#7 0xc0c11c55 in ?? ()
#8 0xc0236642 in syscall (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
tf_edi = 677678720, tf_esi = 677674201, tf_ebp = -1077946400,
tf_isp = -924450860, tf_ebx = 677674201, tf_edx = -1077946464,
tf_ecx = -1077946464, tf_eax = 106, tf_trapno = 12, tf_err = 2,
tf_eip = 677666503, tf_cs = 31, tf_eflags = 582, tf_esp = -1077946504,
tf_ss = 47}) at ../../i386/i386/trap.c:1056
#9 0xc02241b1 in Xint0x80_syscall ()
#10 0x28644564 in ?? ()
(kgdb) up 5
#5 0xc017ad2c in namei (ndp=0xc8e5fe34) at ../../kern/vfs_lookup.c:91
91 ndp->ni_cnd.cn_cred = ndp->ni_cnd.cn_proc->p_ucred;
(kgdb) list
86 struct uio auio;
87 int error, linklen;
88 struct componentname *cnp = &ndp->ni_cnd;
89 struct proc *p = cnp->cn_proc;
90
91 ndp->ni_cnd.cn_cred = ndp->ni_cnd.cn_proc->p_ucred;
92 KASSERT(cnp->cn_cred && cnp->cn_proc, ("namei: bad cred/proc"));
93 KASSERT((cnp->cn_nameiop & (~OPMASK)) == 0,
94 ("namei: nameiop contaminated with flags"));
95 KASSERT((cnp->cn_flags & OPMASK) == 0,
(kgdb) print ndp
$1 = (struct nameidata *) 0xc8e5fe34
(kgdb) print *ndp
$2 = {ni_dirp = 0xc0d2b000 "/compat/linux/etc/ld.so.cache",
ni_segflg = UIO_SYSSPACE, ni_startdir = 0xc046d730, ni_rootdir = 0xc0462000,
ni_topdir = 0x871c000, ni_vp = 0xc8e5fe8c, ni_dvp = 0xc0233db8,
ni_pathlen = 3370408552,
ni_next = 0x871c000
"<Key>BackSpace\nosfDelete:<Key>Delete\nosfInsert:<Key>Insert\nosfAddMode:Shift
<Key>F8\nosfHelp:<Key>F1\nosfMenu:Shift<Key>F10\nosfMenuBar:<Key>F10", ni_loopcnt = 0,
ni_cnd = {cn_nameiop = 64, cn_flags = 3370394816,
cn_proc = 0x7, cn_cred = 0xc8e5ff00, cn_pnbuf = 0x0,
cn_nameptr = 0xc8e8076c "\034læÈ4\bèÈ\b\aèÈ\030\aèÈ",
cn_namelen = -1071400512, cn_hash = 3224050208, cn_consume = -924450988}}
(kgdb) print cnp
$3 = (struct componentname *) 0xc8e5fe5c
(kgdb) print *cnp
$4 = {cn_nameiop = 64, cn_flags = 3370394816, cn_proc = 0x7,
cn_cred = 0xc8e5ff00, cn_pnbuf = 0x0,
cn_nameptr = 0xc8e8076c "\034læÈ4\bèÈ\b\aèÈ\030\aèÈ",
cn_namelen = -1071400512, cn_hash = 3224050208, cn_consume = -924450988}
(kgdb) print namei_zone
$5 = (struct vm_zone *) 0xc0b3ed80
(kgdb) print *namei_zone
$6 = {zlock = {lock_data = 0}, zitems = 0xc8df3000, zfreecnt = 16,
zfreemin = 4, znalloc = 19713, zkva = 0, zpagecount = 0, zpagemax = 0,
zmax = 0, ztotal = 16, zsize = 1024, zalloc = 2, zflags = 0, zallocflag = 2,
zobj = 0x0, zname = 0xc025801f "NAMEI", znext = 0xc0756980}
(kgdb) print auio
$7 = {uio_iov = 0xc8e5ff80, uio_iovcnt = -1062066432, uio_offset = 3235033088,
uio_resid = -1059934208, uio_segflg = 677674201, uio_rw = 3233885669,
uio_procp = 0x28647cd9}
(kgdb) quit
myhakas# exit
exit
Thanks
--
Vallo Kallaste
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message