Bug 1788228 - bcc-tools fail to compile on 5.4.7-200 kernel
Summary: bcc-tools fail to compile on 5.4.7-200 kernel
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bcc
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jiri Olsa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1792729 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-06 18:45 UTC by Jeff Layton
Modified: 2020-02-27 16:44 UTC (History)
7 users (show)

Fixed In Version: 0.12.0 bcc-0.12.0-1.fc31 bcc-0.12.0-1.fc30
Clone Of:
Environment:
Last Closed: 2020-01-17 05:06:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jeff Layton 2020-01-06 18:45:26 UTC
The bcc-tools scripts in the bcc-tools package are not working under the 5.4.7-200 kernel. The same scripts work fine under 5.3.16-300. To reproduce:

$ sudo /usr/share/bcc/tools/vfsstat
In file included from /virtual/main.c:2:
In file included from /lib/modules/5.4.7-200.fc31.x86_64/build/include/uapi/linux/ptrace.h:142:
In file included from /lib/modules/5.4.7-200.fc31.x86_64/build/arch/x86/include/asm/ptrace.h:5:
/lib/modules/5.4.7-200.fc31.x86_64/build/arch/x86/include/asm/segment.h:266:2: error: expected '(' after 'asm'
        alternative_io ("lsl %[seg],%[p]",
        ^
/lib/modules/5.4.7-200.fc31.x86_64/build/arch/x86/include/asm/alternative.h:240:2: note: expanded from macro 'alternative_io'
        asm_inline volatile (ALTERNATIVE(oldinstr, newinstr, feature)   \
        ^
/lib/modules/5.4.7-200.fc31.x86_64/build/include/linux/compiler_types.h:210:24: note: expanded from macro 'asm_inline'
#define asm_inline asm __inline
                       ^
1 error generated.
Traceback (most recent call last):
  File "/usr/share/bcc/tools/vfsstat", line 64, in <module>
    """)
  File "/usr/lib/python3.7/site-packages/bcc/__init__.py", line 325, in __init__
    raise Exception("Failed to compile BPF text")
Exception: Failed to compile BPF text

Relevant package versions:

bcc-tools-0.10.0-2.fc31.x86_64
bcc-doc-0.10.0-2.fc31.noarch
bcc-0.10.0-2.fc31.x86_64
bcc-lua-0.10.0-2.fc31.x86_64
kernel-5.4.7-200.fc31.x86_64
kernel-5.3.16-300.fc31.x86_64

Let me know if you need other info.

Comment 1 Jiri Olsa 2020-01-07 14:26:31 UTC
looks like this would be fixed by:
  2d1497cde1cc Redefine asm_inline for Linux 5.4+, Fixes #2546 (#2547)

jirka

Comment 2 Rafael Fonseca 2020-01-07 16:28:03 UTC
Support to kernel>=5.4 was added in bcc-0.12.0. So I went ahead and rebased the current package version to 0.12.0.

https://bodhi.fedoraproject.org/updates/FEDORA-2020-1e5d1064c1

Comment 3 Fedora Update System 2020-01-08 14:16:25 UTC
bcc-0.12.0-1.fc31 has been pushed to the Fedora 31 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-2020-1e5d1064c1

Comment 4 Fedora Update System 2020-01-17 05:06:11 UTC
bcc-0.12.0-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Rafael Fonseca 2020-01-19 15:33:08 UTC
*** Bug 1792729 has been marked as a duplicate of this bug. ***

Comment 6 Jay Kamat 2020-02-20 22:04:10 UTC
This issue still persists on fedora 30, as it seems to not be updated in the repos

Last metadata expiration check: 0:58:53 ago on Thu 20 Feb 2020 01:00:59 PM PST.
Installed Packages
Name         : bcc
Version      : 0.10.0
Release      : 1.fc30
Architecture : x86_64
Size         : 59 M
Source       : bcc-0.10.0-1.fc30.src.rpm
Repository   : @System
From repo    : updates
Summary      : BPF Compiler Collection (BCC)
URL          : https://github.com/iovisor/bcc
License      : ASL 2.0
Description  : BCC is a toolkit for creating efficient kernel tracing and manipulation
             : programs, and includes several useful tools and examples. It makes use of
             : extended BPF (Berkeley Packet Filters), formally known as eBPF, a new feature
             : that was first added to Linux 3.15. BCC makes BPF programs easier to write,
             : with kernel instrumentation in C (and includes a C wrapper around LLVM), and
             : front-ends in Python and lua. It is suited for many tasks, including
             : performance analysis and network traffic control.

Linux vall 5.4.19-100.fc30.x86_64 #1 SMP Tue Feb 11 22:27:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Comment 7 Fedora Update System 2020-02-21 17:39:39 UTC
FEDORA-2020-5167a1b25c has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5167a1b25c

Comment 8 Rafael Fonseca 2020-02-21 17:40:47 UTC
Thank you for the heads up. I've built a newer version compatible with kernel 5.4 in F30.

Comment 9 Fedora Update System 2020-02-22 02:25:25 UTC
bcc-0.12.0-1.fc30 has been pushed to the Fedora 30 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-2020-5167a1b25c

Comment 10 Fedora Update System 2020-02-27 16:44:46 UTC
bcc-0.12.0-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.