iovisor / iovisor/bcc

tcplife not working on Ubuntu 19.10

Open
#2,676 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
5d 13h
Merged PRs (30d)
3

Description

Running `tcplife-bpfcc` on Ubuntu 19.10 results in the following error:
```
# tcplife-bpfcc
In file included from /virtual/main.c:4:
In file included from include/linux/tcp.h:19:
In file included from include/net/sock.h:46:
In file included from include/linux/netdevice.h:42:
In file included from include/net/netprio_cgroup.h:11:
In file included from include/linux/cgroup.h:28:
In file included from include/linux/cgroup-defs.h:22:
In file included from include/linux/bpf-cgroup.h:5:
include/linux/bpf.h:115:3: error: variable has incomplete type 'struct bpf_spin_lock'
(struct bpf_spin_lock){};
^~~~~~~~~~~~~~~~~~~~~~~~
[...]
49 warnings and 12 errors generated.
Traceback (most recent call last):
File "/usr/sbin/tcplife-bpfcc", line 486, in
b = BPF(text=bpf_text)
File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 320, in __init__
raise Exception("Failed to compile BPF text")
Exception: Failed to compile BPF text
```

This can be reproduced on a freshly installed Ubuntu 19.10 by installing the `bpfcc-tools` package version `0.8.0-4`. Running other TCP related tools results in similar error messages.

```
$ uname -a
Linux pc-540 5.3.0-24-generic #26-Ubuntu SMP Thu Nov 14 01:33:18 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with tcplife-bpfcc from bpfcc-tools 0.8.0-4 on Ubuntu 19.10 and the reported 5.3.0-24-generic kernel. Trace the compilation failure through the shown Linux networking headers and bcc/__init__.py, then verify that tcplife and the other affected TCP tools compile and run successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.