public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* error in stap
@ 2009-04-24 10:28 Peter Teoh
  2009-04-24 10:50 ` Mark Wielaard
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Teoh @ 2009-04-24 10:28 UTC (permalink / raw)
  To: SystemTAP

My systemtap has git-pulled and updated as of now.   While doing some
script processing, I got the following errors:


/usr/local/share/systemtap/runtime/autoconf-procfs-owner.c: In function ‘bar’:
/usr/local/share/systemtap/runtime/autoconf-procfs-owner.c:7: error:
‘struct proc_dir_entry’ has no member named ‘owner’
if gcc -D__KERNEL__  -Iinclude
-I/sdb1/download/linux-2.6-latest/arch/x86/include -include
include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Os -m64 -mtune=generic
-mno-red-zone -mcmodel=kernel -funit-at-a-time
-maccumulate-outgoing-args -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-fno-stack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement
-Wno-pointer-sign -fwrapv    -DKBUILD_BASENAME=\"stap_9237\" -Werror
-S -o /dev/null -xc
"/usr/local/share/systemtap/runtime"/autoconf-alloc-percpu-align.c;
then echo "#define STAPCONF_ALLOC_PERCPU_ALIGN 1"; fi >>
/tmp/stap2jIKVp/stapconf_9237.h
if gcc -D__KERNEL__  -Iinclude
-I/sdb1/download/linux-2.6-latest/arch/x86/include -include
include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Os -m64 -mtune=generic
-mno-red-zone -mcmodel=kernel -funit-at-a-time
-maccumulate-outgoing-args -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-fno-stack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement
-Wno-pointer-sign -fwrapv    -DKBUILD_BASENAME=\"stap_9237\" -Werror
-S -o /dev/null -xc
"/usr/local/share/systemtap/runtime"/autoconf-find-task-pid.c; then
echo "#define STAPCONF_FIND_TASK_PID 1"; fi >>
/tmp/stap2jIKVp/stapconf_9237.h
/usr/local/share/systemtap/runtime/autoconf-find-task-pid.c: In function ‘foo’:
/usr/local/share/systemtap/runtime/autoconf-find-task-pid.c:4: error:
implicit declaration of function ‘find_task_by_pid’
cc1: warnings being treated as errors
/usr/local/share/systemtap/runtime/autoconf-find-task-pid.c:4: error:
initialization makes pointer from integer without a cast
if gcc -D__KERNEL__  -Iinclude
-I/sdb1/download/linux-2.6-latest/arch/x86/include -include
include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Os -m64 -mtune=generic
-mno-red-zone -mcmodel=kernel -funit-at-a-time
-maccumulate-outgoing-args -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-fno-stack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement
-Wno-pointer-sign -fwrapv    -DKBUILD_BASENAME=\"stap_9237\" -Werror
-S -o /dev/null -xc
"/usr/local/share/systemtap/runtime"/autoconf-x86-gs.c; then echo
"#define STAPCONF_X86_GS 1"; fi >> /tmp/stap2jIKVp/stapconf_9237.h
if gcc -D__KERNEL__  -Iinclude
-I/sdb1/download/linux-2.6-latest/arch/x86/include -include
include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Os -m64 -mtune=generic
-mno-red-zone -mcmodel=kernel -funit-at-a-time
-maccumulate-outgoing-args -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-fno-stack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement
-Wno-pointer-sign -fwrapv    -DKBUILD_BASENAME=\"stap_9237\" -Werror
-S -o /dev/null -xc
"/usr/local/share/systemtap/runtime"/autoconf-save-stack-trace.c; then
echo "#define STAPCONF_KERNEL_STACKTRACE 1"; fi >>
/tmp/stap2jIKVp/stapconf_9237.h
/usr/local/share/systemtap/runtime/autoconf-save-stack-trace.c: In
function ‘foo’:
/usr/local/share/systemtap/runtime/autoconf-save-stack-trace.c:14:
error: ‘tsk’ undeclared (first use in this function)
/usr/local/share/systemtap/runtime/autoconf-save-stack-trace.c:14:
error: (Each undeclared identifier is reported only once
/usr/local/share/systemtap/runtime/autoconf-save-stack-trace.c:14:
error: for each function it appears in.)
if gcc -D__KERNEL__  -Iinclude
-I/sdb1/download/linux-2.6-latest/arch/x86/include -include
include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Os -m64 -mtune=generic
-mno-red-zone -mcmodel=kernel -funit-at-a-time
-maccumulate-outgoing-args -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-fno-stack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement
-Wno-pointer-sign -fwrapv    -DKBUILD_BASENAME=\"stap_9237\" -Werror
-S -o /dev/null -xc
"/usr/local/share/systemtap/runtime"/autoconf-asm-syscall.c; then echo
"#define STAPCONF_ASM_SYSCALL_H 1"; fi >>
/tmp/stap2jIKVp/stapconf_9237.h
  gcc -Wp,-MD,/tmp/stap2jIKVp/.stap_9237.o.d  -nostdinc -isystem
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/include -Iinclude
-I/sdb1/download/linux-2.6-latest/arch/x86/include -include
include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Os -m64 -mtune=generic
-mno-red-zone -mcmodel=kernel -funit-at-a-time
-maccumulate-outgoing-args -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-fno-stack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement
-Wno-pointer-sign -fwrapv -Iinclude2/asm/mach-default -include
/tmp/stap2jIKVp/stapconf_9237.h -ftime-report -Q -freorder-blocks
-Wno-unused -Werror -I"/usr/local/share/system

And the compilation outcome:

aprun -v -v /tmp/stap2jIKVp/stap_9237.ko
staprun:main:269 modpath="/tmp/stap2jIKVp/stap_9237.ko", modname="stap_9237"
staprun:init_staprun:207 init_staprun
staprun:insert_module:47 inserting module
staprun:insert_module:66 module options: _stp_bufsize=0
Error inserting module '/tmp/stap2jIKVp/stap_9237.ko': Invalid module format
Retrying, after attempted removal of module stap_9237 (rc -1)
staprun:insert_module:47 inserting module
staprun:insert_module:66 module options: _stp_bufsize=0
Error inserting module '/tmp/stap2jIKVp/stap_9237.ko': Invalid module format
Pass 5: run completed in 10usr/10sys/12real ms.
Pass 5: run failed.  Try again with another '--vp 00001' option.
Keeping temporary directory "/tmp/stap2jIKVp"


And dmesg shows:

[ 1429.082734] stap_9237: disagrees about version of symbol module_layout
[ 1429.087594] stap_9237: disagrees about version of symbol module_layout


My script is just a simple netcore analysis:

probe kernel.function("*@net/core/dev.c").call {
  printf("%s -> %s\n", thread_indent(1), probefunc());
  print_backtrace();
  printf("\n");
}

Any ideas?
-- 
Regards,
Peter Teoh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: error in stap
  2009-04-24 10:28 error in stap Peter Teoh
@ 2009-04-24 10:50 ` Mark Wielaard
  2009-04-24 13:51   ` Peter Teoh
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Wielaard @ 2009-04-24 10:50 UTC (permalink / raw)
  To: Peter Teoh; +Cc: SystemTAP

Hi Peter,

On Fri, 2009-04-24 at 06:28 -0400, Peter Teoh wrote:
> My systemtap has git-pulled and updated as of now.   While doing some
> script processing, I got the following errors:
> staprun:insert_module:47 inserting module
> staprun:insert_module:66 module options: _stp_bufsize=0
> Error inserting module '/tmp/stap2jIKVp/stap_9237.ko': Invalid module format
> [...]
> And dmesg shows:
> 
> [ 1429.082734] stap_9237: disagrees about version of symbol module_layout
> [ 1429.087594] stap_9237: disagrees about version of symbol module_layout
>
> My script is just a simple netcore analysis:
> 
> probe kernel.function("*@net/core/dev.c").call {
>   printf("%s -> %s\n", thread_indent(1), probefunc());
>   print_backtrace();
>   printf("\n");
> }
> 
> Any ideas?

That script should just work (it does for me). Although tracing the call
chain and printing a full backtrace on each function entry is somewhat
double.

The error you are seeing looks like your running kernel (uname -r) is
different from you kernel-devel sources (rpm -q kernel-devel - or the
equivalent dpkg -s line) stap is finding.

Cheers,

Mark



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: error in stap
  2009-04-24 10:50 ` Mark Wielaard
@ 2009-04-24 13:51   ` Peter Teoh
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Teoh @ 2009-04-24 13:51 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: SystemTAP

oh yes, my fault.   not sure why my automated script did not update
/boot/grub/menu.lst and so the kernel image is not in sync with the
kernel header files.

Thanks!!!

On Fri, Apr 24, 2009 at 6:49 AM, Mark Wielaard <mjw@redhat.com> wrote:
> Hi Peter,
>
> On Fri, 2009-04-24 at 06:28 -0400, Peter Teoh wrote:
>> My systemtap has git-pulled and updated as of now.   While doing some
>> script processing, I got the following errors:
>> staprun:insert_module:47 inserting module
>> staprun:insert_module:66 module options: _stp_bufsize=0
>> Error inserting module '/tmp/stap2jIKVp/stap_9237.ko': Invalid module format
>> [...]
>> And dmesg shows:
>>
>> [ 1429.082734] stap_9237: disagrees about version of symbol module_layout
>> [ 1429.087594] stap_9237: disagrees about version of symbol module_layout
>>
>> My script is just a simple netcore analysis:
>>
>> probe kernel.function("*@net/core/dev.c").call {
>>   printf("%s -> %s\n", thread_indent(1), probefunc());
>>   print_backtrace();
>>   printf("\n");
>> }
>>
>> Any ideas?
>
> That script should just work (it does for me). Although tracing the call
> chain and printing a full backtrace on each function entry is somewhat
> double.
>
> The error you are seeing looks like your running kernel (uname -r) is
> different from you kernel-devel sources (rpm -q kernel-devel - or the
> equivalent dpkg -s line) stap is finding.
>
> Cheers,
>
> Mark
>
>
>
>



-- 
Regards,
Peter Teoh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-24 13:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-24 10:28 error in stap Peter Teoh
2009-04-24 10:50 ` Mark Wielaard
2009-04-24 13:51   ` Peter Teoh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).