public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB hang on "run"
@ 2018-07-26 20:23 Uri Moszkowicz
  2018-08-08 14:37 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Uri Moszkowicz @ 2018-07-26 20:23 UTC (permalink / raw)
  To: gdb

Hi,
Lately gdb has been hanging for me when running my executable. I'm using
GDB 8.1 but it occurs with older versions as well. Here's what I see:

(gdb) source run.gdb
Temporary breakpoint 1 at 0xbaf645: file <path>/<file>.cc, line 3501.
^CTraceback (most recent call last):
  File "/<path>/gcc-6.2.0/redhat6/lib64/libstdc++.so.6.0.22-gdb.py", line
18, in <module>
    import gdb
ImportError: No module named gdb

What I see is a hang right before the Traceback message, that's only
bypassed by sending a SIGINT. Anyone know why this might be and what I can
do to avoid it? Or tips on how to debug this problem?

Thanks,
Uri

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GDB hang on "run"
  2018-07-26 20:23 GDB hang on "run" Uri Moszkowicz
@ 2018-08-08 14:37 ` Tom Tromey
  2018-08-08 14:45   ` Uri Moszkowicz
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2018-08-08 14:37 UTC (permalink / raw)
  To: Uri Moszkowicz; +Cc: gdb

>>>>> "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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GDB hang on "run"
  2018-08-08 14:37 ` Tom Tromey
@ 2018-08-08 14:45   ` Uri Moszkowicz
  2018-08-08 14:55     ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Uri Moszkowicz @ 2018-08-08 14:45 UTC (permalink / raw)
  To: tom; +Cc: gdb

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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GDB hang on "run"
  2018-08-08 14:45   ` Uri Moszkowicz
@ 2018-08-08 14:55     ` Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2018-08-08 14:55 UTC (permalink / raw)
  To: Uri Moszkowicz; +Cc: tom, gdb

>>>>> "Uri" == Uri Moszkowicz <uri@4refs.com> writes:

Uri> Thanks for the tips. I was also noticing a hang exiting shells so I played
Uri> around a little bit and discovered that it's due to a Redhat6 NFS bug
Uri> around locking my .history file. I removed the file and the problem went
Uri> away.

Haha, that was definitely not on my list of possibilities :)

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-08 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 20:23 GDB hang on "run" Uri Moszkowicz
2018-08-08 14:37 ` Tom Tromey
2018-08-08 14:45   ` Uri Moszkowicz
2018-08-08 14:55     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).