Bug 11984 - crosstap doesn't work on 2.4 M3 RC1
Summary: crosstap doesn't work on 2.4 M3 RC1
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.4 M4
Assignee: Saul Wold
QA Contact: Yi Zhao
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-08-28 07:26 UTC by Yi Zhao
Modified: 2017-09-29 00:53 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
crosstap.log (3.68 KB, text/x-log)
2017-08-28 07:26 UTC, Yi Zhao
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2017-08-28 07:26:21 UTC
Created attachment 3953 [details]
crosstap.log

Git rev: master/5f6945f5031e1a4ca116cc1eccf4c2f9dc228547

Steps:

Steps:
1. Create the trace_open.stp script:

probe syscall.open
{
    printf ("%s(%d) open\n", execname(), pid())
}

2. bitbake core-image-sato-sdk
   bitbake systemtap-native -c addto_recipe_sysroot

3. Launch the qemuppc

4. Run "crosstap root@192.168.7.2 trace_open.stp"

Error log:
###############################
/buildarea/jenkins-yocto/poky/build /buildarea/jenkins-yocto/poky/build
/buildarea/jenkins-yocto/poky/build
/buildarea/jenkins-yocto/poky/build /buildarea/jenkins-yocto/poky/build
/buildarea/jenkins-yocto/poky/build
In file included from /buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/linux/runtime.h:209:0,
                 from /buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/runtime.h:26,
                 from /tmp/stap4wMEQE/trace_open_src.c:25:
/buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/linux/access_process_vm.h: In function '__access_process_vm_':
/buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/linux/access_process_vm.h:24:8: error: implicit declaration of function 'get_task_mm'; did you mean 'get_task_comm'? [-Werror=implicit-function-declaration]
   mm = get_task_mm (tsk);
        ^~~~~~~~~~~
        get_task_comm
/buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/linux/access_process_vm.h:24:6: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
   mm = get_task_mm (tsk);
      ^   
/buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/linux/access_process_vm.h:77:3: error: implicit declaration of function 'mmput'; did you mean 'bdput'? [-Werror=implicit-function-declaration]
   mmput (mm);
   ^~~~~
   bdput
In file included from /buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/linux/task_finder2.c:4:0,
                 from /buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/linux/task_finder.c:17,
                 from /buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/linux/runtime.h:222,
                 from /buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/runtime.h:26,
                 from /tmp/stap4wMEQE/trace_open_src.c:25:
/buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/stp_utrace.c: In function 'utrace_do_stop':
/buildarea/jenkins-yocto/poky/build/tmp/work/x86_64-linux/systemtap-native/3.1-r0/recipe-sysroot-native/usr/share/systemtap/runtime/stp_utrace.c:1108:4: error: implicit declaration of function '__set_task_state'; did you mean '__set_task_comm'? [-Werror=implicit-function-declaration]
    __set_task_state(target, TASK_TRACED);
    ^~~~~~~~~~~~~~~~
    __set_task_comm
cc1: all warnings being treated as errors
/buildarea/jenkins-yocto/poky/build/tmp/work-shared/qemuppc/kernel-source/scripts/Makefile.build:302: recipe for target '/tmp/stap4wMEQE/trace_open_src.o' failed
make[3]: *** [/tmp/stap4wMEQE/trace_open_src.o] Error 1
#################################################

Please see the attachment for the full log.
Comment 1 Ovidiu Panait 2017-09-07 14:20:26 UTC
On master/8b4f16a9cbbaf521461f699b7264fac2ac872581 after applying the following patches to systemtap, the issue is eliminated:

https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=62640f2ed0deef9355970d216136ad4c49afa3d0
https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=a477a43122609691ce6ef24f71114cfaa9790392

I also did some testing with a couple of more complex scripts from systemtap's website, and encountered no errors:

https://sourceware.org/systemtap/examples/profiling/linetimes.stp
https://sourceware.org/systemtap/examples/process/sig_by_pid.stp
Comment 2 Saul Wold 2017-09-11 16:43:44 UTC
There were some additional issues and another patch that I needed to provide upstream.  I have already submitted and have merged a systemtap update.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=9177ad0f2de1e62c0c8123b8000e429ca603a650
Comment 3 Yi Zhao 2017-09-29 00:53:16 UTC
Verified with 2.4 RC1 build.
Git rev: master/592c3449697ce39bf07864fafd7f0a61ca230561