Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 665289

Summary: snmpd crashes on ppc64 when executed under valgrind
Product: Red Hat Enterprise Linux 6 Reporter: Karel Srot <ksrot>
Component: valgrindAssignee: Dodji Seketeli <dodji>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: ebachalo, jakub, jan.kratochvil, mfranc, pmuller, tcapek
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When the snmpd tool was executed under valgrind on the 64-bit PowerPC architecture, it terminated unexpectedly. This bug has been fixed and the "valgrind /usr/sbin/snmpd" command now works as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:58:15 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:

Description Karel Srot 2010-12-23 06:16:46 UTC
Description of problem:

# valgrind /usr/sbin/snmpd
Bus error (core dumped)

the same applies for /usr/sbin/snmptrapd


Version-Release number of selected component (if applicable):
net-snmp-5.5-27.el6.ppc64

How reproducible:
always

Steps to Reproduce:
execute command above on ppc64
  
Additional info:
I didn't attach core file since it has 19 MB.

Comment 1 Jan Safranek 2011-01-03 13:03:33 UTC
Reassigning to valgrind, I am not able to get stack trace or any other useful data from the core dump nor gdb. Feel free to return it back to me, if you can find the root cause of the 'Bus error'.

Comment 3 Dodji Seketeli 2011-01-11 16:10:55 UTC
It looks like the crash is due to Valgrind trying to load the snmpd executable to address 0x108000. The problem is that the vDSO  is loaded at address 0x100000 and it takes at least two memory pages. The ppc64 system I reproduced the issue on has a page size of 64K. Valgrind overwrites the vDSO, I believe.

Loading the executable at an address that leaves enough room for vDSO seems to do the trick. The patch is at http://people.redhat.com/dseketel/valgrind/valgrind-3.5.0-vdso-ppc.patch, the resulting RPMs and the SRPM are at http://people.redhat.com/dseketel/rpms/valgrind.

I haven't verified this with upstream yet, but could you please verify if you still see an issue and maybe verify that nothing regresses as far as you can tell?

If nothing it doesn't break anything I'll submit this upstream.

Comment 4 Karel Srot 2011-01-12 08:33:15 UTC
Hi, I can confirm the fix. Thank you.

valgrind-3.5.0-19.el6.ppc64, net-snmp-5.5-27.el6_0.1.ppc64:
  "valgrind /usr/sbin/snmpd" works as expected

valgrind-3.5.0-18.el6.ppc64, net-snmp-5.5-27.el6_0.1.ppc64:
  # "valgrind /usr/sbin/snmpd"
  Bus error (core dumped)

Comment 5 Dodji Seketeli 2011-01-13 15:53:48 UTC
Thanks Karel.

I have submitted the patch upstream https://bugs.kde.org/show_bug.cgi?id=263034

Comment 13 Tomas Capek 2011-05-18 08:02:13 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When the snmpd tool was executed under valgrind on the 64-bit PowerPC architecture, it terminated unexpectedly. This bug has been fixed and the "valgrind /usr/sbin/snmpd" command now works as expected.

Comment 14 errata-xmlrpc 2011-05-19 13:58:15 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0665.html