iovisor / iovisor/bcc

perf_event_open gives invalid argument error

Open
#2,276 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

I am trying to run bcc tools on centos 7.6 machine which are working fine, but when I run the same on a docker container I am getting an error saying perf_event_open gives invalid argument error.
```
perf_event_open(/sys/kernel/debug/tracing/events/uprobes/p__usr_share_bcc_tools_test_0x51d_bcc_15370/id): Invalid argument
Failed to attach BPF to uprobe
```
What I am actually doing is, I am running the trace tool from bcc to attach a uprobe to user space function to trace.
```
./trace '/usr/share/bcc/tools/test:printSum'
```
while test is running in background and printSum is the function I am probing.

An update to this question is:
I have read on docker documentation website that perf_event_open syscall is blocked on docker by default profile:
```
perf_event_open | Tracing/profiling syscall, which could leak a lot of information on the host.
```
Any idea how to resolve issue ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.