Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 596933 - [RHEL6] stap segfaults on PPC
Summary: [RHEL6] stap segfaults on PPC
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: systemtap
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Frank Ch. Eigler
QA Contact: Petr Muller
Depends On: 602359 640321
TreeView+ depends on / blocked
Reported: 2010-05-27 19:11 UTC by Jeff Burke
Modified: 2018-10-27 10:48 UTC (History)
7 users (show)

Fixed In Version: systemtap-1.2-9.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-11-10 21:44:29 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Jeff Burke 2010-05-27 19:11:03 UTC
Description of problem:
 When trying to run the tracepoint tests for RHEL6 on ppc it fails

Version-Release number of selected component (if applicable):
 Kernel Package = kernel-2.6.32-30.el6.ppc64
 systemtap version = systemtap-1.2-3.el6.ppc64

How reproducible:

Steps to Reproduce:
1. Install the RHEL6.0-Snapshot-5 PPC Server variant onto a PPC host 
2. run the following command 
/usr/bin/stap -L 'kernel.trace("*")' | grep -o "\".*\"" | xargs -I [] -n1 stap -c "sleep 1" -vvvve 'probe kernel.trace("[]") { exit() }'
Actual results:
Segmentation fault (core dumped) stap -c "sleep 1" -vvvve 'probe kernel.trace('$i') { exit() }' > $VERBOSETRACELOG 2>&1

Expected results:
 Should pass

Additional info:

Comment 2 Petr Muller 2010-06-02 14:15:51 UTC
We hit this too in our Tier Tests. Basically everything you run on ppc ends with a segfault (or abort).

With certain probes, stap seems to be a bit more verbose when going down, so I'm putting it here:

# stap -e 'probe begin{printf("PWN!\n")}' 
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_S_create
Aborted (core dumped)

glibc even gave a backtrace in one case:

*** glibc detected *** stap: free(): invalid next size (fast): 0x000000004a121180 ***
======= Backtrace: =========

Comment 3 Frank Ch. Eigler 2010-06-10 13:32:11 UTC
it seems like this was an unforeseen interaction between
our sys/sdt.h style of inline assembly vs. gcc powerpc
optimizer.  stap will adopt a more restricted inline-asm
constraint for STAP_PROBE(...) which should make it work
even if the compiler issue is not settled.

Comment 4 Issue Tracker 2010-06-16 20:33:35 UTC
Event posted on 06-16-2010 02:34pm EDT by Glen Johnson

------- Comment From 2010-06-16 14:24 EDT-------
I hit this bug on RHEL6 pre-beta2

This event sent from IssueTracker by jkachuck 
 issue 989583

Comment 5 Frank Ch. Eigler 2010-06-16 20:38:23 UTC
Upstream bug
is a corequisite, as the powerpc fix listed above unfortunately
breaks i686.  Work in progress.  scox, please append here the commit#
for the PR11708 fix, when that is ready.

Comment 6 Frank Ch. Eigler 2010-06-23 16:11:54 UTC
Let me backtrack a bit from comment #5.  rhel6's systemtap does not have
the SDT_V2 stuff yet, so scox's patch for sdt.h wouldn't apply there directly
anyhow.  And as it only has SDT_V1, the $XXX translator support from is not actually needed.

So for RHEL6, it may be sufficient to change all the "g" constraints to "ron"
in sys/sdt.h and make no other change.

Comment 7 Frank Ch. Eigler 2010-06-29 02:45:10 UTC
See bug #608768 for ppc code negatively impacted by "nro", however.

Comment 8 Frank Ch. Eigler 2010-06-29 14:42:52 UTC
Our current plan is to revert the current fix for this bug, and
instead prereq/buildreq the version of gcc (4.4.4-9) that includes
an alternate fix for the "g" assembly constraint.  That way, 
bug #608768 is fixed too.

Comment 11 2010-11-10 21:44:29 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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