Bug 702598

Summary: snmpd cannot be executed under valgrind on ppc
Product: Red Hat Enterprise Linux 5 Reporter: Karel Srot <ksrot>
Component: valgrindAssignee: Mark Wielaard <mjw>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: low Docs Contact:
Priority: low    
Version: 5.6CC: fche, mfranc, mjw, mnewsome, omoris
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-12 18:48:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Karel Srot 2011-05-06 10:06:25 UTC
Description of problem:

snmpd cannot be executed under valgrind on ppc. 
I don't know if it is related to bug 665289.

# valgrind snmpd
valgrind: mmap(0x100000, 131072) failed in UME with error 22 (Invalid argument).
valgrind: this can be caused by executables with very large text, data or bss segments.

Version-Release number of selected component (if applicable):
valgrind-3.5.0-5.el5
net-snmp-5.3.2.2-11.el5

Comment 1 Miroslav Franc 2011-05-25 11:21:01 UTC
The same issue is with running systemtap on power with _any_ stp script.

# hello.stp
probe begin {
        printf("hello, world\n")
        exit()
}

The following commands should both produce c source of module, under valgrind stap fails to do so.


Actual results:
# stap -p3 hello.stp > hello.c
# valgrind stap -p3 hello.stp > hello_under_valgrind.c
valgrind: mmap(0x100000, 2359296) failed in UME with error 22 (Invalid argument).
valgrind: this can be caused by executables with very large text, data or bss segments.

# wc hello*c
  479  1386 12564 hello.c
    0     0     0 hello_under_valgrind.c
  479  1386 12564 total


Versions:
systemtap-1.3-6.el5
both valgrind-3.5.0-1.el5 and valgrind-3.5.0-5.el5

Comment 2 RHEL Program Management 2011-09-23 00:33:59 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 3 Ondrej Moriš 2011-11-21 12:29:13 UTC
I see the same thing with openldap-servers:

# valgrind /usr/sbin/slapd ...

valgrind: mmap(0x2e9000, 32768) failed in UME with error 22 (Invalid argument).
valgrind: this can be caused by executables with very large text, data or bss segments.

It behaves quite non-deterministically, hit ratio is around 20%.

openldap-servers-2.3.43-12.el5_7.10
valgrind-3.5.0-5.el5

Comment 6 Frank Ch. Eigler 2012-10-31 15:14:41 UTC
See also 
https://bugs.kde.org/show_bug.cgi?id=290061
https://bugs.kde.org/show_bug.cgi?id=138424

This may relate to ppc -fpie compilation.  The patch in 290061 does not appear as applied to current svn valgrind, so it is possible that devtoolset-generation 3.8.1 valgrind also has this problem.

Comment 7 Mark Wielaard 2012-11-04 14:14:41 UTC
(In reply to comment #6)
> See also 
> https://bugs.kde.org/show_bug.cgi?id=290061
> https://bugs.kde.org/show_bug.cgi?id=138424
> 
> This may relate to ppc -fpie compilation.  The patch in 290061 does not
> appear as applied to current svn valgrind, so it is possible that
> devtoolset-generation 3.8.1 valgrind also has this problem.

Thanks for finding these. We do carry this in the fedora valgrind.spec:
# KDE#263034 - Crash when loading some PPC64 binaries 
Patch7: valgrind-3.8.1-pie.patch

Which also isn't applied upstream yet, but covers a somewhat similar issue.
I'll push to see if we can get this upstream and/or the other issues resolved.

Comment 8 Mark Wielaard 2013-03-12 18:11:01 UTC
As comment #7 says, there is a possible fix in fedora, but this patch is still pending upstream (it is under consideration for valgrind 3.9.0, but RHEL5 is 3.5.0 based).

Comment 9 Frank Ch. Eigler 2013-03-12 18:48:45 UTC
At this stage of the RHEL lifecycle, a possibly-required rebase of valgrind is not likely.