Bug 620012 - getting a backtrace can take a very long time
Summary: getting a backtrace can take a very long time
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-31 10:52 UTC by Mark Wielaard
Modified: 2010-08-06 20:57 UTC (History)
2 users (show)

Fixed In Version: gdb-7.1-31.fc13
Clone Of:
Environment:
Last Closed: 2010-08-06 20:57:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark Wielaard 2010-07-31 10:52:35 UTC
Description of problem:

If the backtrace is very deep it takes ages (up to a minute) to get a backtrace.

Version-Release number of selected component (if applicable):

gdb-7.1-30.fc13.i686

How reproducible:

Always.

Steps to Reproduce:

$ cat recurse.c
void bar ();

void foo ()
{
  bar ();
}

void bar ()
{
  foo ();
}

int main (int argc, char **argv)
{
  foo();
  return 0;
}
$ gcc -g -o recurse recurse.c
$ gdb ./recurse
GNU gdb (GDB) Fedora (7.1-30.fc13)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/mark/src/tests/recurse...done.
(gdb) run
Starting program: /home/mark/src/tests/recurse 

Program received signal SIGSEGV, Segmentation fault.
bar () at recurse.c:10
10	  foo ();
(gdb) bt
<wait a long time, wonder if gdb froze...>
<finally...>
#0  bar () at recurse.c:10
#1  0x0804839f in foo () at recurse.c:5
#2  0x080483ac in bar () at recurse.c:10
#3  0x0804839f in foo () at recurse.c:5
#4  0x080483ac in bar () at recurse.c:10
#5  0x0804839f in foo () at recurse.c:5
#6  0x080483ac in bar () at recurse.c:10
#7  0x0804839f in foo () at recurse.c:5
#8  0x080483ac in bar () at recurse.c:10
#9  0x0804839f in foo () at recurse.c:5
#10 0x080483ac in bar () at recurse.c:10
<etc.>
---Type <return> to continue, or q <return> to quit---
  
Actual results:

Long delay before showing (first part) of backtrace.

Expected results:

Showing (first part) of backtrace immediately.

Additional info:

If gdb is paginated anyway, don't try to do a full backtrace at once.
Just lookup the top couple of frames (at most as many as lines in one
pager page). This would not just speedup backtraces in dumb situations
like mine. But I am often not really interested in the frames beyond the
first page anyway.

Comment 1 Fedora Update System 2010-08-03 19:53:59 UTC
gdb-7.1-31.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/gdb-7.1-31.fc13

Comment 2 Fedora Update System 2010-08-05 23:32:13 UTC
gdb-7.1-31.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gdb'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/gdb-7.1-31.fc13

Comment 3 Fedora Update System 2010-08-06 20:57:48 UTC
gdb-7.1-31.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.