Bug #1337
closed2.13.0,master: test crash if built with -Wl,-Bsymbolic-functions
0%
Description
Hello,
since 2.13.0 (also in current master) I'm getting test failures when building ust in Ubuntu, which fail the package build. After some troubleshooting, looks like it's the -Wl,-Bsymbolic-functions flag we pass to the linker. That is something Ubuntu has been doing for years, and it doesn't affect 2.12.2 (probably because the test didn't exist there?).
My build command-line:
LDFLAGS="-Wl,-Bsymbolic-functions" ./bootstrap 2>&1 | tee ../build.log && LDFLAGS="-Wl,-Bsymbolic-functions" ./configure --disable-man-pages 2>&1 | tee -a ../build.log; make -j4 2>&1 | tee -a ../build.log; make check 2>&1 | tee -a ../build.log
If I don't set LDFLAGS like that, the tests pass.
I did a bisect between 2.12.2 and 2.13.0, and the commit that started failing is the one that added the tests:
6825ea4493cbd97e428def01d1cf3b94477e4912 is the first bad commit
commit 6825ea4493cbd97e428def01d1cf3b94477e4912
Author: Michael Jeanson <mjeanson@efficios.com>
Date: Tue Apr 27 12:14:15 2021 -0400
Add abi0 conflict tests
Add tests to make sure abi0 detection works properly in different
linking and dlopen scenarios.
I can't tell if the test is wrong, or if it's showing a real problem that has been lurking for quite some time.
Here is the output from master:...
- regression/abi0-conflict/test_abi0_conflict: dlopen
PASS: regression/abi0-conflict/test_abi0_conflict 9 - dlopen: no-ust app works
PASS: regression/abi0-conflict/test_abi0_conflict 10 - dlopen: no-ust app with abi1 and abi1 succeeds
PASS: regression/abi0-conflict/test_abi0_conflict 11 - dlopen: no-ust app with abi0 and abi1 fails
FAIL: regression/abi0-conflict/test_abi0_conflict 12 - dlopen: no-ust app with abi1 and abi0 fails - regression/abi0-conflict/test_abi0_conflict: Failed test 'dlopen: no-ust app with abi1 and abi0 fails'
- regression/abi0-conflict/test_abi0_conflict: in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- regression/abi0-conflict/test_abi0_conflict: got: '0'
- regression/abi0-conflict/test_abi0_conflict: expected: '0'
PASS: regression/abi0-conflict/test_abi0_conflict 13 - dlopen: ust app works
FAIL: regression/abi0-conflict/test_abi0_conflict 14 - dlopen: ust app with abi0 fails - regression/abi0-conflict/test_abi0_conflict: Failed test 'dlopen: ust app with abi0 fails'
- regression/abi0-conflict/test_abi0_conflict: in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- regression/abi0-conflict/test_abi0_conflict: got: '0'
- regression/abi0-conflict/test_abi0_conflict: expected: '0'
FAIL: regression/abi0-conflict/test_abi0_conflict 15 - dlopen: ust app with abi0 and abi1 fails - regression/abi0-conflict/test_abi0_conflict: Failed test 'dlopen: ust app with abi0 and abi1 fails'
- regression/abi0-conflict/test_abi0_conflict: in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- regression/abi0-conflict/test_abi0_conflict: got: '0'
- regression/abi0-conflict/test_abi0_conflict: expected: '0'
FAIL: regression/abi0-conflict/test_abi0_conflict 16 - dlopen: ust app with abi1 and abi0 fails - regression/abi0-conflict/test_abi0_conflict: Failed test 'dlopen: ust app with abi1 and abi0 fails'
- regression/abi0-conflict/test_abi0_conflict: in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- regression/abi0-conflict/test_abi0_conflict: got: '0'
- regression/abi0-conflict/test_abi0_conflict: expected: '0'
- regression/abi0-conflict/test_abi0_conflict: Indirect linking
PASS: regression/abi0-conflict/test_abi0_conflict 17 - indirect: no-ust app with abi0 succeeds
PASS: regression/abi0-conflict/test_abi0_conflict 18 - indirect: no-ust app with abi1 succeeds
PASS: regression/abi0-conflict/test_abi0_conflict 19 - indirect: no-ust app with abi0 and abi1 fails
PASS: regression/abi0-conflict/test_abi0_conflict 20 - indirect: ust app with abi0 fails
PASS: regression/abi0-conflict/test_abi0_conflict 21 - indirect: ust app with abi1 succeeds
PASS: regression/abi0-conflict/test_abi0_conflict 22 - indirect: ust app with abi0 and abi1 fails - regression/abi0-conflict/test_abi0_conflict: Looks like you failed 4 tests of 22.
ERROR: regression/abi0-conflict/test_abi0_conflict - exited with status 4 ============================================================================
Testsuite summary for lttng-ust 2.14.0-pre ============================================================================ - TOTAL: 246
- PASS: 241
- SKIP: 0
- XFAIL: 0
- FAIL: 4
- XPASS: 0
- ERROR: 1
============================================================================
See tests/test-suite.log
Please report to mathieu dot desnoyers at efficios dot com
And test-suite.log shows core dumps:
$ cat tests/test-suite.log
================================================
lttng-ust 2.14.0-pre: tests/test-suite.log
================================================
- TOTAL: 246
- PASS: 241
- SKIP: 0
- XFAIL: 0
- FAIL: 4
- XPASS: 0
- ERROR: 1
.. contents:: :depth: 2
ERROR: regression/abi0-conflict/test_abi0_conflict ==================================================
1..22- LD_PRELOAD
- regression/abi0-conflict/test_abi0_conflict: LD_PRELOAD
ok 1 - LD_PRELOAD: no-ust app works
PASS: regression/abi0-conflict/test_abi0_conflict 1 - LD_PRELOAD: no-ust app works
ok 2 - LD_PRELOAD: no-ust app with abi0 preload succeeds
PASS: regression/abi0-conflict/test_abi0_conflict 2 - LD_PRELOAD: no-ust app with abi0 preload succeeds
./regression/abi0-conflict/test_abi0_conflict: line 56: 592651 Aborted (core dumped) LD_PRELOAD="${LIBFAKEUST0}:${LIBUST1}" "${CURDIR}/app_noust" > "$STD_OUTPUT" 2> "$STD_ERROR"
ok 3 - LD_PRELOAD: no-ust app with abi0 and abi1 preload fails
PASS: regression/abi0-conflict/test_abi0_conflict 3 - LD_PRELOAD: no-ust app with abi0 and abi1 preload fails
./regression/abi0-conflict/test_abi0_conflict: line 59: 592652 Aborted (core dumped) LD_PRELOAD="${LIBUST1}:${LIBFAKEUST0}" "${CURDIR}/app_noust" > "$STD_OUTPUT" 2> "$STD_ERROR"
ok 4 - LD_PRELOAD: no-ust app with abi1 and abi0 preload fails
PASS: regression/abi0-conflict/test_abi0_conflict 4 - LD_PRELOAD: no-ust app with abi1 and abi0 preload fails
ok 5 - LD_PRELOAD: ust app works
PASS: regression/abi0-conflict/test_abi0_conflict 5 - LD_PRELOAD: ust app works
./regression/abi0-conflict/test_abi0_conflict: line 68: 592669 Aborted (core dumped) LD_PRELOAD="${LIBFAKEUST0}" "${CURDIR}/app_ust" > "$STD_OUTPUT" 2> "$STD_ERROR"
ok 6 - LD_PRELOAD: ust app with abi0 preload fails
PASS: regression/abi0-conflict/test_abi0_conflict 6 - LD_PRELOAD: ust app with abi0 preload fails
./regression/abi0-conflict/test_abi0_conflict: line 71: 592683 Aborted (core dumped) LD_PRELOAD="${LIBFAKEUST0}:${LIBUST1}" "${CURDIR}/app_ust" > "$STD_OUTPUT" 2> "$STD_ERROR"
ok 7 - LD_PRELOAD: ust app with abi0 and abi1 preload fails
PASS: regression/abi0-conflict/test_abi0_conflict 7 - LD_PRELOAD: ust app with abi0 and abi1 preload fails
./regression/abi0-conflict/test_abi0_conflict: line 74: 592684 Aborted (core dumped) LD_PRELOAD="${LIBUST1}:${LIBFAKEUST0}" "${CURDIR}/app_ust" > "$STD_OUTPUT" 2> "$STD_ERROR"
ok 8 - LD_PRELOAD: ust app with abi1 and abi0 preload fails
PASS: regression/abi0-conflict/test_abi0_conflict 8 - LD_PRELOAD: ust app with abi1 and abi0 preload fails - dlopen
- regression/abi0-conflict/test_abi0_conflict: dlopen
ok 9 - dlopen: no-ust app works
PASS: regression/abi0-conflict/test_abi0_conflict 9 - dlopen: no-ust app works
ok 10 - dlopen: no-ust app with abi1 and abi1 succeeds
PASS: regression/abi0-conflict/test_abi0_conflict 10 - dlopen: no-ust app with abi1 and abi1 succeeds
./regression/abi0-conflict/test_abi0_conflict: line 92: 592689 Aborted (core dumped) LD_LIBRARY_PATH="$LIBFAKEUST0_PATH:$LIBUST1_PATH" "${CURDIR}/app_noust_dlopen" abi0_abi1 > "$STD_OUTPUT" 2> "$STD_ERROR"
ok 11 - dlopen: no-ust app with abi0 and abi1 fails
PASS: regression/abi0-conflict/test_abi0_conflict 11 - dlopen: no-ust app with abi0 and abi1 fails
not ok 12 - dlopen: no-ust app with abi1 and abi0 fails
FAIL: regression/abi0-conflict/test_abi0_conflict 12 - dlopen: no-ust app with abi1 and abi0 fails - Failed test 'dlopen: no-ust app with abi1 and abi0 fails'
- regression/abi0-conflict/test_abi0_conflict: Failed test 'dlopen: no-ust app with abi1 and abi0 fails'
- in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- regression/abi0-conflict/test_abi0_conflict: in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- got: '0'
- regression/abi0-conflict/test_abi0_conflict: got: '0'
- expected: '0'
- regression/abi0-conflict/test_abi0_conflict: expected: '0'
ok 13 - dlopen: ust app works
PASS: regression/abi0-conflict/test_abi0_conflict 13 - dlopen: ust app works
not ok 14 - dlopen: ust app with abi0 fails
FAIL: regression/abi0-conflict/test_abi0_conflict 14 - dlopen: ust app with abi0 fails - Failed test 'dlopen: ust app with abi0 fails'
- regression/abi0-conflict/test_abi0_conflict: Failed test 'dlopen: ust app with abi0 fails'
- in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- regression/abi0-conflict/test_abi0_conflict: in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- got: '0'
- regression/abi0-conflict/test_abi0_conflict: got: '0'
- expected: '0'
- regression/abi0-conflict/test_abi0_conflict: expected: '0'
not ok 15 - dlopen: ust app with abi0 and abi1 fails
FAIL: regression/abi0-conflict/test_abi0_conflict 15 - dlopen: ust app with abi0 and abi1 fails - Failed test 'dlopen: ust app with abi0 and abi1 fails'
- regression/abi0-conflict/test_abi0_conflict: Failed test 'dlopen: ust app with abi0 and abi1 fails'
- in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- regression/abi0-conflict/test_abi0_conflict: in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- got: '0'
- regression/abi0-conflict/test_abi0_conflict: got: '0'
- expected: '0'
- regression/abi0-conflict/test_abi0_conflict: expected: '0'
not ok 16 - dlopen: ust app with abi1 and abi0 fails
FAIL: regression/abi0-conflict/test_abi0_conflict 16 - dlopen: ust app with abi1 and abi0 fails - Failed test 'dlopen: ust app with abi1 and abi0 fails'
- regression/abi0-conflict/test_abi0_conflict: Failed test 'dlopen: ust app with abi1 and abi0 fails'
- in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- regression/abi0-conflict/test_abi0_conflict: in /home/ubuntu/git/packages/ust/lttng-ust/tests/utils/tap.sh:isnt() at line 300.
- got: '0'
- regression/abi0-conflict/test_abi0_conflict: got: '0'
- expected: '0'
- regression/abi0-conflict/test_abi0_conflict: expected: '0'
- Indirect linking
- regression/abi0-conflict/test_abi0_conflict: Indirect linking
ok 17 - indirect: no-ust app with abi0 succeeds
PASS: regression/abi0-conflict/test_abi0_conflict 17 - indirect: no-ust app with abi0 succeeds
ok 18 - indirect: no-ust app with abi1 succeeds
PASS: regression/abi0-conflict/test_abi0_conflict 18 - indirect: no-ust app with abi1 succeeds
./regression/abi0-conflict/test_abi0_conflict: line 131: 592803 Aborted (core dumped) "${CURDIR}/app_noust_indirect_abi0_abi1" > "$STD_OUTPUT" 2> "$STD_ERROR"
ok 19 - indirect: no-ust app with abi0 and abi1 fails
PASS: regression/abi0-conflict/test_abi0_conflict 19 - indirect: no-ust app with abi0 and abi1 fails
./regression/abi0-conflict/test_abi0_conflict: line 136: 592817 Aborted (core dumped) "${CURDIR}/app_ust_indirect_abi0" > "$STD_OUTPUT" 2> "$STD_ERROR"
ok 20 - indirect: ust app with abi0 fails
PASS: regression/abi0-conflict/test_abi0_conflict 20 - indirect: ust app with abi0 fails
ok 21 - indirect: ust app with abi1 succeeds
PASS: regression/abi0-conflict/test_abi0_conflict 21 - indirect: ust app with abi1 succeeds
./regression/abi0-conflict/test_abi0_conflict: line 142: 592847 Aborted (core dumped) "${CURDIR}/app_ust_indirect_abi0_abi1" > "$STD_OUTPUT" 2> "$STD_ERROR"
ok 22 - indirect: ust app with abi0 and abi1 fails
PASS: regression/abi0-conflict/test_abi0_conflict 22 - indirect: ust app with abi0 and abi1 fails - Looks like you failed 4 tests of 22.
- regression/abi0-conflict/test_abi0_conflict: Looks like you failed 4 tests of 22.
ERROR: regression/abi0-conflict/test_abi0_conflict - exited with status 4
Files