Bug 1460482

Summary: Exception: Failed to compile BPF module
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: bccAssignee: Jiri Olsa <jolsa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: bugzilla, ignatenko, jolsa, mdj, rdossant, redhat, skozina
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: bcc-0.4.0-1.fc27 bcc-0.4.0-1.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-15 17:43:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Murphy 2017-06-11 02:25:29 UTC
Description of problem:

bcc tools appear to require kernel-devel but the package doesn't require it


Version-Release number of selected component (if applicable):
bcc-0.3.0-2.fc26.x86_64

How reproducible:
Always


Steps to Reproduce:
1. dnf install bcc
2. sudo -i
3. cd /usr/share/bcc/tools/
4. ./btrfsslower

Actual results:

[root@f26h tools]# ./btrfsslower
chdir(/lib/modules/4.11.3-300.fc26.x86_64/build): No such file or directory
Traceback (most recent call last):
File "./btrfsslower", line 322, in
b = BPF(text=bpf_text)
File "/usr/lib/python3.6/site-packages/bcc/init.py", line 284, in init
raise Exception("Failed to compile BPF module %s" % src_file)
Exception: Failed to compile BPF module

[root@f26h tools]# ls -l /lib/modules/4.11.3-300.fc26.x86_64/build
lrwxrwxrwx. 1 root root 39 May 25 13:01 /lib/modules/4.11.3-300.fc26.x86_64/build -> /usr/src/kernels/4.11.3-300.fc26.x86_64

That path is empty.


Expected results:

Looks like kernel-devel is necessary to run at least some of these tools, so it probably should get dragged in as some kind of dependency when installing bcc.


Additional info:

Comment 1 Chris Murphy 2017-07-04 14:00:51 UTC
Upstream bug and comment.
https://github.com/iovisor/bcc/issues/1221#issuecomment-312791815

Comment 6 Rafael Fonseca 2017-07-10 14:51:28 UTC
Chris,

if you install kernel-devel, do the tools work as expected on Fedora 26?

Comment 7 Chris Murphy 2017-07-10 16:17:58 UTC
No I get a different problem, a crash, which is in the upstream bug.

Comment 8 Rafael Fonseca 2017-07-10 16:27:51 UTC
(In reply to Chris Murphy from comment #7)
> No I get a different problem, a crash, which is in the upstream bug.

Yeah, it's the same for me. It only happens on f26. On f25 it works as expected.

Comment 9 Rafael Fonseca 2017-08-25 12:25:19 UTC
*** Bug 1485324 has been marked as a duplicate of this bug. ***

Comment 10 Rafael Fonseca 2017-08-25 12:27:53 UTC
As per upstream investigation [1], the bug is in LLVM/Clang. It should be solved on LLVM/Clango >= 5.0.

[1] https://github.com/iovisor/bcc/issues/1221

Comment 11 Marcin Skarbek 2017-08-25 13:03:31 UTC
I don't think it's LLVM/Clang issue. I have rebuild bcc on current master using (slightly modified) SPEC file from Fedora package and it works on 26 with 4.12.5-300 and 4.12.8-300: https://copr.fedorainfracloud.org/coprs/mskarbek/bcc-nightly/

Comment 12 Fedora Update System 2017-11-03 14:04:32 UTC
bcc-0.4.0-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a049c6dc3c

Comment 13 Fedora Update System 2017-11-03 14:39:21 UTC
bcc-0.4.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-1d3000a95b

Comment 14 Fedora Update System 2017-11-04 19:05:20 UTC
bcc-0.4.0-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a049c6dc3c

Comment 15 Fedora Update System 2017-11-04 19:57:49 UTC
bcc-0.4.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-1d3000a95b

Comment 16 Fedora Update System 2017-11-15 17:43:05 UTC
bcc-0.4.0-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2017-11-15 20:15:34 UTC
bcc-0.4.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.