registration error (rc -22)

Ananth N Mavinakayanahalli ananth@in.ibm.com
Thu Sep 18 16:17:00 GMT 2008


On Thu, Sep 18, 2008 at 10:57:08AM -0500, Paul Larson wrote:
> I've run into a problem using systemtap with recent kernels.  In this case, 
> I had a simple probe looking at a kernel module.  It worked fine in RHEL5.2 
> stock kernel.  I updated to 2.6.27-rc6, and also updated to the latest git 
> pull of systemtap.  Here's a simple test probe I'm running:
> probe module("cxgb3").function("*") {
>  print("got here\n")
> }
>
> The module used doesn't seem to matter, I've tried several with the same 
> result.  Here's the error I get:
>
> ERROR: probe 
> module("cxgb3").function("get_regs@drivers/net/cxgb3/cxgb3_main.c:1366") 
> registration error (rc -22)

That is -EINVAL which in all probablity is from register_kprobe(). There
are a few cases where this can happen (probe insertion address not in
the kernel text area, etc).

However, on certain architectures (eg., powerpc) we refuse to insert kprobes
on certain instructions due to scary single-stepping issues.

Does dmesg give you more hints about the problem? Can you disassemble to
find out what insruction is it that threw up the error?

Ananth



More information about the Systemtap mailing list