perf_event_open: Invalid argument
- Dominant language
- C++
- Stars
- 15
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I'm trying to run Mitos on an Intel machine, I manage to install both Dyninst
and Mitos but when I run a command with Mitos I got the following output:
```
mitosrun ./examples/matmul
perf_event_open: Invalid argument
Not ready to begin sampling!
6.47073e+07
Segmentation fault
```
Obviously matmul does not segfault without mitos.
I've run mitos under strace to identify the faulty arguments:
```
strace mitosrun ./examples/matmul 2>&1 | grep perf_event
read(6, "8:perf_event:/\n7:blkio:/\n6:net_c"..., 1024) = 138
perf_event_open(0x7f51d322d148, 3613, -1, -1, 0) = -1 EINVAL (Invalid argument)
write(2, "perf_event_open: Invalid argumen"..., 34perf_event_open: Invalid argument
```
But according to the documentation this seems to be right ...
I've also tryed to put the pid argument at `-1` and to add the
`PERF_FLAG_FD_NO_GROUP` without any results ...
Any idea on what can be wrong ?
I'm running `debian jessie` with a linux kernel `3.16.0-4-amd64` on an Intel
xeon E5520 8 cores processor.
Thanks,
David
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing `mitosrun ./examples/matmul` on the reported Debian Jessie, Linux 3.16.0-4-amd64, and Intel Xeon E5520 environment. Inspect the `perf_event_open` invocation with `strace`; done means the command no longer returns EINVAL or causes the instrumented matmul process to segfault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- operating-systems, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100