Bug 10990 - [crosstap] systemtap error on core-image-minimal with tools-profile
Summary: [crosstap] systemtap error on core-image-minimal with tools-profile
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: kernel (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.3 M3
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard:
: 6016 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-01-30 18:29 UTC by Humberto Ibarra
Modified: 2017-03-23 03:18 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Humberto Ibarra 2017-01-30 18:29:33 UTC
I am running testcase 319 (https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=319) which requires to run crosstap on a core-image-minimal with tools-profile and ssh-server.

Expected Results:

crosstap running successfully

Actual Results:

Got an error with systemtap:

Error: Native (host) systemtap not found.
Did you accidentally build a local non-sdk image? (or forget to
add 'tools-profile' to EXTRA_IMAGE_FEATURES in your local.conf)?

This error points to tools-profile not being added to local.conf, but it was.

[humberto@localhost build]$ cat tmp/deploy/images/qemux86/core-image-minimal-qemux86.manifest | grep tools-profile
packagegroup-core-tools-profile qemux86 1.0
[humberto@localhost build]$ cat tmp/deploy/images/qemux86/core-image-minimal-qemux86.manifest | grep systemtap
systemtap i586 3.0

It seems that for some reason stap was not installed to recipes-sysroot-native/usr/bin, where the crosstap is looking for it.
Comment 1 Yi Zhao 2017-02-17 06:25:18 UTC
We should build systemtap-native explicitly which introduced by commit 16882885f656a2312b1d441cb800e1ee28f07dcf . I have updated the test case.

But there is still an issue with crosstap:

Create the trace_open.stp script as follow:
probe syscall.open
{
    printf ("%s(%d) open (%s)\n", execname(), pid(), argstr)
}

Then run crosstap:
$ crosstap root@192.168.7.2 trace_open.stp
/buildarea1/poky/build /buildarea1/poky/build
/buildarea1/poky/build
semantic error: while processing probe kernel.function("compat_sys_open").call from: __syscall.compat_open from: syscall.open from: syscall.open

semantic error: unresolved target-symbol expression: identifier '$filename' at /buildarea1/poky/build/tmp/sysroots/x86_64-linux/usr/share/systemtap/tapset/linux/syscalls2.stp:194:41
        source: 	filename = user_string_quoted(__uint32($filename))
                	                                       ^

Pass 2: analysis failed.  [man error::pass2]


This issue happens both on 2.3 M3 and 2.2.1 RC1.
Comment 2 Saul Wold 2017-03-08 15:56:52 UTC
Found some minor change that has a big impact on this bug.  After going round and round with the kernel and kernel module makefiles, I found where the -I include lines where getting set incorrectly.

Hopefully this fix will address that.
Comment 4 Yi Zhao 2017-03-20 00:31:16 UTC
Verified with 2.3 M3 rc1.
git rev: master/6e20b31d5d17133e0fca086e12a0ad06ab5c4cc8

Use the the following trace_open.stp script:
probe syscall.open
{
    printf ("%s(%d) open\n", execname(), pid())
}

This example is from https://sourceware.org/systemtap/SystemTap_Beginners_Guide/systemtapscript-handler.html Example 3.5
Comment 5 Chen Qi 2017-03-23 03:18:24 UTC
*** Bug 6016 has been marked as a duplicate of this bug. ***