- Package:
- src:seqan2
- Source:
- seqan2
- Submitter:
- Steve McIntyre
- Date:
- 2025-12-03 18:23:04 UTC
- Severity:
- important
- Tags:
Hi! I've been doing a full rebuild of the Debian archive, building all source packages targeting armel and armhf using arm64 hardware. We are planning in future to move all of our 32-bit armel/armhf builds to using arm64 machines, so this rebuild is to identify packages that might have problems with this configuration. A feature of the arm64 kernel is that it does *not* support fixing up code with broken alignment, so code that might have built and run OK on our older armel/armhf build machines due to kernel fixups will now fail. When building your package, I've found a bus error (aka alignment fault). The full log is online at https://www.einval.com/debian/arm/rebuild-logs/armel/FAIL/seqan2_2.4.0+dfsg-9_armel.log for reference I've done a quick bit of debugging to find the source of the bug. Here's a gdb stacktrace and variable printout to demonstrate the problem. (sid-armel)steve@mjolnir:~/debian/build/seqan2/seqan2-2.4.0+dfsg$ gdb obj-arm-linux-gnueabi/bin/test_index_fm_rank_dictionary obj-arm-linux-gnueabi/tests/index/core ... Core was generated by `/home/steve/debian/build/seqan2/seqan2-2.4.0+dfsg/obj-arm-linux-gnueabi/bin/tes'. Program terminated with signal SIGBUS, Bus error. #0 0x00bf7d24 in seqan::_getWordRank<bool, void, seqan::LevelsRDConfig<unsigned int, seqan::Alloc<void>, 2u, 2u>, unsigned long long, unsigned int> ( word=@0x234df2a: 6741939070857683030, c=true, posInWord=63) at ./include/seqan/misc/bit_twiddling.h:346 346 _popCountImpl(TWord word, WordSize_<64> const & /*tag*/) (gdb) bt #0 0x00bf7d24 in seqan::_getWordRank<bool, void, seqan::LevelsRDConfig<unsigned int, seqan::Alloc<void>, 2u, 2u>, unsigned long long, unsigned int> ( word=@0x234df2a: 6741939070857683030, c=true, posInWord=63) at ./include/seqan/misc/bit_twiddling.h:346 #1 seqan::_getWordRank<bool, void, seqan::LevelsRDConfig<unsigned int, seqan::Alloc<void>, 2u, 2u>, unsigned long long> (dict=..., word=@0x234df2a: 6741939070857683030, c=true) at ./include/seqan/index/index_fm_rank_dictionary_levels.h:1139 #2 seqan::_getValueRank<bool, void, seqan::LevelsRDConfig<unsigned int, seqan::Alloc<void>, 2u, 2u>, seqan::Tuple<seqan::Tuple<bool, 64u, seqan::BitPacked<16u, 16u> >, 2u, void>, unsigned int> (c=true, dict=..., posInBlock=127, values=...) at ./include/seqan/index/index_fm_rank_dictionary_levels.h:1261 #3 seqan::_getValuesRanks<void, seqan::LevelsRDConfig<unsigned int, seqan::Alloc<void>, 2u, 2u>, unsigned int> (pos=<optimized out>, dict=...) at ./include/seqan/index/index_fm_rank_dictionary_levels.h:1349 #4 seqan::updateRanks<bool, void, seqan::LevelsRDConfig<unsigned int, seqan::Alloc<void>, 2u, 2u> > (dict=...) at ./include/seqan/index/index_fm_rank_dictionary_levels.h:1711 #5 seqan::createRankDictionary<bool, seqan::Levels<void, seqan::LevelsRDConfig<unsigned int, seqan::Alloc<void>, 2u, 2u> >, seqan::String<bool, seqan::Alloc<void> > > ( dict=..., text=...) at ./include/seqan/index/index_fm_rank_dictionary_base.h:268 #6 0x00bf8cfc in seqan::RankDictionary<bool, seqan::Levels<void, seqan::LevelsRDConfig<unsigned int, seqan::Alloc<void>, 2u, 2u> > >::RankDictionary<seqan::String<bool, seqan::Alloc<void> > > (text=..., this=0xffd11048) at ./include/seqan/index/index_fm_rank_dictionary_levels.h:430 #7 RankDictionaryTest__Constructor<seqan::RankDictionary<bool, seqan::Levels<void, seqan::LevelsRDConfig<unsigned int, seqan::Alloc<void>, 2u, 2u> > > >::runTest ( this=0x232df30) at ./tests/index/test_index_fm_rank_dictionary.cpp:186 #8 0x00bc2074 in seqan::TestSystem::runAll () at /usr/include/c++/8/bits/unique_ptr.h:342 #9 0xf783a474 in __libc_start_main (main=0xffd11244, argc=-141082624, argv=0xf783a474 <__libc_start_main+268>, init=<optimized out>, fini=0xc45368 <__libc_csu_fini>, rtld_fini=0xf7c9e66c <_dl_fini>, stack_end=0xffd11244) at libc-start.c:308 #10 0x00bb40ac in _start () at ./include/seqan/basic/debug_test_system.h:502 Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) list 341 // GCC or CLANG implementations. 342 // SSE4.2 popcnt is emitted when compiling with -mpopcnt or -march=corei7 343 344 template <typename TWord> 345 inline unsigned 346 _popCountImpl(TWord word, WordSize_<64> const & /*tag*/) 347 { 348 return __builtin_popcountll(static_cast<uint64_t>(word)); 349 } 350 (gdb) p word $1 = (const unsigned long long &) @0x234df2a: 6741939070857683030 This is classic buggy code for alignment faults - simply casting a uint64_t over the unaligned address 0x234df2a is not safe.
Hi,
But other 32bit architectures like armel and armhf are passing[2]. So I
fail to see why exactly i386 is failing. Is this possibly an effect of
bug #917851?
Kind regards
Andreas.
[2] https://buildd.debian.org/status/package.php?p=seqan2
Am 12.02.2021 um 11:01 teilte Andreas Tille mit: Hi, Maybe the memory of the whole builder is exhausted. In this case it may help to limit the amount of parallel running processes. On i386 we have "make -j4" on armel just "make -j1" . H. -- sigfault
Then it would get an OOM, not a *virtual* memory error.
Andreas Tille <tille@debian.org> writes: Probably not; dropping the bug to a Bcc. Experimentation in an i386 chroot reveals the problem to be specifically with yara_mapper, which https://salsa.debian.org/med-team/seqan2/-/blob/master/debian/patches/skip-some-apps-on-some-archs explicitly excludes (along with yara_indexer) on several other 32-bit platforms. We could go the same route for i386, but AFAICT it suffices to drop the optimization level back down to -O2 for this specific application, by adding # Drop back from global -O3 on i386 to avoid # "virtual memory exhausted: Operation not permitted" if ("$ENV{DEB_BUILD_ARCH}" STREQUAL "i386") target_compile_options (yara_mapper PRIVATE "-O2") endif () to apps/yara/CMakeLists.txt following the add_executable call for yara_mapper. (If and when debian/rules honors noopt, we should further conditionalize this call accordingly, but I'm not familiar enough with cmake to come up with the correct syntax offhand.) We could perhaps try doing the same for other affected platforms in an upload to experimental.
We believe that the bug you reported is fixed in the latest version of
seqan2, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 917851@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andreas Tille <tille@debian.org> (supplier of updated seqan2 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 03 Dec 2025 14:49:24 +0100
Source: seqan2
Architecture: source
Version: 2.4.0+dfsg-17
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Changed-By: Andreas Tille <tille@debian.org>
Closes: 917851 1047218
Changes:
seqan2 (2.4.0+dfsg-17) unstable; urgency=medium
.
[ Santiago Vila ]
* Fix clean target. Closes: #1047218
.
[ Andreas Tille ]
* d/watch: version=5
* Standards-Version: 4.7.2 (routine-update)
* Rely on pre-initialized dpkg-architecture variables.
* Build-Depends: architecture-is-64-bit
Closes: #917851
* Disable i386 build on Salsa CI
* Enable building with CMake 4
Checksums-Sha1:
54de7c3aa90125eb0bdd9bbd77df65788373a24e 2345 seqan2_2.4.0+dfsg-17.dsc
9c3bc3de665d30dabf6f485a2f522acd0e925df6 30084 seqan2_2.4.0+dfsg-17.debian.tar.xz
fb92d25b3dfc098fde7352792de07093f3db0965 8129 seqan2_2.4.0+dfsg-17_amd64.buildinfo
Checksums-Sha256:
da25d72c08c548a8f194c79188b8f7840664667cc23b8a95d59da06e350e65da 2345 seqan2_2.4.0+dfsg-17.dsc
cf4e5e238ed7c7775242a5faa80bfe52db6ff06d125bbb5a5d2a78cd06198d93 30084 seqan2_2.4.0+dfsg-17.debian.tar.xz
cdd8e5f639f80e1eb75791083650ccf5659db3c9fd237d3524290136fbecaa75 8129 seqan2_2.4.0+dfsg-17_amd64.buildinfo
Files:
f16af541cafec50e14cf927825a53bd5 2345 science optional seqan2_2.4.0+dfsg-17.dsc
4e44700a8806353a065ccfc8084c93d4 30084 science optional seqan2_2.4.0+dfsg-17.debian.tar.xz
627a52a01d1c64db92645a2864797b03 8129 science optional seqan2_2.4.0+dfsg-17_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJFBAEBCgAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmkweisRHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtHg4Q//RFMmROBRJIYWpQreQwYPqX9suydVd4Fd
1LbuyWN349Qc+OORwmT0DXoaHnaOWO2GbdK0Tpkdgi9ND5iXH/Zf2phA/uToUcok
fsWQsDHzjqWbXD1I+JM7Ds42pHZ+myHoWt4RfH6vX5Vw3g0Accz6d9KVC/T/j9a1
MsQJ953swDvEFELEj3E/dI14Jg+pUReBIS8tfjD8b7NbfTReV0rR0J2e/SuzPLlw
wjcyOM5x0yk8vnPLTUS4Z6vmCnbSSeK1tzhB9m3LcbHzk4o3KBM2PVu1w4bZ1C0Y
nTnfcln/WuFeheWcIwlW2e4wsO9dacocql5fXeGBvkNpDM7lrc2TYD1nreiPstbV
qg5KUXVycsIPqU2dmhA/Qk9lsWc3VFRhdILeah1J3/YS06z/GmmVnd9srgDUq3mF
1OyW5KnCdQEh4eud2+za/MYQB84iT9L0q1YPyGSzX54NKgOI1xqtxK2eF/aZUIBB
Bl20HZ/qoZbSqSPaEPwX7d47wzvJdw+8dnVRjZcgmzv6thFE5wEdilpA0DssRa+F
Z0FI4zq5ECgXmtY6n0hGrjTlE1mhxUSTyIRdsjjrjvA4daYTBJyKyObSej1mXaXB
kgxVeVkuxgPXYj0ZFJp/de0wNOR737xNp+1rHsPWzvBnmNsniU01fh4CJsffSHHO
cqq7PUoXFro=
=Jes4
-----END PGP SIGNATURE-----