Failed to attach BPF program b'oncpu' to kprobe b'finish_task_switch' offcputime-bpfcc
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
I'm on Ubuntu 5.15.0-100-generic
built using the instructions for Ubuntu
I run:
```
/sbin/offcputime-bpfcc
```
```
3 warnings generated.
cannot attach kprobe, probe entry may not exist
Traceback (most recent call last):
File "/sbin/offcputime-bpfcc", line 234, in
b.attach_kprobe(event="finish_task_switch", fn_name="oncpu")
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 683, in attach_kprobe
raise Exception("Failed to attach BPF program %s to kprobe %s" %
Exception: Failed to attach BPF program b'oncpu' to kprobe b'finish_task_switch'
```
Would appreciate any help on this
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with /sbin/offcputime-bpfcc and reproduce the failure on the reported Ubuntu kernel, focusing on the b.attach_kprobe call at line 234. Trace why finish_task_switch cannot be attached and verify that the tool runs successfully without the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- observability-sre, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100