bpftrace fails with BPF_FUNC_get_current_group_id is not available for your kernel version

Solution In Progress - Updated -

Issue

  • bpftrace for traceing cgroup fails with the following errors.

    $ bpftrace -e 'tracepoint:syscalls:sys_enter_openat /cgroup == cgroupid("/sys/fs/cgroup/unified/mycg")/ { printf("%s\n", str(args->filename)); }'
    BPF_FUNC_get_current_group_id is not available for your kernel version
    

Environment

  • Red Hat Enterprise Linux 8
  • bpftrace-0.9-3.el8 or older

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content