testRank.sh and testdnarank.sh failures on aarch64
Hi German,
As initially reported in Debian bug #1069691, there are test failures affecting testRank.sh and testdnarank.sh. The full test-suite.log shows:
===========================================
libmaus2 2.0.813: test/test-suite.log
===========================================
# TOTAL: 13
# PASS: 11
# SKIP: 0
# XFAIL: 0
# FAIL: 2
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: testRank.sh
=================
/home/emollier/libmaus2-2.0.813+ds/test /home/emollier/libmaus2-2.0.813+ds/test
/home/emollier/libmaus2-2.0.813+ds/test
[V] testing FastRank...done.
[V] testing RunLengthBitVector...done.
[V] testing E2Append:
[V]rank class libmaus2::rank::ERank222BAppend writer type libmaus2::bitio::BitWriterTemplate<unsigned long, unsigned long*, 9223372036854775808ul> data type unsigned long
[V] loop 1
[V] libmaus2::rank::ERank222BAppendDynamic loop 1
[V] loop 2
[V] libmaus2::rank::ERank222BAppendDynamic loop 2
[V] loop 3
[V] libmaus2::rank::ERank222BAppendDynamic loop 3
[V] loop 4
[V] libmaus2::rank::ERank222BAppendDynamic loop 4
[V] loop 5
[V] libmaus2::rank::ERank222BAppendDynamic loop 5
[V] testing WaveletTree rank/select random (size 128)...done.
[V] testing WaveletTree smaller/larger...done.
[V] testing CacheLineRank:
terminate called after throwing an instance of 'libmaus2::exception::LibMausException'
what(): AutoArray<unsigned long,alloc_type_memalign_cacheline> failed to allocate 1398102 elements (11184816 bytes)
current total allocation 11521707
/home/emollier/libmaus2-2.0.813+ds/src/.libs/libmaus2_stacktrace.so.2(libmaus2::stacktrace::StackTrace::StackTrace()+0x74)[0xffffb03b4b78]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/libmaus2_exception.so.2(libmaus2::exception::LibMausException::LibMausException()+0x40)[0xffffb0b92b30]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/testRank(libmaus2::autoarray::AutoArrayAllocate<unsigned long, (libmaus2::autoarray::alloc_type)2>::allocate(unsigned long)+0xc4)[0xaaaae4c5c2c4]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/testRank(testCacheLineRank()+0x88)[0xaaaae4c3d318]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/testRank(main+0x134)[0xaaaae4c2b834]
/lib/aarch64-linux-gnu/libc.so.6(+0x27644)[0xffffb05f7644]
/lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0x98)[0xffffb05f7718]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/testRank(_start+0x30)[0xaaaae4c2c5f0]
./testRank.sh: line 7: 205795 Aborted ../src/testRank
Exiting with return code 134
FAIL testRank.sh (exit status: 134)
FAIL: testdnarank.sh
====================
/home/emollier/libmaus2-2.0.813+ds/test /home/emollier/libmaus2-2.0.813+ds/test
/home/emollier/libmaus2-2.0.813+ds/test
[V] running short tests...
AutoArray<unsigned long,alloc_type_memalign_cacheline> failed to allocate 16 elements (128 bytes)
current total allocation 341115
/home/emollier/libmaus2-2.0.813+ds/src/.libs/libmaus2_stacktrace.so.2(libmaus2::stacktrace::StackTrace::StackTrace()+0x74)[0xffffaeba4b78]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/libmaus2_exception.so.2(libmaus2::exception::LibMausException::LibMausException()+0x40)[0xffffaf2e2b30]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/testdnarank(libmaus2::autoarray::AutoArrayAllocate<unsigned long, (libmaus2::autoarray::alloc_type)2>::allocate(unsigned long)+0xc4)[0xaaaab8fa0e24]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/testdnarank(libmaus2::rank::DNARankTemplate<64u>::loadFromRunLength(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, unsigned long)+0x108)[0xaaaab8facfd8]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/testdnarank(void testShort<libmaus2::rank::DNARankTemplate<64u> >(unsigned long)+0x27c)[0xaaaab8fd08bc]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/testdnarank(main+0x15c)[0xaaaab8f816cc]
/lib/aarch64-linux-gnu/libc.so.6(+0x27644)[0xffffaede7644]
/lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0x98)[0xffffaede7718]
/home/emollier/libmaus2-2.0.813+ds/src/.libs/testdnarank(_start+0x30)[0xaaaab8f81970]
Exiting with return code 1
FAIL testdnarank.sh (exit status: 1)
There is something interesting though, when running the test in qemu-user context (executing the Aarch64 binaries on a x86_64 machine through qemu but still using the x86_64 kernel instead of booting a full fledged aarch64 virtual machine), both tests are passing. In case the reproducibility of the test failure is heavily hardware dependent, I saw the tests fail with the following CPU (I'm not sure of the exact make as this is a virtual Aarch64 machine on top of an Aarch64 hypervisor which I do not administrate):
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Vendor ID: ARM
Model name: Neoverse-N1
Model: 1
Thread(s) per core: 1
Core(s) per cluster: 8
Socket(s): -
Cluster(s): 1
Stepping: r3p1
BogoMIPS: 50.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
NUMA node(s): 1
NUMA node0 CPU(s): 0-7
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Mitigation; CSV2, BHB
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
I'm not sure where to look next to help debug the issue. In hope you have an idea.
Have a nice day, :)
Étienne.