-
Notifications
You must be signed in to change notification settings - Fork 299
Description
Debian build logs of xsimd 10.0.0 at https://buildd.debian.org/status/package.php?p=xsimd&suite=experimental are showing test failures on armhf. Should xsimd tests pass in scalar mode on "non-supported" architectures? Should armhf (armv8l) be considered supported? (it has NEON instructions)
A build log for armhf is found at https://buildd.debian.org/status/fetch.php?pkg=xsimd&arch=armhf&ver=10.0.0-1&stamp=1674485753&raw=0 with error
Start 1: test_xsimd
1: Test command: /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/test/test_xsimd
1: Working Directory: /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/test
1: Test timeout computed to be: 10000000
1: test_xsimd: ./include/xsimd/types/xsimd_batch.hpp:567: void xsimd::batch<T, A>::store_aligned(U*) const [with U = unsigned char; T = unsigned char; A = xsimd::neon]: Assertion `((reinterpret_cast<uintptr_t>(mem) % A::alignment()) == 0) && "store location is not properly aligned"' failed.
1: [doctest] doctest version is "2.4.9"
1: [doctest] run with "--help" for options
1: ===============================================================================
1: ./test/test_batch.cpp:811:
1: TEST CASE: [batch]<xsimd::batch<unsigned char>>
1: horizontal_operations
1:
1: ./test/test_batch.cpp:811: FATAL ERROR: test case CRASHED: SIGABRT - Abort (abnormal termination) signal
1:
1: ===============================================================================
1: ./test/test_batch.cpp:811:
1: TEST CASE: [batch]<xsimd::batch<unsigned char>>
1:
1: DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
1: horizontal_operations
1:
1: ===============================================================================
1: [doctest] test cases: 13 | 12 passed | 1 failed | 218 skipped
1: [doctest] assertions: 517 | 517 passed | 0 failed |
1: [doctest] Status: FAILURE!
1/1 Test #1: test_xsimd .......................Subprocess aborted***Exception: 0.01 sec
test_xsimd: ./include/xsimd/types/xsimd_batch.hpp:567: void xsimd::batch<T, A>::store_aligned(U*) const [with U = unsigned char; T = unsigned char; A = xsimd::neon]: Assertion `((reinterpret_cast<uintptr_t>(mem) % A::alignment()) == 0) && "store location is not properly aligned"' failed.
[doctest] doctest version is "2.4.9"
[doctest] run with "--help" for options
===============================================================================
./test/test_batch.cpp:811:
TEST CASE: [batch]<xsimd::batch<unsigned char>>
horizontal_operations
./test/test_batch.cpp:811: FATAL ERROR: test case CRASHED: SIGABRT - Abort (abnormal termination) signal
===============================================================================
./test/test_batch.cpp:811:
TEST CASE: [batch]<xsimd::batch<unsigned char>>
DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
horizontal_operations
===============================================================================
[doctest] test cases: 13 | 12 passed | 1 failed | 218 skipped
[doctest] assertions: 517 | 517 passed | 0 failed |
[doctest] Status: FAILURE!
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.01 sec
The following tests FAILED:
1 - test_xsimd (Subprocess aborted)
On a debian armhf machine I can reproduce the error manually. gdb then gives a backtrace identifying the same problem "store location is not properly aligned".
Reading symbols from ./test_xsimd...
(gdb) run
Starting program: /home/xsimd/xsimd-10.0.0/obj-arm-linux-gnueabihf/test/test_xsimd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[doctest] doctest version is "2.4.9"
[doctest] run with "--help" for options
test_xsimd: ./include/xsimd/types/xsimd_batch.hpp:567: void xsimd::batch<T, A>::store_aligned(U*) const [with U = unsigned char; T = unsigned char; A = xsimd::neon]: Assertion `((reinterpret_cast<uintptr_t>(mem) % A::alignment()) == 0) && "store location is not properly aligned"' failed.
Program received signal SIGABRT, Aborted.
__libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
47 ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or directory.
(gdb) bt
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
#1 0xf7cce42c in __pthread_kill_implementation (threadid=4160618528, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:43
#2 0xf7cce470 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#3 0xf7c9d322 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0xf7c8e0ac in __GI_abort () at abort.c:79
#5 0xf7c98850 in __assert_fail_base (fmt=0x20 <error: Cannot access memory at address 0x20>, assertion=0x122e7dc "((reinterpret_cast<uintptr_t>(mem) % A::alignment()) == 0) && \"store location is not properly aligned\"", assertion@entry=0xfffeed60 "",
file=file@entry=0x20 <error: Cannot access memory at address 0x20>, line=line@entry=567, function=0x122e76c "void xsimd::batch<T, A>::store_aligned(U*) const [with U = unsigned char; T = unsigned char; A = xsimd::neon]", function@entry=0xf7fe0020 "") at assert.c:92
#6 0xf7c988ce in __GI___assert_fail (assertion=0xfffeed60 "", file=0x20 <error: Cannot access memory at address 0x20>, line=567, function=0xf7fe0020 "") at assert.c:101
#7 0x00eb4c86 in xsimd::batch<unsigned char, xsimd::neon>::store_aligned<unsigned char> (mem=0xfffeee68 "`b@\001\060\357\376\377\250\356\376\377\267\356\376\377$b@\001\307\356\376\377\001\001\001\001\001\001\001\001 a?\001\001\001\001\001 a?\001\001\062<F", this=<optimized out>)
at ./include/xsimd/types/xsimd_batch.hpp:567
#8 0x00f2c8b0 in xsimd::batch<unsigned char, xsimd::neon>::store_aligned<unsigned char> (mem=<optimized out>, this=<optimized out>) at ./test/test_batch.cpp:707
#9 xsimd::kernel::swizzle<xsimd::neon, unsigned char, unsigned char, (unsigned char)8, (unsigned char)9, (unsigned char)10, (unsigned char)11, (unsigned char)12, (unsigned char)13, (unsigned char)14, (unsigned char)15, (unsigned char)0, (unsigned char)1, (unsigned char)0, (unsigned char)1, (unsigned char)0, (unsigned char)1, (unsigned char)0, (unsigned char)1> (self=...) at ./include/xsimd/types/../arch/./xsimd_neon.hpp:2602
#10 xsimd::swizzle<unsigned char, xsimd::neon, unsigned char, (unsigned char)8, (unsigned char)9, (unsigned char)10, (unsigned char)11, (unsigned char)12, (unsigned char)13, (unsigned char)14, (unsigned char)15, (unsigned char)0, (unsigned char)1, (unsigned char)0, (unsigned char)1, (unsigned char)0, (unsigned char)1, (unsigned char)0, (unsigned char)1> (mask=..., x=...) at ./include/xsimd/types/xsimd_api.hpp:2048
#11 xsimd::kernel::detail::reduce<xsimd::kernel::reduce_max<xsimd::neon, unsigned char>(xsimd::batch<unsigned char, xsimd::neon> const&, xsimd::generic const&)::{lambda(xsimd::batch<unsigned char, xsimd::neon> const&, xsimd::batch<unsigned char, xsimd::neon> const&)#1}, xsimd::neon, unsigned char, 16u>(xsimd::kernel::reduce_max<xsimd::neon, unsigned char>(xsimd::batch<unsigned char, xsimd::neon> const&, xsimd::generic const&)::{lambda(xsimd::batch<unsigned char, xsimd::neon> const&, xsimd::batch<unsigned char, xsimd::neon> const&)#1}, xsimd::batch<unsigned char, xsimd::neon> const&, std::integral_constant<unsigned int, 16u>) (op=..., self=...) at ./include/xsimd/types/../arch/././generic/xsimd_generic_math.hpp:2000
#12 xsimd::kernel::reduce_max<xsimd::neon, unsigned char> (self=...) at ./include/xsimd/types/../arch/././generic/xsimd_generic_math.hpp:2009
#13 xsimd::reduce_max<unsigned char, xsimd::neon> (x=...) at ./include/xsimd/types/xsimd_api.hpp:905
#14 batch_test<xsimd::batch<unsigned char, xsimd::neon> >::test_horizontal_operations (this=this@entry=0xfffef050) at ./test/test_batch.cpp:708
#15 0x00eb8888 in DOCTEST_ANON_TMP_623<xsimd::batch<unsigned char> > () at ./test/test_batch.cpp:881
#16 0x00e1c036 in doctest::Context::run (this=this@entry=0xfffef3f0) at /usr/include/doctest/doctest.h:6930
#17 0x00e07bf6 in main (argc=<optimized out>, argv=<optimized out>) at /usr/include/doctest/doctest.h:7008
The backtrace references xsimd::neon. Should neon be considered to only be supported on arm64, not on armhf? Does a patch (or environment variable) need to be given to prevent xsimd::neon from being accessed in an armhf system?
The test system itself is in fact an arm64 (aarch64) machine. The test build is running in an armhf (armv8l) chroot on that machine. Nevertheless, the same machine also has an armel (armv8l) chroot, and the xsimd tests pass inside the armel chroot:
(sid_armel-dchroot)amdahl:~/xsimd/xsimd-10.0.0/obj-arm-linux-gnueabi/test$ ./test_xsimd
[doctest] doctest version is "2.4.9"
[doctest] run with "--help" for options
===============================================================================
[doctest] test cases: 52 | 52 passed | 0 failed | 0 skipped
[doctest] assertions: 508 | 508 passed | 0 failed |
[doctest] Status: SUCCESS!