Bug 153681 - Bad dwarf info emitting when building firefox
Bad dwarf info emitting when building firefox
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
4
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-04 18:59 EDT by Robin Green
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.0.0-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-26 11:29:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Last screenfull of strace output before gdb errored out (3.16 KB, text/plain)
2005-04-05 21:43 EDT, Robin Green
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 20805 None None None Never

  None (edit)
Description Robin Green 2005-04-04 18:59:02 EDT
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 06:39:25 EDT
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 14:50:59 EDT
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-05 21:41:36 EDT
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-05 21:43:51 EDT
Created attachment 112745 [details]
Last screenfull of strace output before gdb errored out
Comment 5 Robin Green 2005-04-05 21:49:38 EDT
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 12:00:28 EDT
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-06 23:23:16 EDT
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 19:07:32 EDT
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 11:29:24 EDT
Should be fixed in gcc-4.0.0-1 in rawhide.

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