Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Aug 2005 18:17:03 -0700
From:      Frank McConnell <fmc@reanimators.org>
To:        dpk <dpk@dpk.net>
Cc:        Mitch Parks <mitch@kuoi.asui.uidaho.edu>, freebsd-stable@freebsd.org
Subject:   Re: Kernel debugging, 5.4-RELEASE
Message-ID:  <200508030117.j731H3cV060169@lots.reanimators.org>
In-Reply-To: <20050802160715.Q64406@shared10.hosting.flyingcroc.net> (dpk@dpk.net's message of "Tue, 2 Aug 2005 16:12:11 -0700 (PDT)")
References:  <20050802133920.J64406@shared10.hosting.flyingcroc.net> <20050802141148.W871@kuoi.asui.uidaho.edu> <20050802153038.C64406@shared10.hosting.flyingcroc.net> <20050802160715.Q64406@shared10.hosting.flyingcroc.net>

next in thread | previous in thread | raw e-mail | index | archive | help
dpk wrote:
> Is there anything else I can try, to get some debugging information? The
> steps outlined in the handbook don't seem to be working. I've been at this
> for a couple days, so I apologize if I am curt, I'm just trying to get a
> useful backtrace to submit as a PR.

I've been using plain bog-standard /usr/bin/gdb, not out of lack
of knowledge of kgdb but because I also find that kgdb fails with
a segmentation fault after connecting.

$ which gdb
/usr/bin/gdb
$ gdb /usr/obj/usr/src/sys/EAST1-PAE/kernel.debug
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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-marcel-freebsd"...
(gdb) target remote /dev/cuaa1
Remote debugging using /dev/cuaa1
propagate_priority (td=0xc69e6c00) at /usr/src/sys/kern/subr_turnstile.c:245
245                     tc = TC_LOOKUP(ts->ts_lockobj);
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
(gdb) backtrace
#0  propagate_priority (td=0xc69e6c00)
    at /usr/src/sys/kern/subr_turnstile.c:245
#1  0xc03dcc02 in turnstile_wait (ts=0xc6a57240, lock=0xc06387a0, 
    owner=0xc69e6c00) at /usr/src/sys/kern/subr_turnstile.c:556
#2  0xc03b5e71 in _mtx_lock_sleep (m=0xc06387a0, td=0xc6a65000, opts=0, 
    file=0x0, line=0) at /usr/src/sys/kern/kern_mutex.c:552
#3  0xc03c4a36 in msleep (ident=0xc0638c44, mtx=0xc06387a0, priority=68, 
    wmesg=0xc059c1c7 "psleep", timo=500) at /usr/src/sys/kern/kern_synch.c:239
#4  0xc04fc49c in vm_pageout () at /usr/src/sys/vm/vm_pageout.c:1464
#5  0xc03a98cc in fork_exit (callout=0xc04fc21c <vm_pageout>, arg=0x0, 
    frame=0xeb328d38) at /usr/src/sys/kern/kern_fork.c:791
#6  0xc053b1bc in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:209
(gdb) 

If I'm getting more stuff out of my backtrace, it is likely because I
have this in my kernel config:

makeoptions DEBUG="-g"

And likewise, sorry if I come across as being a bit too verbose or
grumpy.  Guidance is welcome.

-Frank McConnell



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