From owner-freebsd-questions Thu Mar 8 17:11:19 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 4EE5737B719 for ; Thu, 8 Mar 2001 17:11:11 -0800 (PST) (envelope-from mwm@mired.org) Received: (qmail 17341 invoked by uid 100); 9 Mar 2001 01:11:09 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15016.11693.821136.686569@guru.mired.org> Date: Thu, 8 Mar 2001 19:11:09 -0600 To: Trevin Chow Cc: questions@freebsd.org Subject: Re: Trying to debug my kernel -- but lost :) In-Reply-To: <97072546@toto.iv> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Trevin Chow types: > Hi guys, > > I'm trying to follow the directions in the FreeBSD handbook about debugging > the kernel using my dumped core with gbd, but I'm totally lost :) > > I followed the directions about entering "symbol-file kernel.debug", > "exec-file /var/crash/kernel.0" and "exec-file /var/crash/vmcore.0". Now > I'm in gdb with no idea what to do.. I've never debugged with gdb and I > have no clue where to go from here.... this is all a little beyond me :) Well the 'help' command in gdb provides a lot of information. Given that you can't really run the kernel, you have to settle for examining the code and the system state at the time it was running. > Here's the output from my session: That one is documented in the crash man page. Your file system is corrupt. That's either the result of an earlier crash, or a hardware failure. Making sure you do an fsck should fix this problem. ------------------------------------- > > (/sys/compile/BENNY)--# gdb -k > > (kgdb) symbol-file kernel.debug > Reading symbols from kernel.debug...done. > (kgdb) exec-file /var/crash/kernel.0 > (kgdb) core-file /var/crash/vmcore.0 > IdlePTD 2830336 > initial pcb at 2380e0 > panicstr: ffs_valloc: dup alloc > panic messages: > --- > panic: ffs_valloc: dup alloc > > syncing disks... 119 117 91 61 28 7 > done > Uptime: 1d18h32m12s > > dumping to dev #ad/0x20001, offset 163840 > dump ata0: resetting devices .. done > 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 dumpsys () at ../../kern/kern_shutdown.c:469 > 469 if (dumping++) { > (kgdb) where > #0 dumpsys () at ../../kern/kern_shutdown.c:469 > #1 0xc01392ef in boot (howto=256) at ../../kern/kern_shutdown.c:309 > #2 0xc013966c in poweroff_wait (junk=0xc0208621, howto=-1071610368) at > ../../kern/kern_shutdown.c:556 > #3 0xc0196bc4 in ffs_valloc (pvp=0xc4f3ed40, mode=33133, cred=0xc0a57000, > vpp=0xc4feaca4) at ../../ufs/ffs/ffs_alloc.c:609 > #4 0xc01a8fc3 in ufs_makeinode (mode=33133, dvp=0xc4f3ed40, > vpp=0xc4feaee0, cnp=0xc4feaef4) at ../../ufs/ufs/ufs_vnops.c:2082 > #5 0xc01a6978 in ufs_create (ap=0xc4feae00) at ../../ufs/ufs/ufs_vnops.c:184 > #6 0xc01a917d in ufs_vnoperate (ap=0xc4feae00) at > ../../ufs/ufs/ufs_vnops.c:2287 > #7 0xc016bdd8 in vn_open (ndp=0xc4feaecc, fmode=1550, cmode=365) at > vnode_if.h:106 > #8 0xc0168004 in open (p=0xc4f8e8e0, uap=0xc4feaf80) at > ../../kern/vfs_syscalls.c:995 > #9 0xc01e7a29 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, > tf_edi = 134817981, tf_esi = 27, tf_ebp = -1077937464, > tf_isp = -989941804, tf_ebx = 1549, tf_edx = 27, tf_ecx = -30, > tf_eax = 5, tf_trapno = 7, tf_err = 2, tf_eip = 134680024, > tf_cs = 31, tf_eflags = 518, tf_esp = -1077937828, tf_ss = 47}) at > ../../i386/i386/trap.c:1150 > #10 0xc01dc4a5 in Xint0x80_syscall () > #11 0x8050a1d in ?? () > #12 0x8052da2 in ?? () > #13 0x8048135 in ?? () > (kgdb) > > -------------------------- > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -- Mike Meyer http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message