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 652858 - misaddresed user-space probes on prelinked shared libraries on i686 (REL)
Summary: misaddresed user-space probes on prelinked shared libraries on i686 (REL)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: elfutils
Version: 6.0
Hardware: All
OS: Unspecified
low
high
Target Milestone: rc
: ---
Assignee: Petr Machata
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On: 652857
Blocks: 646871
TreeView+ depends on / blocked
 
Reported: 2010-11-13 00:57 UTC by Roland McGrath
Modified: 2015-05-05 01:35 UTC (History)
8 users (show)

Fixed In Version: elfutils-0.152-1.el6
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Cause After prelink has been used on the system, attempting to use systemtap user-space probes that target functions or statements in certain shared libraries or executables based on separate debuginfo will resolve to the wrong PC location in a prelinked binary. Consequence The intended probes will fail to fire at the correct place in the program, and the program may crash or misbehave due to a corrupted instruction sequence resulting from incorrect breakpoint insertion. Fix The libdwfl (libdw.so) library code was adjusted to use more reliable methods of compensating for prelink's effect on the address layout of a binary when aligning a runtime PC address with an address computed from the separate debuginfo file. Result The systemtap probes work the same on prelinked binaries as they do on the same binaries when they have not been adjusted by prelink.
Clone Of: 646871
Environment:
Last Closed: 2011-05-19 13:13:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0578 0 normal SHIPPED_LIVE elfutils bug fix update 2011-05-18 17:56:56 UTC

Description Roland McGrath 2010-11-13 00:57:37 UTC
+++ This bug was initially created as a clone of Bug #646871 +++

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

Due to a suspected problem in the way systemtap/elfutils
compute PC addresses to place int3 probe breakpoints into
prelinked shared libraries, sometimes the wrong instruction
is modified.  This can lead to lost probes, or segmentation
violations, or more subtle errors.  This problem appears to
exist in all versions of systemtap.

"prelink -u /usr/lib/libFOO.so" corrects the miscalculations,
as a temporary workaround.

This issue is being tracked upstream at
http://sourceware.org/bugzilla/show_bug.cgi?id=12141

Comment 1 Roland McGrath 2010-11-13 00:59:59 UTC
The bug is actually in elfutils, affecting systemtap.
Bug #646871 tracks systemtap state of it, can be closed as DUP of this one if we get a proper elfutils update in the same target milestone.

Comment 2 Roland McGrath 2010-11-23 22:04:40 UTC
This is fixed in elfutils-0.150, released upstream and pending in Fedora updates.

Comment 6 Roland McGrath 2011-01-13 01:24:01 UTC
0.151 is built in brew.

Comment 12 Roland McGrath 2011-02-02 19:58:35 UTC
We have found another related case (same bug/code, just different test case to hit this variant of it) that is a regression (vs 6.0) introduced by this fix.  https://bugzilla.redhat.com/show_bug.cgi?id=674465 is the Fedora bug for the new case.  We will respin this rebase to fix the regression.

Comment 14 Petr Muller 2011-02-02 20:24:14 UTC
Yes, I have seen the issue in systemtap upstream. It's already incorporated into the test.

Comment 15 Florian Nadge 2011-03-01 11:10:01 UTC
Please be so kind and add a few key words to the technical note of this
bugzilla entry using the following structure:

Cause:

Consequence:

Fix:

Result:


For details, see:
https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes

Thanks

Comment 16 Florian Nadge 2011-03-01 11:10:02 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:
Cause
    What actions or circumstances cause this bug to present.
Consequence
    What happens when the bug presents.
Fix
    What was done to fix the bug.
Result
    What now happens when the actions or circumstances above occur.
    Note: this is not the same as the bug doesn’t present anymore.

Comment 17 Roland McGrath 2011-03-01 19:46:03 UTC
Details written in Technical Notes field.

Comment 18 Roland McGrath 2011-03-01 19:46:03 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,9 +1,8 @@
 Cause
-    What actions or circumstances cause this bug to present.
+    After prelink has been used on the system, attempting to use systemtap user-space probes that target functions or statements in certain shared libraries or executables based on separate debuginfo will resolve to the wrong PC location in a prelinked binary.
 Consequence
-    What happens when the bug presents.
+    The intended probes will fail to fire at the correct place in the program, and the program may crash or misbehave due to a corrupted instruction sequence resulting from incorrect breakpoint insertion.
 Fix
-    What was done to fix the bug.
+    The libdwfl (libdw.so) library code was adjusted to use more reliable methods of compensating for prelink's effect on the address layout of a binary when aligning a runtime PC address with an address computed from the separate debuginfo file.
 Result
-    What now happens when the actions or circumstances above occur.
+    The systemtap probes work the same on prelinked binaries as they do on the same binaries when they have not been adjusted by prelink.-    Note: this is not the same as the bug doesn’t present anymore.

Comment 20 errata-xmlrpc 2011-05-19 13:13:33 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-0578.html


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