Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eric Schuele <e.schuele@computer.org>
To: Kip Macy <kip.macy@gmail.com>,  gdb@sourceware.org
Subject: Re: Trouble with gdb 6.6 and one particular app on FreeBSD 7.0...
Date: Mon, 01 Oct 2007 03:41:00 -0000	[thread overview]
Message-ID: <47006C5E.1070006@computer.org> (raw)
In-Reply-To: <b1fa29170709292102w1e6d5ae0mbc7841de157df1c8@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3856 bytes --]

On 09/29/2007 23:02, Kip Macy wrote:
> On 9/29/07, Eric Schuele <e.schuele@computer.org> wrote:
>> Hello,
>>
>> I have a particular app that I am unable to debug using gdb.  When I
>> attach to the app and continue it, gdb begins to take up 100% of my cpu.
>>  It will do this forever (well longer than I've ever waited).
>>
>> I am able to debug this particular app on my 6.2-STABLE machine.  And I
>> can debug other apps on my 7.0 machine.  I've tried both gdb 6.1 and gdb
>> 6.6 on my 7.0 machine with no change in behavior.
>>
>> I first thought maybe I had done something odd when rebuilding my
>> kernel/world?  But I've built a second 7.0 machine and stuck with the
>> GENERIC kernel and I have the same results.
>>
>> Most times I can not break into the app once I have continued it.  I
>> have attached gdb to gdb to watch what it is doing and it appears to
>> give me a few different backtraces, though it is always one of maybe
>> three traces.  [See below for bt of gdb attached to gdb, unfortunately
>> its not the same bt I was seeing... but may offer some insight?]
>>
>> Has anyone seen behavior like this?  What else can I provide that might
>> help diagnose this?
> 
> This sounds more like a ptrace bug / change in behavior. My first
> guess is that the behavior of ptrace has changed and that gdb is
> expecting a different return code from the one that it is getting. 

Sounds reasonable. As it frequently breaks within ptrace.

> Is
> your app threaded? 

Well, it makes use of shared objects which are.  But the app itself has
no threading code.

> The default threading library has changed. Can you
> produce a small test case that causes this behavior?

Well... not sure yet how to go about doing that (yet).  Here's what I
have.  I can walk the code to a particular line using gdb.  This
particular line is a call to a func in a library, which does little more
than add a callback to a linked list.  Now this very call was issued
several lines prior to now with no issue (several times in fact).
However on this instance, if I attempt to step into the func (which I
could do previously), gdb never gains control again.

Here is a bt of gdb attached to the gdb which has never returned from
attempting to step into the above mentioned function.

#0  0x2874cbbb in ptrace () from /lib/libc.so.7
#1  0x08068b42 in i386fbsd_resume (ptid={pid = -1, lwp = 0, tid = 0},
step=0,
    signal=TARGET_SIGNAL_CHLD) at i386fbsd-nat.c:76
#2  0x080ed0de in resume (step=0, sig=TARGET_SIGNAL_CHLD) at infrun.c:626
#3  0x080f05ed in keep_going (ecs=0xbfbfb594) at infrun.c:2892
#4  0x080ef284 in handle_inferior_event (ecs=0xbfbfb594) at infrun.c:2021
#5  0x080ed63e in wait_for_inferior () at infrun.c:1009
#6  0x080ed46a in proceed (addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT,
    step=1) at infrun.c:827
#7  0x080ea50c in step_1 (skip_subroutines=0, single_inst=0,
count_string=0x0)
    at infcmd.c:761
#8  0x080ea26c in step_command (count_string=0x0, from_tty=0) at
infcmd.c:650
#9  0x0808082b in do_cfunc (c=0x2897bef0, args=0x0, from_tty=0)
    at .././gdb/cli/cli-decode.c:62
#10 0x08082e6d in cmd_func (cmd=0x2897bef0, args=0x0, from_tty=0)
    at .././gdb/cli/cli-decode.c:1666
#11 0x08095520 in gdbtk_call_command (cmdblk=0x2897bef0, arg=0x0,
from_tty=0)
    at .././gdb/gdbtk/generic/gdbtk-hooks.c:539
#12 0x08054c9d in execute_command (p=0x29e5f944 "", from_tty=0) at top.c:453
#13 0x08090fc6 in gdb_immediate_command (clientData=0x8090ed6,
    interp=0x2894ce00, objc=2, objv=0x289b303c)
    at .././gdb/gdbtk/generic/gdbtk-cmds.c:749
#14 0x08090972 in wrapped_call (opaque_args=0xbfbfb848)
---Type <return> to continue, or q <return> to quit---


[snip other backtraces]

Thanks for your interest and assistance.

-- 
Regards,
Eric





[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

      reply	other threads:[~2007-10-01  3:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-30  4:02 Eric Schuele
2007-09-30  6:20 ` Kip Macy
2007-10-01  3:41   ` Eric Schuele [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47006C5E.1070006@computer.org \
    --to=e.schuele@computer.org \
    --cc=gdb@sourceware.org \
    --cc=kip.macy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox