iovisor / iovisor/bcc

Kernel version 6.7 running cachestat error

Open
#4,919 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
5d 13h
Merged PRs (30d)
3

Description

system version : CentOS Linux release 7.9.2009 (Core)
Running cachestat reported the following error. Does anyone know how to solve it?

In file included from :2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/types.h:6:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/uapi/linux/types.h:14:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/uapi/linux/posix_types.h:5:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/stddef.h:5:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/uapi/linux/stddef.h:5:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/compiler_types.h:148:
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/compiler-clang.h:45:9: warning: 'HAVE_BUILTIN_BSWAP32' macro redefined [-Wmacro-redefined]
#define HAVE_BUILTIN_BSWAP32
^
:4:9: note: previous definition is here
#define HAVE_BUILTIN_BSWAP32 1
^
In file included from :2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/types.h:6:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/uapi/linux/types.h:14:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/uapi/linux/posix_types.h:5:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/stddef.h:5:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/uapi/linux/stddef.h:5:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/compiler_types.h:148:
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/compiler-clang.h:46:9: warning: 'HAVE_BUILTIN_BSWAP64' macro redefined [-Wmacro-redefined]
#define HAVE_BUILTIN_BSWAP64
^
:5:9: note: previous definition is here
#define HAVE_BUILTIN_BSWAP64 1
^
In file included from :2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/types.h:6:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/uapi/linux/types.h:14:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/uapi/linux/posix_types.h:5:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/stddef.h:5:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/uapi/linux/stddef.h:5:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/compiler_types.h:148:
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/compiler-clang.h:47:9: warning: 'HAVE_BUILTIN_BSWAP16' macro redefined [-Wmacro-redefined]
#define HAVE_BUILTIN_BSWAP16
^
:3:9: note: previous definition is here
#define HAVE_BUILTIN_BSWAP16 1
^
In file included from :3:
In file included from /virtual/include/bcc/helpers.h:38:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/log2.h:12:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/bitops.h:68:
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/bitops.h:137:9: error: 'asm goto' constructs are not supported yet
return GEN_BINARY_RMWcc(LOCK_PREFIX _ASM_SIZE(bts), *addr, c, "Ir", nr);
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:55:32: note: expanded from macro 'GEN_BINARY_RMWcc'
#define GEN_BINARY_RMWcc(X...) CONCATENATE(GEN_BINARY_RMWcc
, COUNT_ARGS(X))(X)
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/args.h:26:27: note: expanded from macro 'CONCATENATE'
#define CONCATENATE(a, b) __CONCAT(a, b)
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/args.h:25:24: note: expanded from macro '__CONCAT'
#define __CONCAT(a, b) a ## b
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:53:2: note: expanded from macro 'GEN_BINARY_RMWcc_5'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:49:2: note: expanded from macro 'GEN_BINARY_RMWcc_6'
__GEN_RMWcc(op " %[val], " arg0, var, cc,
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:16:6: note: expanded from macro '__GEN_RMWcc'
asm goto (fullop "; j" #cc " %l[cc_label]"
^
In file included from :3:
In file included from /virtual/include/bcc/helpers.h:38:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/log2.h:12:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/bitops.h:68:
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/bitops.h:161:9: error: 'asm goto' constructs are not supported yet
return GEN_BINARY_RMWcc(LOCK_PREFIX _ASM_SIZE(btr), *addr, c, "Ir", nr);
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:55:32: note: expanded from macro 'GEN_BINARY_RMWcc'
#define GEN_BINARY_RMWcc(X...) CONCATENATE(GEN_BINARY_RMWcc
, COUNT_ARGS(X))(X)
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/args.h:26:27: note: expanded from macro 'CONCATENATE'
#define CONCATENATE(a, b) __CONCAT(a, b)
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/args.h:25:24: note: expanded from macro '__CONCAT'
#define __CONCAT(a, b) a ## b
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:53:2: note: expanded from macro 'GEN_BINARY_RMWcc_5'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:49:2: note: expanded from macro 'GEN_BINARY_RMWcc_6'
__GEN_RMWcc(op " %[val], " arg0, var, cc,
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:16:6: note: expanded from macro '__GEN_RMWcc'
asm goto (fullop "; j" #cc " %l[cc_label]"
^
In file included from :3:
In file included from /virtual/include/bcc/helpers.h:38:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/log2.h:12:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/bitops.h:68:
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/bitops.h:200:9: error: 'asm goto' constructs are not supported yet
return GEN_BINARY_RMWcc(LOCK_PREFIX _ASM_SIZE(btc), *addr, c, "Ir", nr);
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:55:32: note: expanded from macro 'GEN_BINARY_RMWcc'
#define GEN_BINARY_RMWcc(X...) CONCATENATE(GEN_BINARY_RMWcc
, COUNT_ARGS(X))(X)
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/args.h:26:27: note: expanded from macro 'CONCATENATE'
#define CONCATENATE(a, b) __CONCAT(a, b)
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/args.h:25:24: note: expanded from macro '__CONCAT'
#define __CONCAT(a, b) a ## b
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:53:2: note: expanded from macro 'GEN_BINARY_RMWcc_5'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:49:2: note: expanded from macro 'GEN_BINARY_RMWcc_6'
__GEN_RMWcc(op " %[val], " arg0, var, cc,
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/rmwcc.h:16:6: note: expanded from macro '__GEN_RMWcc'
asm goto (fullop "; j" #cc " %l[cc_label]"
^
In file included from /virtual/main.c:2:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/uapi/linux/ptrace.h:183:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/ptrace.h:97:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/paravirt_types.h:20:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/nospec-branch.h:6:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/static_key.h:1:
In file included from /lib/modules/6.7.6-1.el7.elrepo.x86_64/build/include/linux/jump_label.h:112:
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/jump_label.h:27:6: error: 'asm goto' constructs are not supported yet
asm goto("1:"
^
/lib/modules/6.7.6-1.el7.elrepo.x86_64/build/arch/x86/include/asm/jump_label.h:55:6: error: 'asm goto' constructs are not supported yet
asm goto("1:"
^
3 warnings and 5 errors generated.
Traceback (most recent call last):
File "/usr/share/bcc/tools/cachestat", line 96, in
b = BPF(text=bpf_text)
File "/usr/lib/python2.7/site-packages/bcc/init.py", line 325, in init
raise Exception("Failed to compile BPF text")
Exception: Failed to compile BPF text

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with /usr/share/bcc/tools/cachestat on the stated CentOS and kernel versions, then inspect the BPF compilation path in /usr/lib/python2.7/site-packages/bcc/init.py. Use the reported kernel headers and compiler diagnostics to identify the compatibility issue; done means cachestat compiles and runs successfully in this environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux, python
Domain
observability, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.