Bug 19362 - Systemtap translator putting in two probes for each probe point in the systemtap.base/library.exp tests
Summary: Systemtap translator putting in two probes for each probe point in the system...
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Josh Stone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-14 20:35 UTC by William Cohen
Modified: 2015-12-14 22:19 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Cohen 2015-12-14 20:35:32 UTC
When running the most recent version of systemtap checkout from the git repository a number of the tests are systemtap.base/library.exp are failing because the probes are firing twice ("(30 != 15)" at the end of failed lines).  The fedora 23 systemtap-2.9-1.fc23.x86_64 does not have this issue.

Checkout and build locally and install.  Then run the portion library.exp tests with:

make installcheck RUNTESTFLAGS="--debug systemtap.base/library.exp"

...
Running ./systemtap.base/library.exp ...
FAIL: library sdt_misc *  (30 != 15)
FAIL: library sdt_misc (dyninst) *  (0 != 15)
FAIL: library sdt_misc *libsdt*  (30 != 15)
FAIL: library sdt_misc (dyninst) *libsdt*  (0 != 15)
FAIL: library sdt_misc libsdt.so  (30 != 15)
FAIL: library sdt_misc (dyninst) libsdt.so  (0 != 15)
FAIL: library sdt_misc PATH/*libsdt*  (30 != 15)
FAIL: library sdt_misc (dyninst) PATH/*libsdt*  (0 != 15)
FAIL: library sdt_misc PATH/libsdt.so  (30 != 15)
FAIL: library sdt_misc (dyninst) PATH/libsdt.so  (0 != 15)
FAIL: library sdt_misc * rpath (30 != 15)
FAIL: library sdt_misc (dyninst) * rpath (0 != 15)
FAIL: library sdt_misc *libsdt* rpath (30 != 15)
FAIL: library sdt_misc (dyninst) *libsdt* rpath (0 != 15)
FAIL: library sdt_misc libsdt.so rpath (30 != 15)
FAIL: library sdt_misc (dyninst) libsdt.so rpath (0 != 15)
FAIL: library sdt_misc PATH/*libsdt* rpath (30 != 15)
FAIL: library sdt_misc (dyninst) PATH/*libsdt* rpath (0 != 15)
FAIL: library sdt_misc (dyninst) PATH/libsdt.so rpath (0 != 15)
FAIL: library .exported (dyninst) (0) (0 >= 3)

		=== systemtap Summary ===

# of expected passes		7
# of unexpected failures	20
make[2]: Leaving directory '/home/wcohen/research/profiling/systemtap_write/systemtap/testsuite'
if test -n ""; then mail  < systemtap.sum; fi
make[1]: Leaving directory '/home/wcohen/research/profiling/systemtap_write/systemtap/testsuite'


Looking at the testsuite/systemtap.log see 

bar begin
bar begin
bar 2
bar 2
In test_probe_2 probe 0x2
In test_probe_2 probe 0x2
In test_probe_2 probe 0x2
In test_probe_2 probe 0x2
bar end
bar end
baz 3 abc
baz 3 abc
baz begin
baz begin
In test_probe_0 probe 0x3
In test_probe_0 probe 0x3
In test_probe_3 probe 0x3 0x400900
In test_probe_3 probe 0x3 0x400900
baz end
baz end
buz 4
buz 4
buz begin
buz begin
In test_probe_4 dtrace probe 0x7ffeb0b967e0
In test_probe_4 dtrace probe 0x7ffeb0b967e0
In test_probe_1 probe 0x0
In test_probe_1 probe 0x0
buz end
buz end
Number of similar warning messages suppressed: 15.
Rerun with -v to see them.
FAIL: library sdt_misc *  (30 != 15)
Comment 1 William Cohen 2015-12-14 21:19:44 UTC
A git bisect points to the following commit causing the failure:

commit 1341a03cc550835d5ddab35bb9333e43bd623714
Author: Josh Stone <jistone@redhat.com>
Date:   Mon Nov 16 17:58:13 2015 -0800

    Drop the string name from struct probe
    
    The name is only used occasionally, so saving the string is wasting
    space.  It's simply "probe_"+index, so let's store the index as an
    identifier, and generate the name on the fly.  This saves noticeable
    time and space when parsing large tapsets like qemu's.
Comment 2 Josh Stone 2015-12-14 22:19:48 UTC
The probe locations got doubled up in that commit, when I refactored the copy constructor to use an initializer list.

Fixed in commit 9ae080fa6846c74f01a28a9a62ab4c4f53846671.