Red Hat Bugzilla – Bug 757723
buildok/memory-write_shared_copy.stp fails to build
Last modified: 2016-09-19 22:08:28 EDT
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.
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).
Yes, I obtained the different results on the identical box after just upgrading and downgrading systemtap, no other changes between tests.
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.
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.
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).
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).
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).
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)
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