14 tests fail on ubuntu 20.04
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 3
Description
I've compiled from source as described in INSTALL.md, and installed `netperf` for tests. The build itself succeeds (with some mostly-harmless warnings from LLVM), but `make test` gives the following summary:
```diffeoinvariant@DiffeoInvariant ~/d/b/build (master)> make test
Running tests...
Test project /home/diffeoinvariant/datacenter-profiling/bcc/build
Start 1: style-check
1/40 Test #1: style-check ...................... Passed 0.01 sec
Start 2: c_test_static
2/40 Test #2: c_test_static .................... Passed 0.28 sec
Start 3: test_libbcc
3/40 Test #3: test_libbcc ......................***Failed 18.37 sec
Start 4: py_test_stat1_b
4/40 Test #4: py_test_stat1_b ..................***Failed 0.19 sec
Start 5: py_test_bpf_log
5/40 Test #5: py_test_bpf_log ..................***Failed 0.09 sec
Start 6: py_test_stat1_c
6/40 Test #6: py_test_stat1_c ..................***Failed 0.18 sec
Start 7: py_test_xlate1_c
7/40 Test #7: py_test_xlate1_c .................***Failed 0.17 sec
Start 8: py_test_call1
8/40 Test #8: py_test_call1 ....................***Failed 0.20 sec
Start 9: py_test_trace1
9/40 Test #9: py_test_trace1 ................... Passed 0.65 sec
Start 10: py_test_trace2
10/40 Test #10: py_test_trace2 ................... Passed 2.18 sec
Start 11: py_test_trace3_c
11/40 Test #11: py_test_trace3_c .................***Failed 0.07 sec
Start 12: py_test_trace4
12/40 Test #12: py_test_trace4 ................... Passed 1.93 sec
Start 13: py_test_trace_maxactive
13/40 Test #13: py_test_trace_maxactive .......... Passed 1.22 sec
Start 14: py_test_probe_count
14/40 Test #14: py_test_probe_count .............. Passed 6.69 sec
Start 15: py_test_debuginfo
15/40 Test #15: py_test_debuginfo ................***Failed 0.07 sec
Start 16: py_test_brb
16/40 Test #16: py_test_brb ......................***Failed 0.02 sec
Start 17: py_test_brb2
17/40 Test #17: py_test_brb2 .....................***Failed 0.04 sec
Start 18: py_test_clang
18/40 Test #18: py_test_clang .................... Passed 80.33 sec
Start 19: py_test_histogram
19/40 Test #19: py_test_histogram ................ Passed 3.75 sec
Start 20: py_array
20/40 Test #20: py_array .........................***Failed 2.30 sec
Start 21: py_uprobes
21/40 Test #21: py_uprobes ....................... Passed 6.74 sec
Start 22: py_uprobes_2
22/40 Test #22: py_uprobes_2 ..................... Passed 0.38 sec
Start 23: py_test_stackid
23/40 Test #23: py_test_stackid ..................***Failed 0.05 sec
Start 24: py_test_tracepoint
24/40 Test #24: py_test_tracepoint ............... Passed 2.60 sec
Start 25: py_test_perf_event
25/40 Test #25: py_test_perf_event ............... Passed 0.57 sec
Start 26: py_test_utils
26/40 Test #26: py_test_utils .................... Passed 0.05 sec
Start 27: py_test_percpu
27/40 Test #27: py_test_percpu ................... Passed 2.29 sec
Start 28: py_test_dump_func
28/40 Test #28: py_test_dump_func ................ Passed 0.18 sec
Start 29: py_test_disassembler
29/40 Test #29: py_test_disassembler ............. Passed 0.29 sec
Start 30: py_test_tools_smoke
30/40 Test #30: py_test_tools_smoke ..............***Failed 0.03 sec
Start 31: py_test_tools_memleak
31/40 Test #31: py_test_tools_memleak ............ Passed 25.32 sec
Start 32: py_test_usdt
32/40 Test #32: py_test_usdt ..................... Passed 4.41 sec
Start 33: py_test_usdt2
33/40 Test #33: py_test_usdt2 .................... Passed 3.29 sec
Start 34: py_test_usdt3
34/40 Test #34: py_test_usdt3 .................... Passed 1.32 sec
Start 35: py_test_license
35/40 Test #35: py_test_license .................. Passed 3.16 sec
Start 36: py_test_free_bcc_memory
36/40 Test #36: py_test_free_bcc_memory .......... Passed 0.34 sec
Start 37: py_test_rlimit
37/40 Test #37: py_test_rlimit ................... Passed 0.51 sec
Start 38: py_test_lpm_trie
38/40 Test #38: py_test_lpm_trie .................***Failed 0.05 sec
Start 39: py_ringbuf
39/40 Test #39: py_ringbuf ....................... Passed 0.05 sec
Start 40: py_queuestack
40/40 Test #40: py_queuestack .................... Passed 0.51 sec
65% tests passed, 14 tests failed out of 40
Total Test time (real) = 170.89 sec
The following tests FAILED:
3 - test_libbcc (Failed)
4 - py_test_stat1_b (Failed)
5 - py_test_bpf_log (Failed)
6 - py_test_stat1_c (Failed)
7 - py_test_xlate1_c (Failed)
8 - py_test_call1 (Failed)
11 - py_test_trace3_c (Failed)
15 - py_test_debuginfo (Failed)
16 - py_test_brb (Failed)
17 - py_test_brb2 (Failed)
20 - py_array (Failed)
23 - py_test_stackid (Failed)
30 - py_test_tools_smoke (Failed)
38 - py_test_lpm_trie (Failed)
```
For what it's worth, the affect of whatever is causing these tests to fail is for none of the tools to work, and presumably `bcc` itself; for example,
```
diffeoinvariant@DiffeoInvariant ~/d/b/build (master)> /usr/share/bcc/tools/profile -f
could not open bpf map: stack_traces, error: Operation not permitted
Traceback (most recent call last):
File "/usr/share/bcc/tools/profile", line 277, in
b = BPF(text=bpf_text)
File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 364, in __init__
raise Exception("Failed to compile BPF module %s" % (src_file or ""))
Exception: Failed to compile BPF module
```
I've seen this exception arise in other issues that may have been related to not having the latest linux headers or a new enough kernel, so I made sure everything was up-to-date and that I had all the relevant headers installed before compiling.
Anyone have any ideas about what could be going wrong?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with INSTALL.md and reproduce the reported failures using make test on Ubuntu 20.04. Inspect the output for the listed failed tests, then compare it with the profile tool failure involving the stack_traces BPF map. Done means the failing tests are explained or fixed and the BCC tools run successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, python, ubuntu
- Domain
- observability, operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100