Bug 652858 - misaddresed user-space probes on prelinked shared libraries on i686 (REL)
misaddresed user-space probes on prelinked shared libraries on i686 (REL)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: elfutils (Show other bugs)
6.0
All Unspecified
low Severity high
: rc
: ---
Assigned To: Petr Machata
qe-baseos-tools
: Rebase, Regression
Depends On: 652857
Blocks: 646871
  Show dependency treegraph
 
Reported: 2010-11-12 19:57 EST by Roland McGrath
Modified: 2015-05-04 21:35 EDT (History)
8 users (show)

See Also:
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.
Story Points: ---
Clone Of: 646871
Environment:
Last Closed: 2011-05-19 09:13:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Roland McGrath 2010-11-12 19:57:37 EST
+++ 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-12 19:59:59 EST
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 17:04:40 EST
This is fixed in elfutils-0.150, released upstream and pending in Fedora updates.
Comment 6 Roland McGrath 2011-01-12 20:24:01 EST
0.151 is built in brew.
Comment 12 Roland McGrath 2011-02-02 14:58:35 EST
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 15:24:14 EST
Yes, I have seen the issue in systemtap upstream. It's already incorporated into the test.
Comment 15 Florian Nadge 2011-03-01 06:10:01 EST
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 06:10:02 EST
    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 14:46:03 EST
Details written in Technical Notes field.
Comment 18 Roland McGrath 2011-03-01 14:46:03 EST
    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 09:13:33 EDT
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.