This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB hang on "run"
- From: Uri Moszkowicz <uri at 4refs dot com>
- To: tom at tromey dot com
- Cc: gdb at sourceware dot org
- Date: Wed, 8 Aug 2018 10:45:05 -0400
- Subject: Re: GDB hang on "run"
- References: <CAMJd5ATLRMPfJibDbJHr_pQBQN1=RW5-QTmJWTNJ0d_6_PkNhw@mail.gmail.com> <87y3dgapra.fsf@tromey.com>
Thanks for the tips. I was also noticing a hang exiting shells so I played
around a little bit and discovered that it's due to a Redhat6 NFS bug
around locking my .history file. I removed the file and the problem went
away.
On Wed, Aug 8, 2018 at 10:37 AM Tom Tromey <tom@tromey.com> wrote:
> >>>>> "Uri" == Uri Moszkowicz <uri@4refs.com> writes:
>
> Uri> Lately gdb has been hanging for me when running my executable. I'm
> using
> Uri> GDB 8.1 but it occurs with older versions as well. Here's what I see:
>
> Uri> (gdb) source run.gdb
> Uri> Temporary breakpoint 1 at 0xbaf645: file <path>/<file>.cc, line 3501.
> Uri> ^CTraceback (most recent call last):
> Uri> File "/<path>/gcc-6.2.0/redhat6/lib64/libstdc++.so.6.0.22-gdb.py",
> line
> Uri> 18, in <module>
> Uri> import gdb
> Uri> ImportError: No module named gdb
>
> Uri> What I see is a hang right before the Traceback message, that's only
> Uri> bypassed by sending a SIGINT. Anyone know why this might be and what
> I can
> Uri> do to avoid it? Or tips on how to debug this problem?
>
> If your program uses a very large shared library, gdb might be reading
> debug info for it. Sometimes this can take a while and by default it
> isn't announced.
>
> Otherwise all I can suggest is attaching to gdb with another gdb,
> interrupting it, and see what is going on.
>
> If you suspect it is the "run" command itself, sometimes infrun logging
> is interesting. That is "set debug infrun 1".
>
> Tom
>