Failure during build package in Debian. Test fails with a Segmentation fault
sbrun opened this issue · comments
Sophie Brun commented
I'm working on the Kali / Debian packages update.
Expected behavior
The tests must not fail.
Actual behavior
The build of openvas-scanner 21.4.0 fails when running the tests:
1/2 Test #1: pcap-test ........................ Passed 0.01 sec
2/2 Test #2: attack-test ......................***Failed 0.02 sec
Running "main" (3 tests)...
./src/attack_tests.c:82: Exception: comm_send_status_sends_correct_text
Test terminated with signal: Segmentation fault
"main": 5 passes, 1 exception in 5ms.
Completed "main": 5 passes, 1 exception in 5ms.
50% tests passed, 1 tests failed out of 2
Total Test time (real) = 0.03 sec
The following tests FAILED:
2 - attack-test (Failed)
Errors while running CTest
make[2]: *** [Makefile:119 : test] Erreur 8
Steps to reproduce
- I built the latest version of gvm-libs (21.4.0). The package can be found in kali-experimental repository.
- I tried to build openvas-scanner.
If tests are skipped, the build works.
GVM versions
**openvas: 21.4.0
**gvm-libs: 21.4.0
(other gvm components are not used for the build).
Environment
Operating system:
Debian Unstable
Linux 5.10.28-1 x86_64 GNU/Linux
Installation method / source:
I'm using the tagged releases of gvm-libs and openvas-scanner (not a git snapshot).
Logfiles
Of course I have no logfile, but the backtrace:
#0 0x00007fffffffd4c0 in ()
#1 0x000055555555a210 in kb_lnk_reset (kb=0x7fffffffd428) at /usr/include/gvm/util/kb.h:660
#2 comm_send_status (max=67, curr=11, hostname=0x555555562053 "127.0.0.1", main_kb=<optimized out>)
at ./src/attack.c:174
#3 attack__comm_send_status_sends_correct_text () at ./src/attack_tests.c:97
#4 0x00007ffff7f2ecfd in run_the_test_code () at /usr/lib/x86_64-linux-gnu/libcgreen.so.1
#5 0x00007ffff7f2edac in () at /usr/lib/x86_64-linux-gnu/libcgreen.so.1
#6 0x00007ffff7f2f02c in () at /usr/lib/x86_64-linux-gnu/libcgreen.so.1
#7 0x00007ffff7f2f0e7 in run_single_test () at /usr/lib/x86_64-linux-gnu/libcgreen.so.1
#8 0x00007ffff780bd0a in __libc_start_main (main=
0x555555559c40 <main>, argc=2, argv=0x7fffffffdee8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffded8) at ../csu/libc-start.c:308
#9 0x0000555555559d0a in _start ()
/cc @bjoernricks
Juan José Nicola commented
I could reproduce it, but only with cmake -DCMAKE_BUILD_TYPE=Release ..