Skip to content

usdt: unrecognized arg #0 #559

@fleitz

Description

@fleitz

Trying to get a USDT program to attach, but when it's attached it fails with the error.

libbpf: usdt: unrecognized arg #0 spec '8@(%rsp) 8@8(%rsp) 8@16(%rsp) -4@24(%rsp)'
libbpf: prog 'ruby_method_usdt_helper': failed to auto-attach: -22

I've tried removing all the arguments, as well as not using the helper and only using pt_regs, but it all fails with the same error.

Trying to attach to this USDT: https://github.com/ruby/ruby/blob/d92f09a5eea009fa28cd046e9d0eb698e3d94c5c/probes.d#L15

SEC("usdt//lib/x86_64-linux-gnu/libruby-3.0.so.3.0:ruby:method__entry")
int BPF_USDT(ruby_method_usdt_helper, int clazz, int method, int filename, int fileno){
    return 0;
}

SEC("usdt//lib/x86_64-linux-gnu/libruby-3.0.so.3.0:ruby:method__entry")
int ruby_method_pt_regs(struct pt_regs *ctx) {
    return 0;
}

Running on Ubuntu 22.04, libbpf v1.0.0, and Kernel 5.18.10-76051810-generic

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions