Bug 691763
| Summary: | systemtap.base/cxxclass.exp: 2 PASS -> 1 FAIL on ppc64 | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Petr Muller <pmuller> | |
| Component: | systemtap | Assignee: | Frank Ch. Eigler <fche> | |
| Status: | CLOSED ERRATA | QA Contact: | qe-baseos-tools-bugs | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 6.1 | CC: | dsmith, mjw, ohudlick, phan, scox | |
| Target Milestone: | rc | Keywords: | Regression | |
| Target Release: | --- | |||
| Hardware: | ppc64 | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | systemtap-1.6-1.el6 | Doc Type: | Bug Fix | |
| Doc Text: |
On some architectures, systemtap may not find certain functions to probe or variables to fetch, in highly optimized code. You may be able to apply less optimization, or change the placement of the probes to a higher call site.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 750924 (view as bug list) | Environment: | ||
| Last Closed: | 2011-12-06 15:17:47 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 682670, 702988, 750924 | |||
|
Description
Petr Muller
2011-03-29 12:26:35 UTC
happens on s390x too *** Bug 692461 has been marked as a duplicate of this bug. *** I've duplicated this one against: kernel-2.6.32-130.el6.ppc64 systemtap-1.4-6.el6.ppc64 elfutils-0.152-1.el6.ppc64 I also tried this with HEAD systemtap and got the same result. So, we'll have to do more investigation. This test failure appears related to g++ optimization. The test uses '-O2' when compiling, which fails. If I change this to '-O0' (no optimization), the test runs just fine. Since gdb can't find the ProbeClass constructor or destructor when compiled with '-O2', I'm guessing the they were inlined. (In reply to comment #5) > This test failure appears related to g++ optimization. The test uses '-O2' > when compiling, which fails. If I change this to '-O0' (no optimization), the > test runs just fine. Since gdb can't find the ProbeClass constructor or > destructor when compiled with '-O2', I'm guessing the they were inlined. I'm seeing the exact same thing on s390x: kernel-2.6.32-131.0.1.el6.s390x systemtap-1.4-6.el6.ppc64 elfutils-0.152-1.el6.ppc64 Without optimization, the test works fine. We haven't been able to diagnose this problem in time. Adding release note blurb and deferring to rhel6.2.
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:
On some architectures, systemtap may not find certain functions to probe or variables to fetch, in highly optimized code. You may be able to apply less optimization, or change the placement of the probes to a higher call site.
ppc64 (and probably also s390x) for sdt arguments are creating descriptors of the form .LC1@toc(2) which stap does not handle. So it falls back to trying dwarf, but the ideal is to not rely on dwarf info. In the case of sdt-v3 in current sys/sdt.h, there is no dwarf fallback for $argN possible, is there? No dwarf fallback is possible as the args don't actually exist in the C sense. commit: 710a2a45c4 Add -DSTAP_SDT_ARG_CONSTRAINT The upstream commit mentioned in comment #14 fixes various sdt.h test cases by purposefully reducing the gcc optimization for the marker sites for non-x86 machines. I can reproduce the duplicated bug692461 on s390x, with systemtap-1.6-2.el6: make installcheck RUNTESTFLAGS='--debug systemtap.base/sdt.exp' ... Executing on host: gcc /usr/share/systemtap/testsuite/systemtap.base/sdt.c -g -isystem/usr/share/systemtap/testsuite -isystem/usr/include -Wall -Wextra -Werror -O2 -lm -o sdt.c.exe.0 (timeout = 300) spawn -ignore SIGHUP gcc /usr/share/systemtap/testsuite/systemtap.base/sdt.c -g -isystem/usr/share/systemtap/testsuite -isystem/usr/include -Wall -Wextra -Werror -O2 -lm -o sdt.c.exe.0^M PASS: compiling sdt.c -O2 uprobe executing: stap -w /usr/share/systemtap/testsuite/systemtap.base/sdt.stp sdt.c.exe.0 -c ./sdt.c.exe.0 FAIL: sdt -O2 uprobe line 1: expected "_" Got "semantic error: unable to find local 'arg1' near pc 0x80000538 in call1 /usr/share/systemtap/testsuite/systemtap.base/sdt.c ( (alternatives: $a): identifier '$arg1' at /usr/share/systemtap/testsuite/systemtap.base/sdt.stp:8:18" Executing on host: gcc /usr/share/systemtap/testsuite/systemtap.base/sdt.c -g -isystem/usr/share/systemtap/testsuite -isystem/usr/include -Wall -Wextra -Werror -O3 -lm -o sdt.c.exe.1 (timeout = 300) spawn -ignore SIGHUP gcc /usr/share/systemtap/testsuite/systemtap.base/sdt.c -g -isystem/usr/share/systemtap/testsuite -isystem/usr/include -Wall -Wextra -Werror -O3 -lm -o sdt.c.exe.1^M PASS: compiling sdt.c -O3 uprobe executing: stap -w /usr/share/systemtap/testsuite/systemtap.base/sdt.stp sdt.c.exe.1 -c ./sdt.c.exe.1 FAIL: sdt -O3 uprobe line 1: expected "_" Got "semantic error: unable to find local 'arg1' near pc 0x80000538 in call1 /usr/share/systemtap/testsuite/systemtap.base/sdt.c ( (alternatives: $a): identifier '$arg1' at /usr/share/systemtap/testsuite/systemtap.base/sdt.stp:8:18" And cxxclass.exp also failed on s390x, the error messages are: Running /usr/share/systemtap/testsuite/systemtap.base/cxxclass.exp ... Executing on host: g++ /usr/share/systemtap/testsuite/systemtap.base/cxxclass.cxx -g -O2 -isystem/usr/share/systemtap/testsuite -isystem/usr/include -DSTAP_SDT_ARG_CONSTRAINT=nr -lm -o cxxclass.exe (timeout = 300) spawn -ignore SIGHUP g++ /usr/share/systemtap/testsuite/systemtap.base/cxxclass.cxx -g -O2 -isystem/usr/share/systemtap/testsuite -isystem/usr/include -DSTAP_SDT_ARG_CONSTRAINT=nr -lm -o cxxclass.exe^M PASS: cxxclass.c compile executing: stap -w /usr/share/systemtap/testsuite/systemtap.base/cxxclass.stp cxxclass.exe -c ./cxxclass.exe FAIL: cxxclass line 1: expected "main_enter" Got "semantic error: unable to find local 'arg1' near pc 0x800005e8 in <unknown> /usr/share/systemtap/testsuite/systemtap.base/cxxclass.cxx ( (alternatives: $i $inst): identifier '$arg1' at /usr/share/systemtap/testsuite/systemtap.base/cxxclass.stp:13:24" testcase /usr/share/systemtap/testsuite/systemtap.base/cxxclass.exp completed in 1 seconds Still happens on s390x: PASS: cxxclass.c compile executing: stap -w /usr/share/systemtap/testsuite/systemtap.base/cxxclass.stp cxxclass.exe -c ./cxxclass.exe FAIL: cxxclass line 1: expected "main_enter" Got "semantic error: unable to find local 'arg1' near pc 0x800005e8 in <unknown> /usr/share/systemtap/testsuite/systemtap.base/cxxclass.cxx ( (alternatives: $i $inst): identifier '$arg1' at /usr/share/systemtap/testsuite/systemtap.base/cxxclass.stp:1 Fixed on ppc, PASSed on i686, x86_64. Is there any chance this could be fixed in 6.2, or shall I make a bug for the s390x case? Moving to VERIFIED for ppc64 (as requested by the subject line). s390x failures are tracked in bug 750924, proposed for rhel6.3 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 |