Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 757723 - buildok/memory-write_shared_copy.stp fails to build
buildok/memory-write_shared_copy.stp fails to build
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: systemtap (Show other bugs)
5.8
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Frank Ch. Eigler
qe-baseos-tools
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-28 09:02 EST by Petr Muller
Modified: 2016-09-19 22:08 EDT (History)
6 users (show)

See Also:
Fixed In Version: systemtap-1_6-5_el5
Doc Type: Bug Fix
Doc Text:
The memory-write_shared_copy.stp test uses the memory.stp tapset's vm.write_shared_copy probe. In earlier versions of systemtap, this probe was a dummy, letting the test case falsely pass. In later versions, it became a real probe, but due to incomplete debuginfo generated by gcc, it cannot be fully resolved on a RHEL5 kernel, so the test case fails. This made appear as though there was a regression, whereas the earlier pass was false. The fix is to designate this test case as "KFAIL" (known failure), so is not considered a regression. (BZ#757723)
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-21 00:45:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to mark test as kfail as it will fail due to pr1155 on RHEL5 (564 bytes, patch)
2011-11-29 15:09 EST, William Cohen
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0200 normal SHIPPED_LIVE systemtap bug fix update 2012-02-20 09:53:54 EST

  None (edit)
Description Petr Muller 2011-11-28 09:02:38 EST
Description of problem:
# stap -p4 /usr/share/systemtap/testsuite/buildok/memory-write_shared_copy.stp
Pass 1: parsed user script and 76 library script(s) using 24232virt/13584res/2588shr kb, in 270usr/40sys/310real ms.
semantic error: unable to find local 'address' near pc 0xc0463612  in  cow_user_page mm/memory.c ( (alternatives: $va $src $dst): identifier '$address' at /usr/share/systemtap/tapset/memory.stp:165:17
        source:       address = $address
                                ^
semantic error: unable to find local 'from' near pc 0xc0463612  in  cow_user_page mm/memory.c ( (alternatives: $va $src $dst): identifier '$from' at :166:28
        source:       zero = _IS_ZERO_PAGE($from, $address);
                                           ^
Pass 2: analyzed script: 2 probe(s), 1 function(s), 1 embed(s), 0 global(s) using 102068virt/62440res/42856shr kb, in 400usr/30sys/424real ms.
Pass 2: analysis failed.  Try again with another '--vp 01' option.

Version-Release number of selected component (if applicable):
systemtap-1.6-4.el5

How reproducible:
always

Additional info:
This works with 1.3-9.el5, so this is a regression. The test file was not changed in the rebase.
Comment 2 Frank Ch. Eigler 2011-11-28 12:18:26 EST
Petr, can you confirm the absence of any changes in kernel or gcc versions between
the two sets of tests?

cc:ing jistone for comment with possibly related commit f5958c8f (added in v1.4)
and wcohen for commit e7c973a33 (v1.5).
Comment 3 Petr Muller 2011-11-28 13:11:17 EST
Yes, I obtained the different results on the identical box after just upgrading and downgrading systemtap, no other changes between tests.
Comment 4 Josh Stone 2011-11-28 13:43:31 EST
I think commit f5958c8f only applies to statement probes.  I do recall other commits relating to variable scopes too, but in this case it appears to be identifying correct alternatives: $va $src $dst.

The issue is that vm.write_shared_memory is now preferring to probe an inline function, using @defined($va) to select the right variables, but $va doesn't have a usable location in debuginfo:

$ stap -e 'probe kernel.function("cow_user_page") { println($va) }' -p2
semantic error: failed to retrieve location attribute for local 'va' (dieoffset: 0x641dfd): identifier '$va' at <input>:1:50
        source: probe kernel.function("cow_user_page") { println($va) }
                                                                 ^
Pass 2: analysis failed.  Try again with another '--vp 01' option.
Comment 6 William Cohen 2011-11-29 11:38:17 EST
In systemtap-1.3 on rhel5 the memory.stp has:

probe vm.write_shared_copy = kernel.function("copy_cow_page") ?

On rhel5 systemtap-1.3 doesn't match anything:

$ stap -L 'kernel.function("copy_cow_page")'
$

So the test passed because the probe was optional. However, with systemtap-1.6 on rhel5 the memory.stp has the following which does find an inline function place to probe:

probe vm.write_shared_copy =  kernel.function("cow_user_page") ?,
      kernel.function("copy_cow_page") ?

$ stap -L 'kernel.function("cow_user_page")'
kernel.function("cow_user_page@mm/memory.c:1699")

The cow_user_page function is inlined. The probe handler makes use of the probepoint variable address and zero, which need the arguments ($va and $src)  which cannot be found for the inlined function.
Comment 8 William Cohen 2011-11-29 15:09:43 EST
Created attachment 538220 [details]
Patch to mark test as kfail as it will fail due to pr1155 on RHEL5

This test can fail with some kernels if the kernel has been built with an older compiler that done not include the argument information for inline functions (PR1155).
Comment 12 William Cohen 2012-01-18 16:23:57 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:
The memory-write_shared_copy.stp use the memory.stp tapset's
vm.write_shared_copy. In earlier versions of SystemTap this probe
point aliased to an optional probe point and the arguments were never
used.  For newer versions of SystemTap the tapset always provides a
place for the probe, but the arguments for the inlined function are
not available for the RHEL 5 kernel.  The test fails as a result.
This failue is due to the limitations in the debug information
generated for the RHEL 5 kernel (sourceware PR1155).
Comment 13 Martin Prpič 2012-01-24 04:11:28 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,8 +1 @@
-The memory-write_shared_copy.stp use the memory.stp tapset's
+The memory-write_shared_copy.stp test uses the memory.stp tapset's vm.write_shared_copy probe. In earlier versions of SystemTap, this probe point aliased to an optional probe point and its arguments were never used. For newer versions of SystemTap, the tapset always provides a place for the probe, but the arguments for the inlined function are not available for the Red Hat Enterprise Linux 5 kernel, causing the aforementioned test to fail. This failue is due to the limitations of debug information generated for the Red Hat Enterprise Linux 5 kernel. (BZ#757723)-vm.write_shared_copy. In earlier versions of SystemTap this probe
-point aliased to an optional probe point and the arguments were never
-used.  For newer versions of SystemTap the tapset always provides a
-place for the probe, but the arguments for the inlined function are
-not available for the RHEL 5 kernel.  The test fails as a result.
-This failue is due to the limitations in the debug information
-generated for the RHEL 5 kernel (sourceware PR1155).
Comment 14 Frank Ch. Eigler 2012-01-25 09:35:10 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 +1 @@
-The memory-write_shared_copy.stp test uses the memory.stp tapset's vm.write_shared_copy probe. In earlier versions of SystemTap, this probe point aliased to an optional probe point and its arguments were never used. For newer versions of SystemTap, the tapset always provides a place for the probe, but the arguments for the inlined function are not available for the Red Hat Enterprise Linux 5 kernel, causing the aforementioned test to fail. This failue is due to the limitations of debug information generated for the Red Hat Enterprise Linux 5 kernel. (BZ#757723)+The memory-write_shared_copy.stp test uses the memory.stp tapset's vm.write_shared_copy probe.  In earlier versions of systemtap, this probe was a dummy, letting the test case falsely pass.  In later versions, it became a real probe, but due to incomplete debuginfo generated by gcc, it cannot be fully resolved on a RHEL5 kernel, so the test case fails.  This made appear as though there was a regression, whereas the earlier pass was false.  The fix is to designate this test case as "KFAIL" (known failure), so is not considered a regression. (BZ#757723)
Comment 15 errata-xmlrpc 2012-02-21 00:45:15 EST
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-2012-0200.html

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