The asan CI uses Ubuntu 23.04, which doesn’t have clang-17 and will also be EOL in January:
Thus, it would be good to bump to 23.10. However that fails, even outside the CI.
Steps to reproduce on a fresh install of Ubuntu 23.04/10:
0export DEBIAN_FRONTEND=noninteractive && apt update && apt install curl wget htop git vim ccache -y && git clone https://github.com/bitcoin/bitcoin.git --depth=1 ./bitcoin-core && cd bitcoin-core && apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev systemtap-sdt-dev clang-16 llvm-16 libclang-rt-16-dev bpfcc-tools "linux-headers-$(uname --kernel-release)" -y && ./autogen.sh && ./configure --enable-usdt CC=clang-16 CXX=clang++-16 && make -j $(nproc) && ./test/functional/interface_usdt_mempool.py
Output on 23.04: passes
On 23.10:
0# ./test/functional/interface_usdt_mempool.py
12023-10-05T15:22:55.501000Z TestFramework (INFO): PRNG seed is: 3896309821586557942
22023-10-05T15:22:55.502000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_930vj2wl
32023-10-05T15:22:55.852000Z TestFramework (INFO): Hooking into mempool:added tracepoint...
4/virtual/main.c:97:24: error: call to undeclared function '_bpf_readarg_trace_removed_1'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
5 ({ u64 __addr = 0x0; _bpf_readarg_trace_removed_1(ctx, &__addr, sizeof(__addr));bpf_probe_read_user(&removed.hash, HASH_LENGTH, (void *)__addr);});
6 ^
7/virtual/main.c:97:24: note: did you mean '_bpf_readarg_trace_added_1'?
8/virtual/main.c:13:28: note: '_bpf_readarg_trace_added_1' declared here
9static __always_inline int _bpf_readarg_trace_added_1(struct pt_regs *ctx, void *dest, size_t len) {
10 ^
11/virtual/main.c:98:24: error: call to undeclared function '_bpf_readarg_trace_removed_2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
12 ({ u64 __addr = 0x0; _bpf_readarg_trace_removed_2(ctx, &__addr, sizeof(__addr));bpf_probe_read_user(&removed.reason, MAX_REMOVAL_REASON_LENGTH, (void *)__addr);});
13 ^
14/virtual/main.c:98:24: note: did you mean '_bpf_readarg_trace_added_2'?
15/virtual/main.c:19:28: note: '_bpf_readarg_trace_added_2' declared here
16static __always_inline int _bpf_readarg_trace_added_2(struct pt_regs *ctx, void *dest, size_t len) {
17 ^
18/virtual/main.c:99:3: error: call to undeclared function '_bpf_readarg_trace_removed_3'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
19 _bpf_readarg_trace_removed_3(ctx, &removed.vsize, sizeof(*(&removed.vsize)));
20 ^
21/virtual/main.c:99:3: note: did you mean '_bpf_readarg_trace_added_3'?
22/virtual/main.c:25:28: note: '_bpf_readarg_trace_added_3' declared here
23static __always_inline int _bpf_readarg_trace_added_3(struct pt_regs *ctx, void *dest, size_t len) {
24 ^
25/virtual/main.c:100:3: error: call to undeclared function '_bpf_readarg_trace_removed_4'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
26 _bpf_readarg_trace_removed_4(ctx, &removed.fee, sizeof(*(&removed.fee)));
27 ^
28/virtual/main.c:101:3: error: call to undeclared function '_bpf_readarg_trace_removed_5'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
29 _bpf_readarg_trace_removed_5(ctx, &removed.entry_time, sizeof(*(&removed.entry_time)));
30 ^
31/virtual/main.c:112:24: error: call to undeclared function '_bpf_readarg_trace_rejected_1'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
32 ({ u64 __addr = 0x0; _bpf_readarg_trace_rejected_1(ctx, &__addr, sizeof(__addr));bpf_probe_read_user(&rejected.hash, HASH_LENGTH, (void *)__addr);});
33 ^
34/virtual/main.c:112:24: note: did you mean '_bpf_readarg_trace_added_1'?
35/virtual/main.c:13:28: note: '_bpf_readarg_trace_added_1' declared here
36static __always_inline int _bpf_readarg_trace_added_1(struct pt_regs *ctx, void *dest, size_t len) {
37 ^
38/virtual/main.c:113:24: error: call to undeclared function '_bpf_readarg_trace_rejected_2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
39 ({ u64 __addr = 0x0; _bpf_readarg_trace_rejected_2(ctx, &__addr, sizeof(__addr));bpf_probe_read_user(&rejected.reason, MAX_REJECT_REASON_LENGTH, (void *)__addr);});
40 ^
41/virtual/main.c:113:24: note: did you mean '_bpf_readarg_trace_added_2'?
42/virtual/main.c:19:28: note: '_bpf_readarg_trace_added_2' declared here
43static __always_inline int _bpf_readarg_trace_added_2(struct pt_regs *ctx, void *dest, size_t len) {
44 ^
45/virtual/main.c:124:24: error: call to undeclared function '_bpf_readarg_trace_replaced_1'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
46 ({ u64 __addr = 0x0; _bpf_readarg_trace_replaced_1(ctx, &__addr, sizeof(__addr));bpf_probe_read_user(&replaced.replaced_hash, HASH_LENGTH, (void *)__addr);});
47 ^
48/virtual/main.c:124:24: note: did you mean '_bpf_readarg_trace_added_1'?
49/virtual/main.c:13:28: note: '_bpf_readarg_trace_added_1' declared here
50static __always_inline int _bpf_readarg_trace_added_1(struct pt_regs *ctx, void *dest, size_t len) {
51 ^
52/virtual/main.c:125:3: error: call to undeclared function '_bpf_readarg_trace_replaced_2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
53 _bpf_readarg_trace_replaced_2(ctx, &replaced.replaced_vsize, sizeof(*(&replaced.replaced_vsize)));
54 ^
55/virtual/main.c:125:3: note: did you mean '_bpf_readarg_trace_added_2'?
56/virtual/main.c:19:28: note: '_bpf_readarg_trace_added_2' declared here
57static __always_inline int _bpf_readarg_trace_added_2(struct pt_regs *ctx, void *dest, size_t len) {
58 ^
59/virtual/main.c:126:3: error: call to undeclared function '_bpf_readarg_trace_replaced_3'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
60 _bpf_readarg_trace_replaced_3(ctx, &replaced.replaced_fee, sizeof(*(&replaced.replaced_fee)));
61 ^
62/virtual/main.c:127:3: error: call to undeclared function '_bpf_readarg_trace_replaced_4'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
63 _bpf_readarg_trace_replaced_4(ctx, &replaced.replaced_entry_time, sizeof(*(&replaced.replaced_entry_time)));
64 ^
65/virtual/main.c:128:24: error: call to undeclared function '_bpf_readarg_trace_replaced_5'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
66 ({ u64 __addr = 0x0; _bpf_readarg_trace_replaced_5(ctx, &__addr, sizeof(__addr));bpf_probe_read_user(&replaced.replacement_hash, HASH_LENGTH, (void *)__addr);});
67 ^
68/virtual/main.c:129:3: error: call to undeclared function '_bpf_readarg_trace_replaced_6'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
69 _bpf_readarg_trace_replaced_6(ctx, &replaced.replacement_vsize, sizeof(*(&replaced.replacement_vsize)));
70 ^
71/virtual/main.c:130:3: error: call to undeclared function '_bpf_readarg_trace_replaced_7'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
72 _bpf_readarg_trace_replaced_7(ctx, &replaced.replacement_fee, sizeof(*(&replaced.replacement_fee)));
73 ^
7414 errors generated.
752023-10-05T15:22:57.476000Z TestFramework (ERROR): Unexpected exception caught during testing
76Traceback (most recent call last):
77 File "/root/bitcoin-core/test/functional/test_framework/test_framework.py", line 131, in main
78 self.run_test()
79 File "/root/bitcoin-core/./test/functional/interface_usdt_mempool.py", line 317, in run_test
80 self.added_test()
81 File "/root/bitcoin-core/./test/functional/interface_usdt_mempool.py", line 146, in added_test
82 bpf = BPF(text=MEMPOOL_TRACEPOINTS_PROGRAM, usdt_contexts=[ctx], debug=0)
83 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84 File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 479, in __init__
85 raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
86Exception: Failed to compile BPF module <text>
872023-10-05T15:22:57.528000Z TestFramework (INFO): Stopping nodes
882023-10-05T15:22:57.580000Z TestFramework (WARNING): Not cleaning up dir /tmp/bitcoin_func_test_930vj2wl
892023-10-05T15:22:57.580000Z TestFramework (ERROR): Test failed. Test logging available at /tmp/bitcoin_func_test_930vj2wl/test_framework.log
902023-10-05T15:22:57.580000Z TestFramework (ERROR):
912023-10-05T15:22:57.580000Z TestFramework (ERROR): Hint: Call /root/bitcoin-core/test/functional/combine_logs.py '/tmp/bitcoin_func_test_930vj2wl' to consolidate all logs
922023-10-05T15:22:57.580000Z TestFramework (ERROR):
932023-10-05T15:22:57.580000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
942023-10-05T15:22:57.580000Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
952023-10-05T15:22:57.580000Z TestFramework (ERROR):