Subject: Re: CVS commit: src/lib/libpthread
To: None <current-users@netbsd.org>
From: =?ISO-8859-1?Q?Stefan_Kr=FCger?= <skrueger@meinberlikomm.de>
List: current-users
Date: 03/13/2005 23:51:41
Havard Eidnes wrote:
>>>What command are you using with "gdb"?  You do know that you
>>>can't open a kernel core like a program core; you have to use
>>>"target kcore netbsd.N.core" from within "gdb", and that if you
>>>have the full symbols, you'll want to do "file netbsd.gdb"?
>>>"ps -N netbsd.N.core" might also be informative.
> 
> 
> ...
> 
> 
>># gdb --core netbsd.0.core /netbsd.minimal.gdb
> 
> 
> That's the wrong way to do it.
> 
> You need to
> 
> # gdb /netbsd.minimal.gdb
> target kcore netbsd.0.core
> 
> and go from there.
> 
> - Håvard
fantastic, thx Håvard and Frederick :-)

here's the backtrace from gdb, what else do you want to know?

> sudo gdb
GNU gdb 5.3nb1
Copyright 2002 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--netbsdelf".
(gdb) file /netbsd.minimal.gdb
Reading symbols from /netbsd.minimal.gdb...done.
(gdb) target kcore netbsd.0.core
panic: kernel %sassertion "%s" failed: file "%s", line %d
#0  0xc0493000 in ?? ()
(gdb) bt
#0  0xc0493000 in ?? ()
#1  0xc0216ddd in cpu_reboot (howto=256, bootstr=0x0)
    at /usr/src/sys/arch/i386/i386/machdep.c:751
#2  0xc0157fa1 in db_sync_cmd (addr=0, have_addr=0, count=-1071378828,
    modif=0xc361bbb0 "\200\214,Ā\001") at /usr/src/sys/ddb/db_command.c:750
#3  0xc0157b01 in db_command (last_cmdp=0xc02c1e34, cmd_table=0xc0270640)
    at /usr/src/sys/ddb/db_command.c:464
#4  0xc0157697 in db_command_loop () at /usr/src/sys/ddb/db_command.c:255
#5  0xc015a776 in db_trap (type=5, code=0)
    at /usr/src/sys/ddb/db_trap.c:101
#6  0xc0213a1b in kdb_trap (type=5, code=0, regs=0xc361be24)
    at /usr/src/sys/arch/i386/i386/db_interface.c:225
#7  0xc0221917 in trap (frame=0xc361be24)
    at /usr/src/sys/arch/i386/i386/trap.c:270
#8  0xc010bd56 in calltrap ()
#9  0xc026b94e in __assert (t=0xc0284af0 "diagnostic ",
    f=0xc02a1580 "/usr/src/sys/kern/kern_exit.c", l=781,
    e=0xc02880fd "p->p_nrlwps == 0")
    at /usr/src/sys/lib/libkern/__assert.c:45
#10 0xc017f4c3 in proc_free (p=0xc3645004)
    at /usr/src/sys/kern/kern_exit.c:782
#11 0xc017f282 in sys_wait4 (l=0xc2d8b39c, v=0xc361bf64, retval=0xc361bf5c)
    at /usr/src/sys/kern/kern_exit.c:683
---Type <return> to continue, or q <return> to quit---
#12 0xc0221209 in syscall_plain (frame=0xc361bfa8)
    at /usr/src/sys/arch/i386/i386/syscall.c:161
(gdb) quit