systemtap fails to build for arndale-uprobe testing

Bug #1303785 reported by Naresh Kamboju
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro CI
Fix Released
High
Fathi Boudra

Bug Description

We noticed systemtap testsuite build failure on target having arndale-uprobe image.
This issue needs to be investigated it could be header files missing or not.

This test performed on LAVA.

build fail log:
---------------
Makefile:608: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
In file included from /usr/src/linux-headers-3.14.0-linaro-arndale/arch/arm/include/asm/sparsemem.h:4:0,
from include/linux/page-flags-layout.h:25,
from include/linux/mmzone.h:18,
from include/linux/gfp.h:5,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /usr/local/share/systemtap/runtime/linux/runtime.h:14,
from /usr/local/share/systemtap/runtime/runtime.h:24,
from /tmp/stapWup8Iv/stap_bdc2de1264cc08014c6f1cbc96c9eb2e_878_src.c:24:
/usr/src/linux-headers-3.14.0-linaro-arndale/arch/arm/include/asm/memory.h:24:25: fatal error: mach/memory.h: No such file or directory
#include <mach/memory.h>
^
compilation terminated.
make[4]: *** [/tmp/stapWup8Iv/stap_bdc2de1264cc08014c6f1cbc96c9eb2e_878_src.o] Error 1
make[3]: *** [_module_/tmp/stapWup8Iv] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]

**** aborting testing.

Related Lava job:
-----------------
https://validation.linaro.org/scheduler/job/119183/log_file#L_23_8856

Build:
- "hwpack": "http://snapshots.linaro.org/kernel-hwpack/linux-linaro-tracking-ll-arndale-uprobes/361/hwpack_linaro-arndale_20140403-1715_b361_armhf_supported.tar.gz",
- "rootfs": "http://snapshots.linaro.org/ubuntu/images/server/650/linaro-saucy-server-20140325-650.tar.gz"

for reference, the test definition:
https://git.linaro.org/people/naresh.kamboju/qa/test-definitions.git/blob/HEAD:/ubuntu/uprobe-systemtap.yaml

Fathi Boudra (fboudra)
summary: - kernel headers missing while building systemtap on arndale-uprobe
+ systemtap fails to build for arndale-uprobe testing
Changed in linaro-ci:
assignee: nobody → Fathi Boudra (fboudra)
description: updated
Revision history for this message
Fathi Boudra (fboudra) wrote :

Fix the bug title and description. afaict, we observe a build failure with systemtap testsuite. Now we need to investigate on the root cause (it could be related to the headers or not ...).

Changed in linaro-ci:
milestone: none → 2014.04
summary: - systemtap fails to build for arndale-uprobe testing
+ header file missing on arndale-uprobe image
description: updated
description: updated
Revision history for this message
Fathi Boudra (fboudra) wrote :

Have you ever been able to run this test definition?

summary: - header file missing on arndale-uprobe image
+ systemtap fails to build for arndale-uprobe testing
Fathi Boudra (fboudra)
Changed in linaro-ci:
status: New → Confirmed
importance: Undecided → High
Fathi Boudra (fboudra)
Changed in linaro-ci:
status: Confirmed → In Progress
Revision history for this message
Fathi Boudra (fboudra) wrote :

https://git.linaro.org/ci/lci-build-tools.git/blob/HEAD:/build-scripts/builddeb#l303

Fix commited. It will require next ll update to get builddeb fix.

Changed in linaro-ci:
status: In Progress → Fix Committed
Fathi Boudra (fboudra)
Changed in linaro-ci:
status: Fix Committed → Fix Released
Revision history for this message
Fathi Boudra (fboudra) wrote :
Download full text (5.0 KiB)

latest arndale-uprobes passed the kernel header related failure. as far as I'm concerned the bug is fixed.

However, it fails later on (using the script provided by Naresh):

kernel location:
kernel version: 3.14.0-linaro-arndale
systemtap location: /usr/local/bin/stap
systemtap version: version 2.5/0.157, non-git sources
gcc location: /usr/bin/gcc
gcc version: gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1

**** failed systemtap kernel-devel smoke test:

Makefile:622: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
In file included from include/linux/kobject.h:21:0,
                 from include/linux/module.h:16,
                 from /usr/local/share/systemtap/runtime/linux/runtime.h:14,
                 from /usr/local/share/systemtap/runtime/runtime.h:24,
                 from /tmp/stapAd5hoM/stap_b8bd15d808f759433855a4956409904d_878_src.c:24:
include/linux/sysfs.h: In function 'sysfs_get_dirent':
include/linux/sysfs.h:449:2: error: pointer targets in passing argument 2 of 'kernfs_find_and_get' differ in signedness [-Werror=pointer-sign]
  return kernfs_find_and_get(parent, name);
  ^
In file included from include/linux/sysfs.h:15:0,
                 from include/linux/kobject.h:21,
                 from include/linux/module.h:16,
                 from /usr/local/share/systemtap/runtime/linux/runtime.h:14,
                 from /usr/local/share/systemtap/runtime/runtime.h:24,
                 from /tmp/stapAd5hoM/stap_b8bd15d808f759433855a4956409904d_878_src.c:24:
include/linux/kernfs.h:331:1: note: expected 'const char *' but argument is of type 'const unsigned char *'
 kernfs_find_and_get(struct kernfs_node *kn, const char *name)
 ^
In file included from /usr/local/share/systemtap/runtime/linux/task_finder.c:17:0,
                 from /usr/local/share/systemtap/runtime/linux/runtime.h:192,
                 from /usr/local/share/systemtap/runtime/runtime.h:24,
                 from /tmp/stapAd5hoM/stap_b8bd15d808f759433855a4956409904d_878_src.c:24:
/usr/local/share/systemtap/runtime/linux/task_finder2.c: In function '__stp_utrace_attach_match_filename':
/usr/local/share/systemtap/runtime/linux/task_finder2.c:821:11: error: incompatible types when assigning to type 'uid_t' from type 'kuid_t'
  tsk_euid = task_euid(tsk);
           ^
/usr/local/share/systemtap/runtime/linux/task_finder2.c: In function 'stap_start_task_finder':
/usr/local/share/systemtap/runtime/linux/task_finder2.c:1711:12: error: incompatible types when assigning to type 'uid_t' from type 'kuid_t'
   tsk_euid = task_euid(tsk);
            ^
In file included from /usr/local/share/systemtap/runtime/linux/runtime.h:198:0,
                 from /usr/local/share/systemtap/runtime/runtime.h:24,
                 from /tmp/stapAd5hoM/stap_b8bd15d808f759433855a4956409904d_878_src.c:24:
/usr/local/share/systemtap/runtime/sym.c: In function '_stp_snprint_addr':
/usr/local/share/systemtap/runtime/sym.c:567:4: error: implicit declaration of function 'preempt_enable_no_resched' [-Werror=implicit-function-declaration]
    preempt_enable_no_resched();
    ^
In file included from include/linux/sched.h:53:0,
                 from include/linux/ptrace....

Read more...

Revision history for this message
Naresh Kamboju (naresh-kamboju) wrote :

[ David Long wrote on 29-04-2014]
I was just reading bug 1303785. On the namespace thing, I found exynos_defconfig no longer sets CONFIG_USER_NS. This is needed. I also had to set CONFIG_PERF_EVENTS and CONFIG_KPROBES, which apparently were on by default for Panda. And of course we've always had to set CONFIG_RELAY for systemtap. Then there's CONFIG_KPROBE_EVENT, CONFIG_UPROBES, and CONFIG_UPROBES_EVENT.

The CONFIG_CC_STACK... stuff is new to me. The only config I have for that in my Arndale test builds is CONFIG_CC_STACKPROTECTOR_NONE.

Also, when I moved on from v3.14 to v3.15-rc2 I found that I had to pull fresher systemtap sources. I had build problems with the stale version.

BTW, when you move on to v3.15 remember to stop pulling my uprobes-v7 work. That's in v3.15 already. We *might* have to add a patch for a cache issue with uprobes, if upstream waits for v3.16 to accept it. Without it I see a failure round 10% of the time in one systemtap test.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.