Bug 837081 - valgrind-3.6.0-5.el6.x86_64 not usable on RHEL 6.3
valgrind-3.6.0-5.el6.x86_64 not usable on RHEL 6.3
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: valgrind (Show other bugs)
6.3
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Jakub Jelinek
qe-baseos-tools
: Regression
Depends On:
Blocks: 840699
  Show dependency treegraph
 
Reported: 2012-07-02 13:12 EDT by David Cantrell
Modified: 2012-08-08 23:03 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-24 16:25:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Backport of upstream revisions r11856 and r11904 (4.44 KB, patch)
2012-07-18 08:50 EDT, Mark Wielaard
no flags Details | Diff

  None (edit)
Description David Cantrell 2012-07-02 13:12:29 EDT
Trying to use valgrind on RHEL 6.3 x86_64 for local development and I get this error:

--------------------
==31969== Memcheck, a memory error detector
==31969== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==31969== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==31969== Command: ./distadd -r /peachtree /home/dcantrel/peachtree/release/base/bzip2-1.0.6-4.x86_64.dist
==31969== 
--31969-- Warning: DWARF2 CFI reader: unhandled DW_OP_ opcode 0x2a

valgrind: m_debuginfo/readdwarf.c:2391 (copy_convert_CfiExpr_tree): Assertion 'srcix >= 0 && srcix < VG_(sizeXA)(srcxa)' failed.
==31969==    at 0x3802D247: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux)

sched status:
  running_tid=0


Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.

--------------------

Searching around, it looks like Debian hit this same problem:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632666

And it was subsequently addressed upstream.  I took the SRPM from rawhide, built it locally, and then upgraded the valgrind RPM on my system.  That gave me valgrind-3.7.0-4 and it's working as expected.

Either backporting the fix for this problem or rebasing valgrind to 3.7.0 would be nice for RHEL 6.4.
Comment 2 David Cantrell 2012-07-05 11:07:00 EDT
For comparison, I did a fresh install of RHEL 6.2 and tested me code there with valgrind.  valgrind worked as expected, so it looks like this is a regression.
Comment 4 Mark Wielaard 2012-07-18 07:53:49 EDT
(In reply to comment #2)
> For comparison, I did a fresh install of RHEL 6.2 and tested me code there
> with valgrind.  valgrind worked as expected, so it looks like this is a
> regression.

I assume you rebuild you code on both RHEL 6.2 and RHEL 6.3? Then it must be GCC generating the newer DW_OP on RHEL 6.3, but not RHEL 6.2. Is your code small enough to share?
Comment 5 Mark Wielaard 2012-07-18 08:50:01 EDT
Created attachment 598874 [details]
Backport of upstream revisions r11856 and r11904

I haven't found a reproducer yet. But once we have one, then something like the following backport should fix it.
Comment 6 Jakub Jelinek 2012-07-18 11:57:15 EDT
The usual place where you hit this is on ld generated .eh_frame unwind info for PLT slots.  But I don't think such a change has been backported to the RHEL 6.3 binutils.  Are you very sure you are using the RHEL 6.3 ld and not some other (or not copying libraries from some Fedora box with newer ld)?
Comment 7 Jakub Jelinek 2012-07-18 12:18:57 EDT
Or, weren't you using DTS 1.0 ld?
Comment 8 David Cantrell 2012-07-18 14:42:50 EDT
I just yum installed valgrind from the RHEL-6 repos here:

http://download.devel.redhat.com/released/RHEL-6/6.3/

I'm not copying over libraries from Fedora, it's just RHEL packages as we ship.  RHEL 6.3 binutils and valgrind.
Comment 9 Mark Wielaard 2012-07-18 14:47:50 EDT
(In reply to comment #8)
> I just yum installed valgrind from the RHEL-6 repos here:
> 
> http://download.devel.redhat.com/released/RHEL-6/6.3/
> 
> I'm not copying over libraries from Fedora, it's just RHEL packages as we
> ship.  RHEL 6.3 binutils and valgrind.

Could you give an example of a program that fails? How did you build it? How do you invoke valgrind?
Comment 10 Mark Wielaard 2012-07-24 06:43:36 EDT
Sorry, but we are unable to reproduce the problem. Since testing seems to indicate this situation cannot happen with a default RHEL 6.3 install we are inclined to close this bug report.

Are you able to get us a repoducer? Just a list of versions of the installed packages (gcc, binutils, valgrind) and some simple steps how to compile some sources to get a binary that shows the problem reported would be really helpful.
Comment 11 David Cantrell 2012-07-24 16:25:25 EDT
So I did a fresh install of RHEL 6.3 to reproduce the problem there, but valgrind worked fine.  My laptop which I yum upgraded from 6.2 to 6.3 shows this problem, so chalk this one up to something odd on my laptop.  Closing this one out.  Sorry for the alarm.

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