Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV running os_run_tester.sh #10

Closed
actaeon opened this issue Jun 17, 2018 · 23 comments
Closed

SIGSEGV running os_run_tester.sh #10

actaeon opened this issue Jun 17, 2018 · 23 comments

Comments

@actaeon
Copy link

actaeon commented Jun 17, 2018

Hi folks.

I spun up a fresh VM with Ubuntu 18.04 to test this, and I'm getting a SIGSEGV running the os_run_tester.sh script.

After changing build/CMakeCache.txt: like this:

...
CMAKE_BUILD_TYPE:STRING=Debug
...
CMAKE_CXX_FLAGS_DEBUG:STRING=-g3 -fno-stack-protector
...

I then used gdb to run the tester like so:

(gdb) file /usr/local/src/katran/build/katran/lib/testing/katran_tester
Reading symbols from /usr/local/src/katran/build/katran/lib/testing/katran_tester...done.
(gdb) run -balancer_prog /usr/local/src/katran/deps/linux/bpfprog/bpf/balancer_kern.o -test_from_fixtures=true
Starting program: /usr/local/src/katran/build/katran/lib/testing/katran_tester -balancer_prog /usr/local/src/katran/deps/linux/bpfprog/bpf/balancer_kern.o -test_from_fixtures=true
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
E0617 19:44:14.898008 24596 BpfLoader.cpp:160] Can't read section size for index: 2
I0617 19:44:14.898075 24596 BpfLoader.cpp:434] Skipping section: 2 of file: /usr/local/src/katran/deps/linux/bpfprog/bpf/balancer_kern.o
I0617 19:44:14.931807 24596 BpfLoader.cpp:353] relocation for non existing prog w/ idx 10
I0617 19:44:14.931880 24596 BpfLoader.cpp:353] relocation for non existing prog w/ idx 14
I0617 19:44:14.931902 24596 BpfLoader.cpp:353] relocation for non existing prog w/ idx 16
I0617 19:44:14.931906 24596 BpfLoader.cpp:353] relocation for non existing prog w/ idx 18
I0617 19:44:14.931908 24596 BpfLoader.cpp:353] relocation for non existing prog w/ idx 20
I0617 19:44:14.939867 24596 KatranLb.cpp:394] adding new vip: 10.200.1.1:80:17
I0617 19:44:15.020308 24596 KatranLb.cpp:394] adding new vip: 10.200.1.1:80:6
I0617 19:44:15.091914 24596 KatranLb.cpp:394] adding new vip: 10.200.1.2:0:6
I0617 19:44:15.162443 24596 KatranLb.cpp:394] adding new vip: 10.200.1.4:0:6
I0617 19:44:15.231927 24596 KatranLb.cpp:459] modyfing vip: 10.200.1.4:0:6
I0617 19:44:15.231992 24596 KatranLb.cpp:394] adding new vip: 10.200.1.3:80:6
I0617 19:44:15.301601 24596 KatranLb.cpp:394] adding new vip: fc00:1::1:80:6
I0617 19:44:15.370398 24596 KatranLb.cpp:394] adding new vip: 10.200.1.5:443:17
I0617 19:44:15.370491 24596 KatranLb.cpp:459] modyfing vip: 10.200.1.5:443:17
I0617 19:44:15.440598 24596 KatranLb.cpp:394] adding new vip: fc00:1::2:443:17
I0617 19:44:15.440691 24596 KatranLb.cpp:459] modyfing vip: fc00:1::2:443:17
I0617 19:44:15.512671 24596 XdpTester.cpp:166] Test: packet to UDP based v4 VIP (and v4 real)                     result: Passed
I0617 19:44:15.512732 24596 XdpTester.cpp:166] Test: packet to TCP based v4 VIP (and v4 real)                     result: Passed
I0617 19:44:15.512744 24596 XdpTester.cpp:166] Test: packet to TCP based v4 VIP (and v4 real; any dst ports).     result: Passed
I0617 19:44:15.512753 24596 XdpTester.cpp:166] Test: packet to TCP based v4 VIP (and v6 real)                     result: Passed
I0617 19:44:15.512763 24596 XdpTester.cpp:166] Test: packet to TCP based v6 VIP (and v6 real)                     result: Passed
I0617 19:44:15.512769 24596 XdpTester.cpp:166] Test: v4 ICMP echo-request                                         result: Passed
I0617 19:44:15.512776 24596 XdpTester.cpp:166] Test: v6 ICMP echo-request                                         result: Passed
I0617 19:44:15.512784 24596 XdpTester.cpp:166] Test: v4 ICMP dest-unreachabe fragmentation-needed                 result: Passed
I0617 19:44:15.512814 24596 XdpTester.cpp:166] Test: v6 ICMP packet-too-big                                       result: Passed
I0617 19:44:15.512897 24596 XdpTester.cpp:166] Test: drop of IPv4 packet w/ options                               result: Passed
I0617 19:44:15.512924 24596 XdpTester.cpp:166] Test: drop of IPv4 fragmented packet                               result: Passed
I0617 19:44:15.512948 24596 XdpTester.cpp:166] Test: drop of IPv6 fragmented packet                               result: Passed
I0617 19:44:15.512956 24596 XdpTester.cpp:166] Test: pass of v4 packet with dst not equal to any configured VIP   result: Passed
I0617 19:44:15.512964 24596 XdpTester.cpp:166] Test: pass of v6 packet with dst not equal to any configured VIP   result: Passed
I0617 19:44:15.512971 24596 XdpTester.cpp:166] Test: pass of arp packet                                           result: Passed
I0617 19:44:15.512979 24596 XdpTester.cpp:166] Test: LRU hit                                                      result: Passed
I0617 19:44:15.512990 24596 XdpTester.cpp:166] Test: packet #1 dst port hashing only                              result: Passed
I0617 19:44:15.512998 24596 XdpTester.cpp:166] Test: packet #2 dst port hashing only                              result: Passed
I0617 19:44:15.513005 24596 XdpTester.cpp:166] Test: ipinip packet                                                result: Passed
I0617 19:44:15.513031 24596 XdpTester.cpp:166] Test: ipv6inipv6 packet                                            result: Passed
I0617 19:44:15.513054 24596 XdpTester.cpp:166] Test: ipv4inipv6 packet                                            result: Passed
I0617 19:44:15.513063 24596 XdpTester.cpp:166] Test: QUIC: long header. Client Initial type                       result: Passed
I0617 19:44:15.513092 24596 XdpTester.cpp:166] Test: QUIC: long header. 0-RTT Protected                           result: Passed
I0617 19:44:15.513114 24596 XdpTester.cpp:166] Test: QUIC: long header. v4 vip v6 real                            result: Passed
I0617 19:44:15.513147 24596 XdpTester.cpp:166] Test: QUIC: long header. v6 vip v6 real                            result: Passed
I0617 19:44:15.513252 24596 XdpTester.cpp:166] Test: QUIC: short header. no connection id                         result: Passed
I0617 19:44:15.513362 24596 XdpTester.cpp:166] Test: QUIC: short header w/ connection id                          result: Passed
I0617 19:44:15.513447 24596 XdpTester.cpp:166] Test: QUIC: short header w/ connection id but non-existing mapping result: Passed
I0617 19:44:15.513480 24596 katran_tester.cpp:166] Testing counter's sanity. Printing on errors only

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()

Here is the BT:

(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000000000000000 in ?? ()

And a list:

(gdb) list
177	  stats = lb.getLruMissStats();
178	  if ((stats.v1 != 2) || (stats.v2 != 6)) {
179	    VLOG(2) << "TCP syns: " << stats.v1 << " TCP non-syns: " << stats.v2;
180	    LOG(INFO) << "per pckt type LRU miss counter is incorrect";
181	  }
182	  stats = lb.getLruFallbackStats();
183	  if (stats.v1 != 13) {
184	    VLOG(2) << "FallbackLRU hits: " << stats.v1;
185	    LOG(INFO) << "LRU fallback counter is incorrect";
186	  }

Here are the particulars of the test box:

# uname -a
Linux katran 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.3.0-16ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --with-as=/usr/bin/x86_64-linux-gnu-as --with-ld=/usr/bin/x86_64-linux-gnu-ld --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)

I'm out of my depth here, and was hoping you all might look at it. Let me know what other info you need or if there is any other way I can help. Reproducing should be as easy as spinning up a stock Ubuntu 18.04 VM and running build_katran.sh.

Thanks!

@tehnerd
Copy link
Contributor

tehnerd commented Jun 17, 2018

Thanks for the report. Will look into this

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

Could you please run with .os_run_tester.sh -v 6 . Also what were you using to run VM? Right now I’m thinking that “online cpu != configured cpu” . We are using sysconf(_SC_NPROCESSORS_CONF) to get the number of CPUs in a system (for per cpu counters). However if number of online CPUs somehow less then configured - we could ge some issues there

@actaeon
Copy link
Author

actaeon commented Jun 18, 2018

Gist of requested output here

I double-checked the cpu count before I reported the issue. When I configured the VM (using fusion, on my Mac) I gave it 6 cores, and that's what was showing up when I checked with gdb.

[edit]
What I meant was that the nr_cpus was showing 6, I don't know how to check the status (online vs not). I can say that lscpu shows what I would expect:

# lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              6
On-line CPU(s) list: 0-5
Thread(s) per core:  1
Core(s) per socket:  3
Socket(s):           2
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               94
Model name:          Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Stepping:            3
CPU MHz:             2591.733
BogoMIPS:            5183.46
Hypervisor vendor:   VMware
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            6144K
NUMA node0 CPU(s):   0-5
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 invpcid rtm rdseed adx smap xsaveopt dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp

FYI, I initially tried this on a Dell 620 with 20 cores with Centos, and it did the same exact thing, if that's helpful. I moved to the Ubuntu VM to get closer to what you all were doing with the quick-start script.

I've stepped though this a few times with the debugger, and it seems to blow up after the call to bpfAdapter_.bpfMapLookupElement here.

Just after this call, the stack frame in the debugger starts looking really strange, and the execution faults when KatranLb::getLbStats tries to return.

Maybe this is an alignment problem? I see that the BPF stuff is using void pointers. But like I said, I'm pretty far out of my depth here.

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

could you please add something like
LOG(INFO) << "nr_cpus=" << nr_cpus;
after this line: https://github.com/facebookincubator/katran/blob/master/katran/lib/KatranLb.cpp#L687
want to check what would it print.
so far wasn't able to repro on my ubuntu setup. but the only place (which comes into my mind) when it could segfault in that function is when nr_cpus (and array, which is using this value as a size) is not equal to the number of cpus in a system.

@actaeon
Copy link
Author

actaeon commented Jun 18, 2018

Here's the condensed output:

I0618 02:55:30.575898 36838 katran_tester.cpp:166] Testing counter's sanity. Printing on errors only
I0618 02:55:30.581773 36838 KatranLb.cpp:688] nr_cpus=6

I put up a gist of what looks like stack corruption here. It might be interesting.

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

strange. i've build with clang's address sanitizing and it wasn't triggered (so clang doesnt see any stack/mem corruption)
could you do the same? lets look what it will show in your case. to do so:

change CMake so it would build asan binary: https://gist.github.com/tehnerd/a873f4f6bb69ebdc0086575b69373ef6

then:

export CXX=/usr/bin/clang++-6.0
export CC=/usr/bin/clang-6.0
then go to build dir
cd build
rm -rf ./* (to remove old cached objects from there)
cmake ..
(make sure that it prints something like:
tehnerd@nuke:/katran/build$ cmake ..
tehnerd@nuke:
/katran/build$ cmake ..
-- The C compiler identification is Clang 6.0.1
-- The CXX compiler identification is Clang 6.0.1

make -j 6

then run os_run_tester and see if it will fail or not

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

(i was using clang from nightly builds from http://apt.llvm.org/ ; if you are going to use provided by ubuntu - probably path would be different)

@actaeon
Copy link
Author

actaeon commented Jun 18, 2018

It produces a nicer-looking SIGSEGV, which I choose to call progress:

I0618 03:58:32.966653 38458 katran_tester.cpp:166] Testing counter's sanity. Printing on errors only
I0618 03:58:32.966902 38458 KatranLb.cpp:688] nr_cpus=6
AddressSanitizer:DEADLYSIGNAL
=================================================================
==38458==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000000a (pc 0x00000060ed48 bp 0x7ffdbc53b150 sp 0x7ffdbc53af40 T0)
==38458==The signal is caused by a WRITE memory access.
==38458==Hint: address points to the zero page.
    #0 0x60ed47  (/usr/local/src/katran/build/katran/lib/testing/katran_tester+0x60ed47)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/local/src/katran/build/katran/lib/testing/katran_tester+0x60ed47)
==38458==ABORTING

Let me ask a really stupid question: does the build / os_run_tester.sh require a legitimate multi-queue NIC with proper IRQ pinning, etc? Is the BPF code being testing actually loaded into the kernel? I ask because the NIC here is definitely not multi-queued.

Should I be able to build the BPF object files and the example code artifacts in an ubuntu docker container and then install them onto a "real" server (non-docker) with kernel 4.15 and legit multi-queue NICs?

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

No. Os_tester runs bpf’s internal test facility. It doesn’t use nic or any network interface. Everything is inside bpf subsystem + userspace. So mb indeed some weird corner case with alignment. Let me test tomorrow in more or less the same env. At least will start with 6cpus. As this is an obvious difference between your test bed and mine (I’m using 8. In prod we have 40 48 56 80. All running with no issues)

As for “would you be able to build on one server and run on other” yes. Almost everything is statically compiles (ldd is your friend in case if something is missed)

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

ok. w/ 6 cpus there is no issue as well in my testbed. so something else ...

tehnerd@ubuntu18:~/katran$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              6
On-line CPU(s) list: 0-5
Thread(s) per core:  1
Core(s) per socket:  6
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               158
Model name:          Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Stepping:            9
CPU MHz:             3095.998
BogoMIPS:            6191.99
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            8192K
NUMA node0 CPU(s):   0-5
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch pti avx2 rdseed clflushopt
tehnerd@ubuntu18:~/katran$

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

@actaeon could you please provide make this steps and provide an output:

  1. sudo apt-get install bpfcc-tools

  2. run in one window:
    sudo trace-bpfcc -I linux/bpf.h 'bpf_percpu_array_copy(struct bpf_map* map) "max_size=%u, value_size=%u", map->max_entries, map->value_size'

  3. in other window run os_tester

  4. paste an output from the first window (should looks like something like:

 sudo trace-bpfcc -I linux/bpf.h 'bpf_percpu_array_copy(struct bpf_map* map) "max_size=%u, value_size=%u", map->max_entries, map->value_size'

PID    TID    COMM         FUNC             -
2876   2876   katran_tester bpf_percpu_array_copy max_size=1024, value_size=16
2876   2876   katran_tester bpf_percpu_array_copy max_size=1024, value_size=16
2876   2876   katran_tester bpf_percpu_array_copy max_size=1024, value_size=16
2876   2876   katran_tester bpf_percpu_array_copy max_size=1024, value_size=16

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

(in your case we most likely see only one line, as after first lookup userspace would segfault)

@actaeon
Copy link
Author

actaeon commented Jun 18, 2018

Here's the output:

# trace-bpfcc -I linux/bpf.h 'bpf_percpu_array_copy(struct bpf_map* map) "max_size=%u, value_size=%u", map->max_entries, map->value_size'
PID    TID    COMM         FUNC             -
6040   6040   katran_tester bpf_percpu_array_copy max_size=1024, value_size=16

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

unfortunately i cannot find any tracepoint, which would show how many bytes kernel is actually trying to return. lets go other way for now. could you please apply this patch:
https://gist.github.com/tehnerd/9626888dca92f556606efd8ec48c065e
and recompile/rerun os_tester. if it still going to fail - you can increase <<1 to something bigger (line 10). we want to figure out how many bytes kernel is actually trying to copy to userland.
steps are going to be:

  1. find when it stops to be broken (<<value)
  2. we will try to figure out how many bytes kernel is actually want (it should be 16*cpu_nums; but obviously somehow in your case it's not true; right now i'm thinking about instead of "memset 0" we will do some kind of masking and we will see where this mask would be overwriten by kernel)

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

also could you please show the output from:
cat /sys/devices/system/cpu/online
cat /sys/devices/system/cpu/possible

@actaeon
Copy link
Author

actaeon commented Jun 18, 2018

It succeeded at nr_cpus * 32:

lb_stats stats[nr_cpus<<5];

Output:

...
I0618 17:49:02.047762  8638 XdpTester.cpp:166] Test: QUIC: short header w/ connection id but non-existing mapping result: Passed
I0618 17:49:02.047868  8638 katran_tester.cpp:166] Testing counter's sanity. Printing on errors only
I0618 17:49:02.048025  8638 KatranLb.cpp:690] sizeof(stats)=3072
I0618 17:49:02.048171  8638 KatranLb.cpp:690] sizeof(stats)=3072
I0618 17:49:02.048307  8638 KatranLb.cpp:690] sizeof(stats)=3072
I0618 17:49:02.048465  8638 KatranLb.cpp:690] sizeof(stats)=3072
I0618 17:49:02.048570  8638 katran_tester.cpp:187] Testing of counters is complite
# cat /sys/devices/system/cpu/online
0-5
# cat /sys/devices/system/cpu/possible
0-127

^^ Interesting

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

yeah. thats probably the case here

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

ok. now i know what to fix. it will take some time (mostly because we have few internal diffs, which are under review. this fix is going to be on top of em).

@tehnerd
Copy link
Contributor

tehnerd commented Jun 18, 2018

thanks for your time and provided outputs!

@actaeon
Copy link
Author

actaeon commented Jun 18, 2018

I changed the memset to fill in 0xf1 and then printed the returned 3072 bytes with the debugger, output is here.

Looks like it returns 2048, which is indeed 128 * 16.

I just did a cursory check of some different classes of bare metal we have, and it looks like many of them report different values for -online vs -possible, so it seems this is likely what's going on (good find!).

@actaeon
Copy link
Author

actaeon commented Jun 18, 2018

I'm not in a hurry for anything, I just wanted to play with this and I can work around it easily now. I appreciate the time and expertise, and especially for you all making this available.

@tehnerd
Copy link
Contributor

tehnerd commented Jun 20, 2018

fixed in c9a7a03

@tehnerd tehnerd closed this as completed Jun 20, 2018
@actaeon
Copy link
Author

actaeon commented Jun 20, 2018

Thanks!

facebook-github-bot pushed a commit that referenced this issue Mar 20, 2024
Summary:
After diving in all the build system I found that the first error mentioned in #219 and #220

```
1597 | static_assert(formattable_char, "Mixing character types is disallowed.");
```

Was basically happening while compiling folly, after compiling it by itself I noticed this didn't happened, so I found that there was an issue with the fmt dependencies, removing the one that was downloaded by katran

The issue mentioned in: #221

Was because katran was configured to use C++14 by default, and some of the libraries of folly require C++17, updated our requirements.


Test Plan:
TEST Output:

```
Test project /home/ubuntu/ivanmorett/katran/_build/build/katran/lib/tests
      Start  1: IpHelpersTests.testV4ParsingBe
 1/56 Test  #1: IpHelpersTests.testV4ParsingBe .......................   Passed    0.01 sec
      Start  2: IpHelpersTests.testV4ParsingInt
 2/56 Test  #2: IpHelpersTests.testV4ParsingInt ......................   Passed    0.01 sec
      Start  3: IpHelpersTests.testV6ParsingBe
 3/56 Test  #3: IpHelpersTests.testV6ParsingBe .......................   Passed    0.01 sec
      Start  4: IpHelpersTests.testV6ParsingInt
 4/56 Test  #4: IpHelpersTests.testV6ParsingInt ......................   Passed    0.01 sec
      Start  5: IpHelpersTests.testIncorrectAddr
 5/56 Test  #5: IpHelpersTests.testIncorrectAddr .....................   Passed    0.01 sec
      Start  6: CHHelpersTest.testMaglevCHSameWeight
 6/56 Test  #6: CHHelpersTest.testMaglevCHSameWeight .................   Passed    0.01 sec
      Start  7: CHHelpersTest.testMaglevV2CHSameWeight
 7/56 Test  #7: CHHelpersTest.testMaglevV2CHSameWeight ...............   Passed    0.01 sec
      Start  8: CHHelpersTest.testMaglevCHDiffWeight
 8/56 Test  #8: CHHelpersTest.testMaglevCHDiffWeight .................   Passed    0.01 sec
      Start  9: CHHelpersTest.testMaglevV2CHDiffWeight
 9/56 Test  #9: CHHelpersTest.testMaglevV2CHDiffWeight ...............   Passed    0.01 sec
      Start 10: CHHelpersTest.testMaglevWeightsSumLargerThanRing
10/56 Test #10: CHHelpersTest.testMaglevWeightsSumLargerThanRing .....   Passed    0.01 sec
      Start 11: CHHelpersTest.testMaglevWeightsSumBelowRingSize
11/56 Test #11: CHHelpersTest.testMaglevWeightsSumBelowRingSize ......   Passed    0.01 sec
      Start 12: KatranLbTest.testChangeMac
12/56 Test #12: KatranLbTest.testChangeMac ...........................   Passed    0.01 sec
      Start 13: KatranLbTest.testIfIndex
13/56 Test #13: KatranLbTest.testIfIndex .............................   Passed    0.01 sec
      Start 14: KatranLbTest.testVipHelpers
14/56 Test #14: KatranLbTest.testVipHelpers ..........................   Passed    0.14 sec
      Start 15: KatranLbTest.testAddingInvalidVip
15/56 Test #15: KatranLbTest.testAddingInvalidVip ....................   Passed    0.01 sec
      Start 16: KatranLbTest.testRealHelpers
16/56 Test #16: KatranLbTest.testRealHelpers .........................   Passed    0.01 sec
      Start 17: KatranLbTest.testRealFlags
17/56 Test #17: KatranLbTest.testRealFlags ...........................   Passed    0.01 sec
      Start 18: KatranLbTest.testVipStatsHelper
18/56 Test #18: KatranLbTest.testVipStatsHelper ......................   Passed    0.01 sec
      Start 19: KatranLbTest.testLruStatsHelper
19/56 Test #19: KatranLbTest.testLruStatsHelper ......................   Passed    0.01 sec
      Start 20: KatranLbTest.testLruMissStatsHelper
20/56 Test #20: KatranLbTest.testLruMissStatsHelper ..................   Passed    0.01 sec
      Start 21: KatranLbTest.testHcHelpers
21/56 Test #21: KatranLbTest.testHcHelpers ...........................   Passed    0.01 sec
      Start 22: KatranLbTest.getVipFlags
22/56 Test #22: KatranLbTest.getVipFlags .............................   Passed    0.01 sec
      Start 23: KatranLbTest.getAllVips
23/56 Test #23: KatranLbTest.getAllVips ..............................   Passed    0.01 sec
      Start 24: KatranLbTest.testUpdateRealsHelper
24/56 Test #24: KatranLbTest.testUpdateRealsHelper ...................   Passed    0.07 sec
      Start 25: KatranLbTest.testUpdateQuicRealsHelper
25/56 Test #25: KatranLbTest.testUpdateQuicRealsHelper ...............   Passed    0.06 sec
      Start 26: KatranLbTest.testUpdateQuicReal
26/56 Test #26: KatranLbTest.testUpdateQuicReal ......................   Passed    0.01 sec
      Start 27: KatranLbTest.getRealsForVip
27/56 Test #27: KatranLbTest.getRealsForVip ..........................   Passed    0.01 sec
      Start 28: KatranLbTest.getHealthcheckersDst
28/56 Test #28: KatranLbTest.getHealthcheckersDst ....................   Passed    0.01 sec
      Start 29: KatranLbTest.invalidAddressHandling
29/56 Test #29: KatranLbTest.invalidAddressHandling ..................   Passed    0.01 sec
      Start 30: KatranLbTest.addInvalidSrcRoutingRule
30/56 Test #30: KatranLbTest.addInvalidSrcRoutingRule ................   Passed    0.01 sec
      Start 31: KatranLbTest.addValidSrcRoutingRuleV4
31/56 Test #31: KatranLbTest.addValidSrcRoutingRuleV4 ................   Passed    0.01 sec
      Start 32: KatranLbTest.addValidSrcRoutingRuleV6
32/56 Test #32: KatranLbTest.addValidSrcRoutingRuleV6 ................   Passed    0.01 sec
      Start 33: KatranLbTest.addMaxSrcRules
33/56 Test #33: KatranLbTest.addMaxSrcRules ..........................   Passed    0.01 sec
      Start 34: KatranLbTest.delSrcRules
34/56 Test #34: KatranLbTest.delSrcRules .............................   Passed    0.01 sec
      Start 35: KatranLbTest.clearSrcRules
35/56 Test #35: KatranLbTest.clearSrcRules ...........................   Passed    0.01 sec
      Start 36: KatranLbTest.addFewInvalidNets
36/56 Test #36: KatranLbTest.addFewInvalidNets .......................   Passed    0.01 sec
      Start 37: KatranLbTest.addInvalidDecapDst
37/56 Test #37: KatranLbTest.addInvalidDecapDst ......................   Passed    0.01 sec
      Start 38: KatranLbTest.addInvalidDecapDstNet
38/56 Test #38: KatranLbTest.addInvalidDecapDstNet ...................   Passed    0.01 sec
      Start 39: KatranLbTest.addValidDecapDst
39/56 Test #39: KatranLbTest.addValidDecapDst ........................   Passed    0.01 sec
      Start 40: KatranLbTest.delValidDecapDst
40/56 Test #40: KatranLbTest.delValidDecapDst ........................   Passed    0.01 sec
      Start 41: KatranLbTest.delInvalidDecapDst
41/56 Test #41: KatranLbTest.delInvalidDecapDst ......................   Passed    0.01 sec
      Start 42: KatranLbTest.addMaxDecapDst
42/56 Test #42: KatranLbTest.addMaxDecapDst ..........................   Passed    0.01 sec
      Start 43: VipTestF.testBatchUpdateReals
43/56 Test #43: VipTestF.testBatchUpdateReals ........................   Passed    0.04 sec
      Start 44: VipTestF.testBatchUpdateRealsWeight
44/56 Test #44: VipTestF.testBatchUpdateRealsWeight ..................   Passed    0.05 sec
      Start 45: VipTestF.testGetRealsAndWeight
45/56 Test #45: VipTestF.testGetRealsAndWeight .......................   Passed    0.01 sec
      Start 46: VipTestF.testGetReals
46/56 Test #46: VipTestF.testGetReals ................................   Passed    0.02 sec
      Start 47: VipTest.testAddRemoveReal
47/56 Test #47: VipTest.testAddRemoveReal ............................   Passed    0.01 sec
      Start 48: EventPipeCallbackTest.SimpleCallbackTest
48/56 Test #48: EventPipeCallbackTest.SimpleCallbackTest .............   Passed    0.01 sec
      Start 49: EventPipeCallbackTest.LargeWriteTest
49/56 Test #49: EventPipeCallbackTest.LargeWriteTest .................   Passed    0.15 sec
      Start 50: TestMonitoringServiceCore.SimpleAcceptSubscription
50/56 Test #50: TestMonitoringServiceCore.SimpleAcceptSubscription ...   Passed    0.01 sec
      Start 51: TestMonitoringServiceCore.SimpleErrors
51/56 Test #51: TestMonitoringServiceCore.SimpleErrors ...............   Passed    0.01 sec
      Start 52: TestMonitoringServiceCore.EventIntersection
52/56 Test #52: TestMonitoringServiceCore.EventIntersection ..........   Passed    0.01 sec
      Start 53: TestMonitoringServiceCore.RacingClients
53/56 Test #53: TestMonitoringServiceCore.RacingClients ..............   Passed    0.01 sec
      Start 54: TestMonitoringServiceCore.SubscribeAndCancel
54/56 Test #54: TestMonitoringServiceCore.SubscribeAndCancel .........   Passed    0.01 sec
      Start 55: PcapWriterTest.SingleWriter
55/56 Test #55: PcapWriterTest.SingleWriter ..........................   Passed    0.02 sec
      Start 56: PcapWriterTest.MultiWriter
56/56 Test #56: PcapWriterTest.MultiWriter ...........................   Passed    0.01 sec

100% tests passed, 0 tests failed out of 56

Total Test time (real) =   1.04 sec
+ cd ../testing/
+ ctest -v ./CMakeFiles ./CTestTestfile.cmake ./Makefile ./base64helpers-tests './base64helpers-tests[1]_include.cmake' './base64helpers-tests[1]_tests.cmake' ./cmake_install.cmake ./katran_tester ./libbase64_helpers.a ./libbpftester.a ./libkatran_test_provision.a ./libkatran_test_util.a ./libpcap_parser.a
ctest: /usr/local/lib/libcurl.so.4: no version information available (required by ctest)
Test project /home/ubuntu/ivanmorett/katran/_build/build/katran/lib/testing
    Start 1: Base64Tests.testEncode
1/2 Test #1: Base64Tests.testEncode ...........   Passed    0.01 sec
    Start 2: Base64Tests.testDecode
2/2 Test #2: Base64Tests.testDecode ...........   Passed    0.01 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =   0.01 sec
+ popd
~/ivanmorett/katran/_build
```

Differential Revision: D55108012

Pulled By: lima1756
lima1756 added a commit that referenced this issue Mar 20, 2024
Summary:
After diving in all the build system I found that the first error mentioned in #219 and #220

```
1597 | static_assert(formattable_char, "Mixing character types is disallowed.");
```

Was basically happening while compiling folly, after compiling it by itself I noticed this didn't happened, so I found that there was an issue with the fmt dependencies, removing the one that was downloaded by katran

The issue mentioned in: #221

Was because katran was configured to use C++14 by default, and some of the libraries of folly require C++17, updated our requirements.


Test Plan:
TEST Output:

```
Test project /home/ubuntu/ivanmorett/katran/_build/build/katran/lib/tests
      Start  1: IpHelpersTests.testV4ParsingBe
 1/56 Test  #1: IpHelpersTests.testV4ParsingBe .......................   Passed    0.01 sec
      Start  2: IpHelpersTests.testV4ParsingInt
 2/56 Test  #2: IpHelpersTests.testV4ParsingInt ......................   Passed    0.01 sec
      Start  3: IpHelpersTests.testV6ParsingBe
 3/56 Test  #3: IpHelpersTests.testV6ParsingBe .......................   Passed    0.01 sec
      Start  4: IpHelpersTests.testV6ParsingInt
 4/56 Test  #4: IpHelpersTests.testV6ParsingInt ......................   Passed    0.01 sec
      Start  5: IpHelpersTests.testIncorrectAddr
 5/56 Test  #5: IpHelpersTests.testIncorrectAddr .....................   Passed    0.01 sec
      Start  6: CHHelpersTest.testMaglevCHSameWeight
 6/56 Test  #6: CHHelpersTest.testMaglevCHSameWeight .................   Passed    0.01 sec
      Start  7: CHHelpersTest.testMaglevV2CHSameWeight
 7/56 Test  #7: CHHelpersTest.testMaglevV2CHSameWeight ...............   Passed    0.01 sec
      Start  8: CHHelpersTest.testMaglevCHDiffWeight
 8/56 Test  #8: CHHelpersTest.testMaglevCHDiffWeight .................   Passed    0.01 sec
      Start  9: CHHelpersTest.testMaglevV2CHDiffWeight
 9/56 Test  #9: CHHelpersTest.testMaglevV2CHDiffWeight ...............   Passed    0.01 sec
      Start 10: CHHelpersTest.testMaglevWeightsSumLargerThanRing
10/56 Test #10: CHHelpersTest.testMaglevWeightsSumLargerThanRing .....   Passed    0.01 sec
      Start 11: CHHelpersTest.testMaglevWeightsSumBelowRingSize
11/56 Test #11: CHHelpersTest.testMaglevWeightsSumBelowRingSize ......   Passed    0.01 sec
      Start 12: KatranLbTest.testChangeMac
12/56 Test #12: KatranLbTest.testChangeMac ...........................   Passed    0.01 sec
      Start 13: KatranLbTest.testIfIndex
13/56 Test #13: KatranLbTest.testIfIndex .............................   Passed    0.01 sec
      Start 14: KatranLbTest.testVipHelpers
14/56 Test #14: KatranLbTest.testVipHelpers ..........................   Passed    0.14 sec
      Start 15: KatranLbTest.testAddingInvalidVip
15/56 Test #15: KatranLbTest.testAddingInvalidVip ....................   Passed    0.01 sec
      Start 16: KatranLbTest.testRealHelpers
16/56 Test #16: KatranLbTest.testRealHelpers .........................   Passed    0.01 sec
      Start 17: KatranLbTest.testRealFlags
17/56 Test #17: KatranLbTest.testRealFlags ...........................   Passed    0.01 sec
      Start 18: KatranLbTest.testVipStatsHelper
18/56 Test #18: KatranLbTest.testVipStatsHelper ......................   Passed    0.01 sec
      Start 19: KatranLbTest.testLruStatsHelper
19/56 Test #19: KatranLbTest.testLruStatsHelper ......................   Passed    0.01 sec
      Start 20: KatranLbTest.testLruMissStatsHelper
20/56 Test #20: KatranLbTest.testLruMissStatsHelper ..................   Passed    0.01 sec
      Start 21: KatranLbTest.testHcHelpers
21/56 Test #21: KatranLbTest.testHcHelpers ...........................   Passed    0.01 sec
      Start 22: KatranLbTest.getVipFlags
22/56 Test #22: KatranLbTest.getVipFlags .............................   Passed    0.01 sec
      Start 23: KatranLbTest.getAllVips
23/56 Test #23: KatranLbTest.getAllVips ..............................   Passed    0.01 sec
      Start 24: KatranLbTest.testUpdateRealsHelper
24/56 Test #24: KatranLbTest.testUpdateRealsHelper ...................   Passed    0.07 sec
      Start 25: KatranLbTest.testUpdateQuicRealsHelper
25/56 Test #25: KatranLbTest.testUpdateQuicRealsHelper ...............   Passed    0.06 sec
      Start 26: KatranLbTest.testUpdateQuicReal
26/56 Test #26: KatranLbTest.testUpdateQuicReal ......................   Passed    0.01 sec
      Start 27: KatranLbTest.getRealsForVip
27/56 Test #27: KatranLbTest.getRealsForVip ..........................   Passed    0.01 sec
      Start 28: KatranLbTest.getHealthcheckersDst
28/56 Test #28: KatranLbTest.getHealthcheckersDst ....................   Passed    0.01 sec
      Start 29: KatranLbTest.invalidAddressHandling
29/56 Test #29: KatranLbTest.invalidAddressHandling ..................   Passed    0.01 sec
      Start 30: KatranLbTest.addInvalidSrcRoutingRule
30/56 Test #30: KatranLbTest.addInvalidSrcRoutingRule ................   Passed    0.01 sec
      Start 31: KatranLbTest.addValidSrcRoutingRuleV4
31/56 Test #31: KatranLbTest.addValidSrcRoutingRuleV4 ................   Passed    0.01 sec
      Start 32: KatranLbTest.addValidSrcRoutingRuleV6
32/56 Test #32: KatranLbTest.addValidSrcRoutingRuleV6 ................   Passed    0.01 sec
      Start 33: KatranLbTest.addMaxSrcRules
33/56 Test #33: KatranLbTest.addMaxSrcRules ..........................   Passed    0.01 sec
      Start 34: KatranLbTest.delSrcRules
34/56 Test #34: KatranLbTest.delSrcRules .............................   Passed    0.01 sec
      Start 35: KatranLbTest.clearSrcRules
35/56 Test #35: KatranLbTest.clearSrcRules ...........................   Passed    0.01 sec
      Start 36: KatranLbTest.addFewInvalidNets
36/56 Test #36: KatranLbTest.addFewInvalidNets .......................   Passed    0.01 sec
      Start 37: KatranLbTest.addInvalidDecapDst
37/56 Test #37: KatranLbTest.addInvalidDecapDst ......................   Passed    0.01 sec
      Start 38: KatranLbTest.addInvalidDecapDstNet
38/56 Test #38: KatranLbTest.addInvalidDecapDstNet ...................   Passed    0.01 sec
      Start 39: KatranLbTest.addValidDecapDst
39/56 Test #39: KatranLbTest.addValidDecapDst ........................   Passed    0.01 sec
      Start 40: KatranLbTest.delValidDecapDst
40/56 Test #40: KatranLbTest.delValidDecapDst ........................   Passed    0.01 sec
      Start 41: KatranLbTest.delInvalidDecapDst
41/56 Test #41: KatranLbTest.delInvalidDecapDst ......................   Passed    0.01 sec
      Start 42: KatranLbTest.addMaxDecapDst
42/56 Test #42: KatranLbTest.addMaxDecapDst ..........................   Passed    0.01 sec
      Start 43: VipTestF.testBatchUpdateReals
43/56 Test #43: VipTestF.testBatchUpdateReals ........................   Passed    0.04 sec
      Start 44: VipTestF.testBatchUpdateRealsWeight
44/56 Test #44: VipTestF.testBatchUpdateRealsWeight ..................   Passed    0.05 sec
      Start 45: VipTestF.testGetRealsAndWeight
45/56 Test #45: VipTestF.testGetRealsAndWeight .......................   Passed    0.01 sec
      Start 46: VipTestF.testGetReals
46/56 Test #46: VipTestF.testGetReals ................................   Passed    0.02 sec
      Start 47: VipTest.testAddRemoveReal
47/56 Test #47: VipTest.testAddRemoveReal ............................   Passed    0.01 sec
      Start 48: EventPipeCallbackTest.SimpleCallbackTest
48/56 Test #48: EventPipeCallbackTest.SimpleCallbackTest .............   Passed    0.01 sec
      Start 49: EventPipeCallbackTest.LargeWriteTest
49/56 Test #49: EventPipeCallbackTest.LargeWriteTest .................   Passed    0.15 sec
      Start 50: TestMonitoringServiceCore.SimpleAcceptSubscription
50/56 Test #50: TestMonitoringServiceCore.SimpleAcceptSubscription ...   Passed    0.01 sec
      Start 51: TestMonitoringServiceCore.SimpleErrors
51/56 Test #51: TestMonitoringServiceCore.SimpleErrors ...............   Passed    0.01 sec
      Start 52: TestMonitoringServiceCore.EventIntersection
52/56 Test #52: TestMonitoringServiceCore.EventIntersection ..........   Passed    0.01 sec
      Start 53: TestMonitoringServiceCore.RacingClients
53/56 Test #53: TestMonitoringServiceCore.RacingClients ..............   Passed    0.01 sec
      Start 54: TestMonitoringServiceCore.SubscribeAndCancel
54/56 Test #54: TestMonitoringServiceCore.SubscribeAndCancel .........   Passed    0.01 sec
      Start 55: PcapWriterTest.SingleWriter
55/56 Test #55: PcapWriterTest.SingleWriter ..........................   Passed    0.02 sec
      Start 56: PcapWriterTest.MultiWriter
56/56 Test #56: PcapWriterTest.MultiWriter ...........................   Passed    0.01 sec

100% tests passed, 0 tests failed out of 56

Total Test time (real) =   1.04 sec
+ cd ../testing/
+ ctest -v ./CMakeFiles ./CTestTestfile.cmake ./Makefile ./base64helpers-tests './base64helpers-tests[1]_include.cmake' './base64helpers-tests[1]_tests.cmake' ./cmake_install.cmake ./katran_tester ./libbase64_helpers.a ./libbpftester.a ./libkatran_test_provision.a ./libkatran_test_util.a ./libpcap_parser.a
ctest: /usr/local/lib/libcurl.so.4: no version information available (required by ctest)
Test project /home/ubuntu/ivanmorett/katran/_build/build/katran/lib/testing
    Start 1: Base64Tests.testEncode
1/2 Test #1: Base64Tests.testEncode ...........   Passed    0.01 sec
    Start 2: Base64Tests.testDecode
2/2 Test #2: Base64Tests.testDecode ...........   Passed    0.01 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =   0.01 sec
+ popd
~/ivanmorett/katran/_build
```

Differential Revision: D55108012

Pulled By: lima1756
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants