Bug 4850 - buildok/syscall.stp fails on ia64 2.6.23-rc1 kernel, missing sys_quotactl function
Summary: buildok/syscall.stp fails on ia64 2.6.23-rc1 kernel, missing sys_quotactl fun...
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: tapsets (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Martin Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-26 22:01 UTC by William Cohen
Modified: 2007-08-16 16:15 UTC (History)
0 users

See Also:
Host: ia64
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Cohen 2007-07-26 22:01:43 UTC
Can't probe sys_quotactl function on ia64 with 2.6.23-rc1 kernel

$ ../../install/bin/stap ../../src/testsuite/buildok/syscall.stp 
semantic error: no match for probe point while resolving probe point
kernel.function("sys_quotactl")
semantic error: no match for probe point while resolving probe point
kernel.function("sys_quotactl").return
Pass 2: analysis failed.  Try again with more '-v' (verbose) options.
Comment 1 William Cohen 2007-07-27 14:43:51 UTC
The sys_quotactl function is defined in the 2.6.23-rc1 kernel on the ia64

$ nm vmlinux |grep quotactl
a000000100237360 t dummy_quotactl
a000000100241100 t selinux_quotactl
a0000001000aca00 W sys32_quotactl
a0000001000aca00 W sys_quotactl

Comparing to 2.6.9-55.0.2.EL vmlinux

$ nm /usr/lib/debug/lib/modules/2.6.9-55.0.2.EL/vmlinux |grep quotactl
a000000100204c20 t dummy_quotactl
a00000010020eee0 t selinux_quotactl
a0000001001a1c40 T sys_quotactl
a0000001007653a0 D vfs_quotactl_ops

Does systemtap understand weak symbols? That seems to be the difference between
the two kernels.



Comment 2 William Cohen 2007-07-27 15:43:31 UTC
The sys_quotactl is not implemented in the particular build of the 2.6.23-rc1
for ia64 because it failed build with CONFIG_QUOTA=y. With CONFIG_QUOTA unset
the sys_quotactl is unimplemented. There are a number of conditionally implement
systemcalls in kernel/sys_ni.c. systemtap tapsets will need to handle those call
gracefully.
Comment 3 William Cohen 2007-08-06 20:29:58 UTC
One the latest stap snapshot 20070804 a couple of the syscall entries appear to
be failing for buildok/syscall.stp. Get the same results on ia64 and i686
machines running the 2.6.22-rc2 kernel (but x86_64 machine doesn't have a problem):

$ ../../install/bin/stap -p4 ../../src/testsuite/buildok/syscall.stp 
semantic error: no match for probe point while resolving probe point
kernel.function("compat_do_execve")
semantic error: no match for probe point while resolving probe point
kernel.function("compat_sys_semtimedop")
semantic error: no match for probe point while resolving probe point
kernel.function("compat_do_execve").return
semantic error: no match for probe point while resolving probe point
kernel.function("compat_sys_semtimedop").return
Pass 2: analysis failed.  Try again with more '-v' (verbose) options.

Comment 4 Wenji Huang 2007-08-07 01:46:25 UTC
compat_do_execve and compat_sys_semtimedop are functions for providing 32 bit
compatibility code in 64 bit systems.

So syscall.stp will fail in i686 machine, but passes in x86_64 machine.

One workaround is to add condition statement,

%(arch == "x86_64" %?
probe xxxxxxxxxx
%)

But other architectures such as ia64, sparc64, ppc64 are skipped.
Comment 5 Martin Hunt 2007-08-16 16:15:15 UTC
Fix was checked into cvs a week ago.