Bug 153681

Summary: Bad dwarf info emitting when building firefox
Product: [Fedora] Fedora Reporter: Robin Green <greenrd>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 4.0.0-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-26 15:29:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Last screenfull of strace output before gdb errored out none

Description Robin Green 2005-04-04 22:59:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050328 Firefox/1.0.2 Fedora/1.0.2-3

Description of problem:
This bug:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19769
[4.0 Regression] GCC produces wrong dwarf2 output that breaks gdb

- or something with the same symptom - is making it impossible for me to debug natively-built Java code. Please could you apply the fix given in the above PR, assuming you haven't applied it already.

Version-Release number of selected component (if applicable):
gcc-java-4.0.0-0.38

How reproducible:
Always

Steps to Reproduce:
1. Try to debug Java code built with the above version of gcc-java, in gdb.


Actual Results:  ../../gdb-6.3/gdb/dwarf2read.c:5446: internal-error: could not find partial DIE in cache

A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
../../gdb-6.3/gdb/dwarf2read.c:5446: internal-error: could not find partial DIE in cache

A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n


Expected Results:  No error

Additional info:

gdb-6.3.0.0-0.29

Comment 1 Jakub Jelinek 2005-04-05 10:39:25 UTC
PR19769 is fixed in 4.0.0-0.36 and above (and 4.0.0-0.30 .. -0.35 had a
workaround in the headers).
I can debug Java compiled programs just fine with 4.0.0-0.39, you'll need
to be more specific on what exactly you compiled and what you are doing in
the debugger.

Comment 2 Robin Green 2005-04-05 18:50:59 UTC
I am hitting it with both Java and C++ programs. Here's an easy example: install
firefox and firefox-debuginfo from rawhide. Then edit /usr/bin/firefox and change

MOZARGS=

to

MOZARGS=-g

Run firefox, click Run in ddd, and observe that gdb crashes (usually with this
DWARF error, although sometimes it just aborts.)

This is on fc4test1.

Comment 3 Robin Green 2005-04-06 01:41:36 UTC
So I ran

strace -e trace=file -p `pidof gdb`

and I found that gdb is consistently crashing after it reads the file
/usr/lib/debug//usr/lib/firefox-1.0.2/components/libxpconnect.so.debug (see
attachment)

Comment 4 Robin Green 2005-04-06 01:43:51 UTC
Created attachment 112745 [details]
Last screenfull of strace output before gdb errored out

Comment 5 Robin Green 2005-04-06 01:49:38 UTC
And sure enough, it is that file. (The build date for firefox-1.0.2-3 is given
as Mon 28 Mar 2005 21:22:05 BST, by the way.)

# gdb /usr/lib/firefox-1.0.2/components/libxpconnect.so
GNU gdb Red Hat Linux (6.3.0.0-1.10rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
../../gdb-6.3/gdb/dwarf2read.c:5446: internal-error: could not find partial DIE
in cache

A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
../../gdb-6.3/gdb/dwarf2read.c:5446: internal-error: could not find partial DIE
in cache

A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n


Comment 6 Robin Green 2005-04-06 16:00:28 UTC
The same error happens when I do, in my local source tree:

gdb /usr/src/mozilla/dist/lib/components/libxpconnect.so

So this issue definitely still exists in gcc-4.0.0-0.39.

Comment 7 Robin Green 2005-04-07 03:23:16 UTC
The broken object file is mozilla/js/src/xpconnect/src/xpcjsid.o.

Filing as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20805

Comment 8 Robin Green 2005-04-21 23:07:32 UTC
Fix has landed upstream on trunk.

Requesting inclusion of the fix in FC4, because this bug could hinder people
wanting to report or fix bugs in C++ and Java code.

Comment 9 Jakub Jelinek 2005-04-26 15:29:24 UTC
Should be fixed in gcc-4.0.0-1 in rawhide.