Bug 1431 - systemtap kernel module generation error for qemux86
Summary: systemtap kernel module generation error for qemux86
Status: RESOLVED FIXED
Alias: None
Product: Kernel
Classification: Yocto Project Subprojects
Component: kernel-configuration (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.1
Assignee: Tom Zanussi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-08-30 14:24 UTC by Jessica
Modified: 2011-09-06 07:37 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
systemtap script file (1.14 KB, application/octet-stream)
2011-08-30 14:26 UTC, Jessica
no flags Details
kernel module gen script (1.77 KB, application/octet-stream)
2011-08-30 14:26 UTC, Jessica
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jessica 2011-08-30 14:24:45 UTC
When tried to generate a kernel module for systemtap against qemux86, I got the following error.  And according to Tom seems some fundamental kernel config is not picked up.  Need CONFIG_KPROBES.  I'm attaching my km generation script and the systemtap script.

./stapkm_gen trace_open.stp 
WARNING: kernel release/architecture mismatch with host forces last-pass 4.
Pass 1: parsed user script and 75 library script(s) using 16724virt/12732res/1920shr kb, in 140usr/10sys/215real ms.
Pass 2: analyzed script: 5 probe(s), 2 function(s), 22 embed(s), 4 global(s) using 172940virt/29376res/2864shr kb, in 1670usr/860sys/6574real ms.
Pass 3: translated to C into "/tmp/stapeRngbi/trace_open.c" using 172708virt/32264res/5832shr kb, in 410usr/10sys/453real ms.
In file included from /tmp/stapeRngbi/trace_open.c:56:0:
/home/jzhang/systemtap-1.4/share/systemtap/runtime/stack.c:98:2: error: unknown field ‘warning’ specified in initializer
/home/jzhang/systemtap-1.4/share/systemtap/runtime/stack.c:98:2: error: initialization from incompatible pointer type [-Werror]
/home/jzhang/systemtap-1.4/share/systemtap/runtime/stack.c:98:2: error: (near initialization for ‘print_stack_ops.address’) [-Werror]
/home/jzhang/systemtap-1.4/share/systemtap/runtime/stack.c:99:2: error: unknown field ‘warning_symbol’ specified in initializer
/home/jzhang/systemtap-1.4/share/systemtap/runtime/stack.c:99:2: error: initialization from incompatible pointer type [-Werror]
/home/jzhang/systemtap-1.4/share/systemtap/runtime/stack.c:99:2: error: (near initialization for ‘print_stack_ops.stack’) [-Werror]
/tmp/stapeRngbi/trace_open.c:261:2: error: ‘CLONE_STOPPED’ undeclared here (not in a function)
/tmp/stapeRngbi/trace_open.c:1763:2: error: #error "Need CONFIG_KPROBES!"
cc1: all warnings being treated as errors

make[3]: *** [/tmp/stapeRngbi/trace_open.o] Error 1
make[2]: *** [_module_/tmp/stapeRngbi] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
Pass 4: compiled C into "trace_open.ko" in 3190usr/910sys/5198real ms.
Pass 4: compilation failed.  Try again with another '--vp 0001' option.
Comment 1 Jessica 2011-08-30 14:26:25 UTC
Created attachment 218 [details]
systemtap script file
Comment 2 Jessica 2011-08-30 14:26:53 UTC
Created attachment 219 [details]
kernel module gen script
Comment 3 Tom Zanussi 2011-08-30 19:21:37 UTC
The reason is that the systemtap feature was disabled in the move to 3.0 i.e. in standard.scc:

#include features/systemtap/systemtap.scc
#tag systemtap
Comment 4 Darren Hart 2011-09-01 11:33:27 UTC
Tom is working on updating and enabling systemtap. ETA is Friday Sep 2.
Comment 5 Tom Zanussi 2011-09-06 07:37:00 UTC
Fixed by commits:

linux-yocto-3.0/meta: 82140b960a7cc13d116be61a85d4fe7f7d38680f
poky/master: 6ca3b3107da861491279dc6c99fc3922a297f771