joelagnel / bpfd

BPFd (Deprecated, please see README.md) : Berkeley Packet Filter daemon (BPFd). Makes it possible to run BCC tools across systems.
Apache License 2.0
95 stars 23 forks source link

tools/profile crashes due to failure to attach BPF to perf event #31

Closed jcanseco closed 6 years ago

jcanseco commented 6 years ago

Running the profile.py tool leads to the following runtime exception when run with either HiKey or Shell set as remote:

Sampling at 49 Hertz of all threads by user + kernel stack... Hit Ctrl-C to end.
ioctl(PERF_EVENT_IOC_SET_BPF) failed: Bad file descriptor
Traceback (most recent call last):
  File "./tools/profile.py", line 219, in <module>
    sample_period=0, sample_freq=args.frequency)
  File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 860, in attach_perf_event
    sample_period, sample_freq, pid, i, group_fd)
  File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 847, in _attach_perf_event
    raise Exception("Failed to attach BPF to perf event")
Exception: Failed to attach BPF to perf event