[Bug 2048768] Re: Autopkgtest failures on amd64
Seth Arnold
2048768 at bugs.launchpad.net
Fri Mar 15 02:38:02 UTC 2024
I added llvm and gcc toolchains to the affected packages list here based
on some internet reports, not my own testing:
https://stackoverflow.com/questions/77894856/possible-bug-in-gcc-sanitizers
https://stackoverflow.com/questions/77826203/addresssanitizer-randomly-throws-sigsegv-with-no-explanation?noredirect=1&lq=1
https://github.com/llvm/llvm-project/commit/fb77ca05ffb4f8e666878f2f6718a9fb4d686839
https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/commit/15cbe5ecc28cc4f52a38bad5a5cecaaa8a66a020
https://github.com/actions/runner-images/issues/9491#issuecomment-1996621369
This looks like the most useful comment from the github runners issue:
https://github.com/actions/runner-
images/issues/9491#issuecomment-1989718917 -- I strongly suggest
starting here.
And thanks to Daniel Stenberg for bringing this to our attention:
https://mastodon.social/@bagder/112093452688780674
https://answers.launchpad.net/ubuntu/+source/llvm-toolchain-14/+question/709571
Thanks
** Bug watch added: github.com/actions/runner-images/issues #9491
https://github.com/actions/runner-images/issues/9491
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-10 in Ubuntu.
https://bugs.launchpad.net/bugs/2048768
Title:
Autopkgtest failures on amd64
Status in gcc-10 package in Ubuntu:
New
Status in gcc-11 package in Ubuntu:
New
Status in gcc-12 package in Ubuntu:
New
Status in gcc-13 package in Ubuntu:
New
Status in gcc-14 package in Ubuntu:
New
Status in gcc-8 package in Ubuntu:
New
Status in gcc-9 package in Ubuntu:
New
Status in linux package in Ubuntu:
Confirmed
Status in llvm-toolchain-14 package in Ubuntu:
Confirmed
Status in llvm-toolchain-15 package in Ubuntu:
New
Status in llvm-toolchain-16 package in Ubuntu:
New
Status in llvm-toolchain-17 package in Ubuntu:
New
Status in llvm-toolchain-18 package in Ubuntu:
New
Status in gcc-10 source package in Noble:
New
Status in gcc-11 source package in Noble:
New
Status in gcc-12 source package in Noble:
New
Status in gcc-13 source package in Noble:
New
Status in gcc-14 source package in Noble:
New
Status in gcc-8 source package in Noble:
New
Status in gcc-9 source package in Noble:
New
Status in linux source package in Noble:
Confirmed
Status in llvm-toolchain-14 source package in Noble:
Confirmed
Status in llvm-toolchain-15 source package in Noble:
New
Status in llvm-toolchain-16 source package in Noble:
New
Status in llvm-toolchain-17 source package in Noble:
New
Status in llvm-toolchain-18 source package in Noble:
New
Bug description:
Some tests related to the address sanitizer are occasionally failing
on amd64 (also for llvm-toolchain-15 and 16):
--------------
FAIL: LLVM regression suite :: test_leaksan.c (38 of 45)
746s ******************** TEST 'LLVM regression suite :: test_leaksan.c' FAILED ********************
746s Script:
746s --
746s : 'RUN: at line 4'; /usr/bin/clang-14 -o /tmp/autopkgtest.gHVujV/autopkgtest_tmp/build/tests/Output/test_leaksan.c.tmp -fsanitize=address -g /tmp/autopkgtest.gHVujV/autopkgtest_tmp/tests/test_leaksan.c
746s : 'RUN: at line 5'; env ASAN_OPTIONS="log_path=stdout:exitcode=0" /tmp/autopkgtest.gHVujV/autopkgtest_tmp/build/tests/Output/test_leaksan.c.tmp 2>&1 > /tmp/autopkgtest.gHVujV/autopkgtest_tmp/build/tests/Output/test_leaksan.c.tmp.out
746s : 'RUN: at line 6'; grep -q "detected memory leaks" /tmp/autopkgtest.gHVujV/autopkgtest_tmp/build/tests/Output/test_leaksan.c.tmp.out
746s --
746s Exit Code: 139
746s
746s Command Output (stderr):
746s --
746s /tmp/autopkgtest.gHVujV/autopkgtest_tmp/build/tests/Output/test_leaksan.c.script: line 3: 3335 Segmentation fault (core dumped) env ASAN_OPTIONS="log_path=stdout:exitcode=0" /tmp/autopkgtest.gHVujV/autopkgtest_tmp/build/tests/Output/test_leaksan.c.tmp 2>&1 > /tmp/autopkgtest.gHVujV/autopkgtest_tmp/build/tests/Output/test_leaksan.c.tmp.out
--------------
If you run the test manually you'll notice that it works but
eventually crashes:
--------------------
ubuntu at autopkgtest:/tmp/autopkgtest.oXC2FP/autopkgtest_tmp/build/tests/Output$ ./test_leaksan.c.tmp
=================================================================
==8631==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 7 byte(s) in 1 object(s) allocated from:
#0 0x5e9c3441ed12 in __interceptor_malloc (/tmp/autopkgtest.oXC2FP/autopkgtest_tmp/build/tests/Output/test_leaksan.c.tmp+0xa3d12) (BuildId: 6f71ac388125722ade1ea86ee3661c0d884dd193)
#1 0x5e9c3445acb8 in main /tmp/autopkgtest.oXC2FP/autopkgtest_tmp/tests/test_leaksan.c:13:7
#2 0x7e84e1e280cf (/lib/x86_64-linux-gnu/libc.so.6+0x280cf) (BuildId: f0b834daa3d05a80967e9ec2f990a1ea71c958fa)
SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
ubuntu at autopkgtest:/tmp/autopkgtest.oXC2FP/autopkgtest_tmp/build/tests/Output$ ./test_leaksan.c.tmp
=================================================================
==8634==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 7 byte(s) in 1 object(s) allocated from:
#0 0x5f19be5f6d12 in __interceptor_malloc (/tmp/autopkgtest.oXC2FP/autopkgtest_tmp/build/tests/Output/test_leaksan.c.tmp+0xa3d12) (BuildId: 6f71ac388125722ade1ea86ee3661c0d884dd193)
#1 0x5f19be632cb8 in main /tmp/autopkgtest.oXC2FP/autopkgtest_tmp/tests/test_leaksan.c:13:7
#2 0x77c7d3c280cf (/lib/x86_64-linux-gnu/libc.so.6+0x280cf) (BuildId: f0b834daa3d05a80967e9ec2f990a1ea71c958fa)
SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
ubuntu at autopkgtest:/tmp/autopkgtest.oXC2FP/autopkgtest_tmp/build/tests/Output$ ./test_leaksan.c.tmp
Segmentation fault (core dumped)
--------------------
After some investigation I found that it will not fail with ASLR
disabled:
sudo sysctl kernel.randomize_va_space=0
while : ; do env ASAN_OPTIONS="log_path=stdout:exitcode=0"
./test_leaksan.c.tmp >/dev/null; if [ $? -ne 0 ] ; then echo crashed ;
fi done
If you enable ASLR it will start to crash:
$ sudo sysctl kernel.randomize_va_space=2
$ while : ; do env ASAN_OPTIONS="log_path=stdout:exitcode=0" ./test_leaksan.c.tmp >/dev/null; if [ $? -ne 0 ] ; then echo crashed ; fi done
Segmentation fault (core dumped)
crashed
Segmentation fault (core dumped)
crashed
Segmentation fault (core dumped)
crashed
Segmentation fault (core dumped)
crashed
Segmentation fault (core dumped)
crashed
If you enable ASLR again and run it with "setarch -R" (to disable ASLR
for this binary), it will also not crash.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-10/+bug/2048768/+subscriptions
More information about the foundations-bugs
mailing list