Bug 592016

Summary: Invalid C++ types resolution
Product: Red Hat Enterprise Linux 6 Reporter: Jan Kratochvil <jan.kratochvil>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Muller <pmuller>
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: cagney, ebachalo, mnowak, ohudlick, pmuller
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: abrt_hash:f833c7548c5da5e598283cbcbcef306e10e2f363
Fixed In Version: gdb-7.1-21.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 575292 Environment:
Last Closed: 2010-11-10 20:26:07 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:
Bug Depends On: 575292, 585445    
Bug Blocks:    
Attachments:
Description Flags
Proposed gdb-bz575292-delayed-physname.patch. none

Description Jan Kratochvil 2010-05-13 17:22:47 UTC
Created attachment 413827 [details]
Proposed gdb-bz575292-delayed-physname.patch.

+++ This bug was initially created as a clone of Bug #575292 + Bug #585445 +++

Bug #575292 was about a crash on reading webkit debuginfo.

How to reproduce
-----
1. Run an epiphany with custom-compiled libraries
2. Wait until it crashes
3. Start abrt
4. Click on "report"
5. Wait a bit
6. *boom*

This problem was fixed by delayed-physname patch by Keith Seitz but it caused an internal error - Bug #585445.  This second problem is now going to be fixed upstream http://sourceware.org/ml/gdb-patches/2010-05/msg00271.html .

But for RHEL-6.0 was chosen a safer way and the delayed-physname patch was adjusted by http://people.redhat.com/jkratoch/safer.patch which no longer has the risk of Bug #585445.

In the meantime in Bug 575292 Comment 13 I put there a workaround gdb-bz575292-void-workaround.patch and removed delayed-physname patch.  Such way it does not crash but on some C++ complicated data structures it prints invalid types for method parameters and it fails to lookup their function bodies.  This is the current state of RHEL-6.0, therefore gdb-7.1-19.el6 (and older builds).


Proposing a fix based on
        Re: [RFA] Delayed physname computation
        http://sourceware.org/ml/gdb-patches/2010-05/msg00248.html
patched by
        http://people.redhat.com/jkratoch/safer.patch
as attached herein.
Patch gdb-bz575292-void-workaround.patch can stay in place, it has no effect if the GDB would not crash otherwise.

Comment 1 RHEL Program Management 2010-05-13 17:47:13 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 2 Jan Kratochvil 2010-05-13 17:47:50 UTC
There is new testcase:
pr11465.exp

One can also test no crashes on loading .debug files with -readnow such as:
webkitgtk-debuginfo-1.1.22-1.fc13.x86_64
gdb -nx -readnow /usr/lib/debug/usr/lib64/libwebkit-1.0.so.2.16.0.debug

Comment 7 Petr Muller 2010-10-01 16:03:15 UTC
I also tried the second testcase. I tried both the suggested webkitgtk-debuginfo from fedora 13 (webkitgtk-debuginfo-1.1.22-1.fc13.x86_64) and current rh6 webkitgtk-debuginfo (webkitgtk-debuginfo-1.2.3-1.el6).

Both old and new gdb behave in the same way, no real crashes occured. However, there seem to be some memory issues. On s390x (which has 500MB of memory) the gdb gets (probably OOM-)Killed, and on i686 (which has the 3GB per-process memory limit afaik) it gets: 
Reading symbols from /tmp/debug/usr/lib/debug/usr/lib64/libwebkit-1.0.so.2.16.0.debug...expanding to full symbols...../../gdb/utils.c:1251: internal-error: virtual memory exhausted: can't allocate 4072 bytes.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)

On other architectures, the gdb process has memory consumption peak ~3.5GB = 3632896 bytes (x86_64) and almost 5GB = 4922752 (ppc64), which was not problematic because the boxes were pretty beefy. Is this memory consumption consumption expected?

Comment 10 releng-rhel@redhat.com 2010-11-10 20:26:07 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.