Autopkgtest failures on amd64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-10 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Noble |
Won't Fix
|
Undecided
|
Unassigned | ||
gcc-11 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Undecided
|
Unassigned | ||
gcc-12 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Undecided
|
Unassigned | ||
gcc-13 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Undecided
|
Unassigned | ||
gcc-8 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Noble |
Invalid
|
Undecided
|
Unassigned | ||
gcc-9 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Noble |
Won't Fix
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Undecided
|
Unassigned | ||
llvm-toolchain-14 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Noble |
Won't Fix
|
Undecided
|
Unassigned | ||
llvm-toolchain-15 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Noble |
Won't Fix
|
Undecided
|
Unassigned | ||
llvm-toolchain-16 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Noble |
Confirmed
|
Undecided
|
Unassigned |
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 *******
746s Script:
746s --
746s : 'RUN: at line 4'; /usr/bin/clang-14 -o /tmp/autopkgtes
746s : 'RUN: at line 5'; env ASAN_OPTIONS=
746s : 'RUN: at line 6'; grep -q "detected memory leaks" /tmp/autopkgtes
746s --
746s Exit Code: 139
746s
746s Command Output (stderr):
746s --
746s /tmp/autopkgtes
--------------
If you run the test manually you'll notice that it works but eventually crashes:
-------
ubuntu@
=======
==8631==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 7 byte(s) in 1 object(s) allocated from:
#0 0x5e9c3441ed12 in __interceptor_
#1 0x5e9c3445acb8 in main /tmp/autopkgtes
#2 0x7e84e1e280cf (/lib/x86_
SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
ubuntu@
=======
==8634==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 7 byte(s) in 1 object(s) allocated from:
#0 0x5f19be5f6d12 in __interceptor_
#1 0x5f19be632cb8 in main /tmp/autopkgtes
#2 0x77c7d3c280cf (/lib/x86_
SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
ubuntu@
Segmentation fault (core dumped)
-------
After some investigation I found that it will not fail with ASLR disabled:
sudo sysctl kernel.
while : ; do env ASAN_OPTIONS=
If you enable ASLR it will start to crash:
$ sudo sysctl kernel.
$ while : ; do env ASAN_OPTIONS=
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.
description: | updated |
description: | updated |
description: | updated |
description: | updated |
no longer affects: | llvm-toolchain-17 (Ubuntu) |
no longer affects: | llvm-toolchain-18 (Ubuntu) |
no longer affects: | llvm-toolchain-17 (Ubuntu Noble) |
no longer affects: | llvm-toolchain-18 (Ubuntu Noble) |
Changed in gcc-13 (Ubuntu Noble): | |
status: | New → Fix Committed |
no longer affects: | gcc-14 (Ubuntu) |
no longer affects: | gcc-14 (Ubuntu Noble) |
Changed in gcc-8 (Ubuntu Noble): | |
status: | New → Invalid |
After some more digging, this problem is affecting builds with ASAN (address sanitizer) in LLVM 17 too (and likely 16) and also GCC.
Running the netplan.io tests with ASAN (built with gcc) on Noble will lead to crashes:
+ ./_leakcheckbui ld/tests/ ctests/ test_netplan_ validation r:DEADLYSIGNAL r:DEADLYSIGNAL r:DEADLYSIGNAL r:DEADLYSIGNAL r:DEADLYSIGNAL r:DEADLYSIGNAL r:DEADLYSIGNAL bin/netplan- leak-check. sh: line 19: 463561 Segmentation fault (core dumped) ./${test}
AddressSanitize
AddressSanitize
AddressSanitize
AddressSanitize
AddressSanitize
AddressSanitize
AddressSanitize
/home/danilo/
All these tests will run just fine if I disable ASLR (sudo sysctl kernel. randomize_ va_space= 0)
I'm running kernel 6.6.0-14-generic.
Checking llvm-toolchain-17 tests, after and before kernel 6.6 migrated in Noble, they are failing for different reasons:
Before: https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- noble/noble/ amd64/l/ llvm-toolchain- 17/20231227_ 142627_ 0e232@/ log.gz
613s wasm-ld-17: error: /usr/lib/ wasm32- wasi/libc+ +.a(stdlib_ new_delete. cpp.o): undefined symbol: __cxa_allocate_ exception wasm32- wasi/libc+ +.a(stdlib_ new_delete. cpp.o): undefined symbol: __cxa_throw
613s wasm-ld-17: error: /usr/lib/
After: https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- noble/noble/ amd64/l/ llvm-toolchain- 17/20240106_ 050845_ ecb23@/ log.gz
292s sanitize=address is failing
I can get to the same errors by disabling and re-enabling ASLR in my Noble test image.