Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1134689 > unrolled thread

Bug#1029568: xsimd: tests fail on armhf: Cannot access memory, store location is not properly aligned

Started byDrew Parsons <dparsons@debian.org>
First post2023-01-24 17:50 +0100
Last post2023-01-24 19:10 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1029568: xsimd: tests fail on armhf: Cannot access memory, store location is not properly aligned Drew Parsons <dparsons@debian.org> - 2023-01-24 17:50 +0100
    Bug#1029568: xsimd: tests fail on armhf: Cannot access memory, store location is not properly aligned Drew Parsons <dparsons@debian.org> - 2023-01-24 19:10 +0100

#1134689 — Bug#1029568: xsimd: tests fail on armhf: Cannot access memory, store location is not properly aligned

FromDrew Parsons <dparsons@debian.org>
Date2023-01-24 17:50 +0100
SubjectBug#1029568: xsimd: tests fail on armhf: Cannot access memory, store location is not properly aligned
Message-ID<FRuEF-QNa-19@gated-at.bofh.it>
Source: xsimd
Version: 10.0.0-1
Severity: normal
Control: forwarded -1 https://github.com/xtensor-stack/xsimd/issues/889

The build of xsimd 10.0.0-1 fails on armhf due to test failure:

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.

A gdb backtrace shows that xsimd::neon is involved:

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


It might be best to treat armhf as a non-supported arch
(i.e. don't run build-time tests, perhaps not debian/tests either)
at least until upstream resolves
https://github.com/xtensor-stack/xsimd/issues/889

That said, it might now be possible to treat armel as a supported
arch. Diagnosing the armhf problem on the Debian porterbox
amdahl.debian.org, the sigabrt is reproducible on an armhf chroot. But
testing also in a armel chroot, the tests pass.

xsimd is supposed to have fixed scalar tests on "non-supported"
architectures, e.g. https://github.com/xtensor-stack/xsimd/pull/785
So possibly that is what passed on armel. If that is
the case then it might be safe to run xsimd tests on all arches
(meaning that scalar tests would be run on non-supported arches).

But in any case it looks like we should skip armhf tests for the time
being.

[toc] | [next] | [standalone]


#1134697

FromDrew Parsons <dparsons@debian.org>
Date2023-01-24 19:10 +0100
Message-ID<FRvU6-RJW-3@gated-at.bofh.it>
In reply to#1134689
Source: xsimd
Followup-For: Bug #1029568

The source of the armhf test error is actually the -mfpu=neon added
explicitly in debian/rules to DEB_CXXFLAGS_MAINT_APPEND on armhf.

Remove this flag, then armhf tests pass.

As far as other arches go, in general they should pass tests now (running
scalar tests).  I checked that tests pass on ppc64 and mipsel, for
instance.

powerpc failed because it does not have "-march=native".
https://github.com/xtensor-stack/xsimd/pull/296/files fixed that for
ppc64, but replacing the "ppc64" reference in tests/CMakeLists.txt
with "ppc*" simply results in 0 tests running on powerpc (so no point
testing it).

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web