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 639344 - usymbols.exp fails on s390x
Summary: usymbols.exp fails on s390x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: systemtap
Version: 6.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Frank Ch. Eigler
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 738365
TreeView+ depends on / blocked
 
Reported: 2010-10-01 14:00 UTC by Petr Muller
Modified: 2016-09-20 02:07 UTC (History)
6 users (show)

Fixed In Version: systemtap-1.6-3
Doc Type: Bug Fix
Doc Text:
Cause The syscall wrappers used on s390x would convert arguments from pointer to long int. The usymbols test would assume those arguments are pointers. Consequence usymbols test failed on s390x. Fix The usymbols test in the SystemTap testsuite now cast the arguments properly. Result The usymbols test now works on s390x.
Clone Of:
: 738365 (view as bug list)
Environment:
Last Closed: 2011-12-06 15:17:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1517 0 normal SHIPPED_LIVE systemtap bug fix and enhancement update 2011-12-06 00:50:46 UTC
Sourceware 12566 0 None None None Never

Description Petr Muller 2010-10-01 14:00:42 UTC
This is a follow-up bug for Cai Qian's original bug 580197, which was reporting
several different issues with systemtap testsuite. To allow separate processing
of these issues which were not fixed for 6.0, I've dissolved the original bug
into several new deferred to 6.1. 

kernel-2.6.32-71.el6
systemtap-1.2-9.el6

# make RUNTESTFLAGS=usymbols.exp installcheck
(...)
Running /usr/share/systemtap/testsuite/systemtap.context/usymbols.exp ...
FAIL: usymbols

in systemtap.log:

cmd: stap -d /usr/share/systemtap/testsuite/libusymbols.so -d /usr/share/systemtap/testsuite/usymbols -c /usr/share/systemtap/testsuite/usymbols -e $script
cmd output: semantic error: invalid access '->sa_handler' vs. long int: operator '->' at <input>:4:18
        source:           handler = $act->sa_handler;
                                        ^
Pass 2: analysis failed.  Try again with another '--vp 01' option.
FAIL: usymbols

Comment 1 Petr Muller 2011-03-08 17:51:25 UTC
This one has 6.1.0? so we should probably decide what to do with this bug/RFE.

The original issue still holds for RHEL6.1 candidate systemtap. Shall me move
this to 6.2, close this for good, or is here a change this could still go in?

Comment 2 David Smith 2011-03-08 21:11:50 UTC
After looking at this one for a bit, this appears to be a testcase problem only, not a real systemtap problem.  The code that fails to compile comes from the testsuite itself, not a systemtap tapset.  Here's the failing code from testsuite/systemtap.context/usymbols.exp:

====
set testscript {
    probe syscall.rt_sigaction, syscall.rt_sigaction32? {
      if (pid() == target() && execname() == "%s") {
	  handler = user_long(&$act->sa_handler); // Note user address.
	  printf("handler: %%s (%%s)\n", usymname(handler), umodname(handler));
      }
    }
}
====

On an x86_64 system (where the test works), you'll see this:

# kernel.function("sys_rt_sigaction@kernel/signal.c:2638") $sig:int $act:struct sigaction const* $oact:struct sigaction* $sigsetsize:size_t $new_sa:struct k_sigaction $old_sa:struct k_sigaction

On a ppc system, you'll see this:

# stap -L 'kernel.function("sys_rt_sigaction")'
kernel.function("SyS_rt_sigaction@kernel/signal.c:2565") $sig:long int $act:long int $oact:long int $sigsetsize:long int

On ppc/s390x systems, syscall wrappers are used, which end up converting all the arguments into 'long int's.  To get around this problem, the testcase will need to be modified to use @cast() on $act.

Since this is a testcase only problem (and not a problem with systemtap itself), I'd suggest moving this to 6.2.

Comment 3 Petr Muller 2011-03-09 12:15:17 UTC
Moving to 6.2

Comment 4 David Smith 2011-03-10 19:49:22 UTC
I've fixed this testcase problem (and a few others) in upstream commit f7e13ea:

<http://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=f7e13eadc3f666fd356ca7cdb42f1de8d53b5e4b;hp=dce37b537cd3fed15356ddca7052ed9e544d37ae>

The good news is that usymbols.exp passes on:

x86_64 (2.6.32-71.18.2.el6.x86_64)
i686 (2.6.32-71.18.2.el6.i686)
s390x (2.6.32-120.el6.s390x)

However, the 64-bit usymbols.exp test still fails on:

ppc64 (2.6.32-120.el6.ppc64)

This failure appears to be a real problem in systemtap.  I've filed sourceware.org pr12566 against this problem.

Comment 8 David Smith 2011-09-13 14:03:53 UTC
I've fixed this one for s390x upstream with commit 7c7971f:

<http://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=7c7971f5df049cfec2e1d5eaee4795de0e439030>

This patch should backport cleanly to 1.6 (since it is only one line).

I'd suggest splitting this bug into a s390x bug (which we can then close) and a ppc bug (which we won't be able to close because of pr12566).

Comment 10 Petr Muller 2011-09-14 15:46:35 UTC
> I'd suggest splitting this bug into a s390x bug (which we can then close) and a
> ppc bug (which we won't be able to close because of pr12566).

I did that. Bug 738365 now tracks the ppc part, and is proposed for 6.3. I've modified the summary of this bug and we will use it to track the s390x part in 6.2.

Comment 14 William Cohen 2011-11-09 15:48:14 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
    The syscall wrappers used on s390x would convert arguments
    from pointer to long int.  The usymbols test would assume those
    arguments are pointers.
Consequence
    usymbols test failed on s390x.
Fix
    The usymbols test in the SystemTap testsuite now cast the arguments
    properly.
Result
    The usymbols test now works on s390x.

Comment 15 errata-xmlrpc 2011-12-06 15:17:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

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


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