iovisor / iovisor/bcc

Some tools in bcc-tools are not running

Open
#3,152 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Hi Everyone,

I am running bcc-tools using:

sudo -i podman run -it --rm --privileged -v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro -v /etc/localtime:/etc/localtime:ro --workdir /usr/share/bcc/tools zlim/bcc

Tools like execsnoop, bashreadLine are running while tools like tcplife or tcptracer are throwing error which I have given below.

`root@3af572433c30:/usr/share/bcc/tools# ./tcptracer
In file included from /virtual/main.c:5:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/net/sock.h:51:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/netdevice.h:46:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/net/netprio_cgroup.h:17:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/cgroup.h:28:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/cgroup-defs.h:22:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/bpf-cgroup.h:7:
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/bpf.h:474:39: error: use of undeclared identifier 'BPF_F_RDONLY_PROG'
u32 access_flags = map->map_flags & (BPF_F_RDONLY_PROG | BPF_F_WRONLY_PROG);
^
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/bpf.h:474:59: error: use of undeclared identifier 'BPF_F_WRONLY_PROG'
u32 access_flags = map->map_flags & (BPF_F_RDONLY_PROG | BPF_F_WRONLY_PROG);
^
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/bpf.h:479:21: error: use of undeclared identifier 'BPF_F_RDONLY_PROG'
if (access_flags & BPF_F_RDONLY_PROG)
^
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/bpf.h:481:26: error: use of undeclared identifier 'BPF_F_WRONLY_PROG'
else if (access_flags & BPF_F_WRONLY_PROG)
^
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/bpf.h:489:26: error: use of undeclared identifier 'BPF_F_RDONLY_PROG'
return (access_flags & (BPF_F_RDONLY_PROG | BPF_F_WRONLY_PROG)) !=
^
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/bpf.h:489:46: error: use of undeclared identifier 'BPF_F_WRONLY_PROG'
return (access_flags & (BPF_F_RDONLY_PROG | BPF_F_WRONLY_PROG)) !=
^
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/bpf.h:490:10: error: use of undeclared identifier 'BPF_F_RDONLY_PROG'
(BPF_F_RDONLY_PROG | BPF_F_WRONLY_PROG);
^
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/bpf.h:490:30: error: use of undeclared identifier 'BPF_F_WRONLY_PROG'
(BPF_F_RDONLY_PROG | BPF_F_WRONLY_PROG);
^
In file included from /virtual/main.c:5:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/net/sock.h:51:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/netdevice.h:50:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/uapi/linux/neighbour.h:6:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/netlink.h:9:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/net/scm.h:13:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/sched/signal.h:6:
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/signal.h:87:11: warning: array index 3 is past the end of the array
(which contains 1 element) [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
^ ~
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from /virtual/main.c:5:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/net/sock.h:51:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/netdevice.h:50:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/uapi/linux/neighbour.h:6:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/netlink.h:9:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/net/scm.h:13:
In file included from /lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/sched/signal.h:6:
/lib/modules/4.18.0-193.13.2.el8_2.x86_64/build/include/linux/signal.h:87:25: warning: array index 2 is past the end of the array
(which contains 1 element) [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
.
.
.
.
.
.
.
.

Traceback (most recent call last):
File "./tcptracer", line 590, in
b = BPF(text=bpf_text)
File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 325, in __init__
raise Exception("Failed to compile BPF text")
Exception: Failed to compile BPF text
`
I need help as to enable running tools like tcptop, tcplife,tcptracer etc.

Thank you

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.