Bug 518561 - F11 gdb has trouble dealing with some libs built on FC5 [NEEDINFO]
Summary: F11 gdb has trouble dealing with some libs built on FC5
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 11
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-20 21:54 UTC by Neil Doane
Modified: 2018-10-20 03:49 UTC (History)
2 users (show)

Fixed In Version: gdb-6.8.50.20090302-37.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-28 14:12:37 UTC
jan.kratochvil: needinfo? (ndoane)


Attachments (Terms of Use)
dummy program that demonstrates the behavior described in this bz (1.60 MB, application/x-bzip)
2009-08-20 21:56 UTC, Neil Doane
no flags Details

Description Neil Doane 2009-08-20 21:54:47 UTC
Description of problem:
Our application binaries are compiled with gcc 4.2.4 (4.1.1-51.fc5), and link to libraries built with same under FC5. We noticed that while running FC11, attaching gdb (6.8.50.20090302-33.fc11) to such a binary causes gdb to hang, and the CPU is pinned. Attaching another gdb to the hung gdb shows that the following events have transpired:

1) elf_syms_from_objfile is called to load the symbols from libstdc++.so.6
2) dwarf2_create_quick_addrmap calls read_comp_unit_hyead on the abfd structure for this so.
3) the cu_header structure returned is mostly null (most critically, cu_header.addr_size).
4) dwarf2_create_quick_addrmap attempts to align a pointer, and ends up dividing by zero because cu_header.addr_size is zero.
5) gdb jumps to handle_sigfpe, at gdb/event-top.c:1030
6) eventually, we end up back in dwarf2_create_quick_addrmap, where we again divide by zero.
7) goto 5

I've attached an archive that contains a dummy program and our current FC5 libstdc++ and libgcc_s (4.1.1-51.fc5). Running make will produce a binary called 'dummy'. Launch gdb (6.8.50.20090302-33.fc11) on this binary and run to reproduce the above behavior. I was able to reproduce with the dummy binary compiled using FC5 g++ (4.2.4) and with FC11 g++ (4.4.0-4).

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


How reproducible:
Every time


Steps to Reproduce:
1. see above
2.
3.
  
Actual results:
gdb pegs the CPU in an infinite divide-by-zero loop

Expected results:
gdb understands the old libraries' abfd information and completes normallyDescription of problem:

Our application binaries are compiled with gcc 4.2.4 (4.1.1-51.fc5), and link to libraries built with same under FC5. We noticed that while running FC11, attaching gdb (6.8.50.20090302-33.fc11) to such a binary causes gdb to hang, and the CPU is pinned. Attaching another gdb to the hung gdb shows that the following events have transpired:

1) elf_syms_from_objfile is called to load the symbols from libstdc++.so.6
2) dwarf2_create_quick_addrmap calls read_comp_unit_hyead on the abfd structure for this so.
3) the cu_header structure returned is mostly null (most critically, cu_header.addr_size).
4) dwarf2_create_quick_addrmap attempts to align a pointer, and ends up dividing by zero because cu_header.addr_size is zero.
5) gdb jumps to handle_sigfpe, at gdb/event-top.c:1030
6) eventually, we end up back in dwarf2_create_quick_addrmap, where we again divide by zero.
7) goto 5

I've attached an archive that contains a dummy program and our current FC5 libstdc++ and libgcc_s (4.1.1-51.fc5). Running make will produce a binary called 'dummy'. Launch gdb (6.8.50.20090302-33.fc11) on this binary and run to reproduce the above behavior. I was able to reproduce with the dummy binary compiled using FC5 g++ (4.2.4) and with FC11 g++ (4.4.0-4).

How reproducible:
Every time

Steps to reproduce:
see above

Actual results:
gdb pegs the CPU in an infinite divide-by-zero loop

Expected results:
gdb understands the old libraries' abfd information and completes normally 

Additional info:

Comment 1 Neil Doane 2009-08-20 21:56:03 UTC
Created attachment 358172 [details]
dummy program that demonstrates the behavior described in this bz

Comment 2 Jan Kratochvil 2009-08-25 12:58:22 UTC
This Bug should be already fixed for F-11, isn't it?
gdb-6.8.50.20090302-37.fc11:
  http://koji.fedoraproject.org/koji/buildinfo?buildID=127387
  https://admin.fedoraproject.org/updates/F11/FEDORA-2009-8657

The provided reproducer really crashes gdb-6.8.50.20090302-34.fc11:
(gdb) start
Temporary breakpoint 1 at 0x400574: file dummy.cpp, line 1.
Starting program: /tmp/gdb-bug/dummy 
<hang>

But it works fine with gdb-6.8.50.20090302-37.fc11:
(gdb) start
Temporary breakpoint 1 at 0x400574: file dummy.cpp, line 1.
Starting program: /tmp/gdb-bug/dummy 

Temporary breakpoint 1, main (argc=1, argv=0x7fffffffdb68) at dummy.cpp:1
1	int main(int argc, char** argv) { }
(gdb) c
Continuing.

Program exited normally.
(gdb) q

Thanks for the bugreport but I hope the fix is complete (by Tom Tromey).
I do not have the Issue Tracker available at the moment (unaware why).

Comment 4 Bug Zapper 2010-04-28 09:52:00 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Bug Zapper 2010-06-28 14:12:37 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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