perf_event_open(/sys/kernel/debug/tracing/events/uprobes/p__proc_32829_root_opt_java_openjdk_lib_server_libjvm_so_0xd45575_bcc_35680/id): Invalid argument error
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
Hi I am getting below error while running bcc tool inside container for a process running inside container. perf_event_open(/sys/kernel/debug/tracing/events/uprobes/p__proc_32829_root_opt_java_openjdk_lib_server_libjvm_so_0xd45575_bcc_35680/id): Invalid argument
Traceback (most recent call last):
File "/usr/share/bcc/tools/lib/ustat", line 305, in
Tool().run()
File "/usr/share/bcc/tools/lib/ustat", line 297, in run
self._loop_iter()
File "/usr/share/bcc/tools/lib/ustat", line 246, in _loop_iter
self._attach_probes()
File "/usr/share/bcc/tools/lib/ustat", line 237, in _attach_probes
self.bpf.attach_uprobe(name=path, fn_name=func, addr=addr, pid=-1)
File "/usr/lib/python3.9/site-packages/bcc/__init__.py", line 1158, in attach_uprobe
raise Exception("Failed to attach BPF to uprobe")
Exception: Failed to attach BPF to probe. it refers correct libjvm.so path inside container (/proc/32829/root/opt/java/../server/libjvm.so) . any suggestion how to fix this issue ?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with /usr/share/bcc/tools/lib/ustat at _attach_probes and bcc/__init__.py at attach_uprobe, using the provided traceback as the entry point. Reproduce the failure for the containerized Java process and determine why perf_event_open rejects the reported libjvm.so uprobe path. Done means documenting a confirmed cause and a validated fix or limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, linux, python
- Domain
- observability, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100