Bug#1001237: ptl: autopkgtest regression on armhf: Floating point exception
Control: forwarded -1 https://github.com/jrmadsen/PTL/issues/25 Hi Lukas, On Mon, 13 Dec 2021 15:39:18 +0100 =?utf-8?q?Lukas_M=C3=A4rdian?= wrote: > I can observe the same issue with 2.3.0-1 on Ubuntu and filed an upstream bug > at https://github.com/jrmadsen/PTL/issues/25 > > The intmax_t division seems to be the root-cause here, replacing the division > in the minimal.cc example with a constant is a (temporary) way to mitigate > this > problem. Thanks for looking into this! I didn't have the time to do it. Since I saw you fixed this upstream and 2.3.1 was released after that, I have uploaded the new version instead of adding the patch. Thanks again, Stephan
Bug#1001237: ptl: autopkgtest regression on armhf: Floating point exception
Package: ptl Version: 2.3.0-1 Followup-For: Bug #1001237 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu jammy ubuntu-patch X-Debbugs-Cc: sl...@ubuntu.com Control: tags -1 patch Hello Stephan, I can observe the same issue with 2.3.0-1 on Ubuntu and filed an upstream bug at https://github.com/jrmadsen/PTL/issues/25 The intmax_t division seems to be the root-cause here, replacing the division in the minimal.cc example with a constant is a (temporary) way to mitigate this problem. In Ubuntu, the attached patch was applied to achieve the following: * Add d/p/mitigate-SIGFPE.diff to mitigate minimal.cc crash in autopkgtest Thanks for considering the patch. Cheers, Lukas -- System Information: Debian Release: 11.0 APT prefers impish-updates APT policy: (500, 'impish-updates'), (500, 'impish-security'), (500, 'impish'), (100, 'impish-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.13.0-22-generic (SMP w/4 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:en_GB:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled diff -Nru ptl-2.3.0/debian/patches/mitigate-SIGFPE.diff ptl-2.3.0/debian/patches/mitigate-SIGFPE.diff --- ptl-2.3.0/debian/patches/mitigate-SIGFPE.diff 1970-01-01 01:00:00.0 +0100 +++ ptl-2.3.0/debian/patches/mitigate-SIGFPE.diff 2021-12-13 15:32:33.0 +0100 @@ -0,0 +1,20 @@ +Description: Mitigate SIGFPE crash in minimal.cc by avoiding maxint_t divison +Author: Lukas Märdian +Bug: https://github.com/jrmadsen/PTL/issues/25 +Bug-Debian: https://bugs.debian.org/1001237 +Origin: vendor, Ubuntu +Last-Update: 2021-12-13 +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- ptl-2.3.0.orig/examples/minimal/minimal.cc ptl-2.3.0/examples/minimal/minimal.cc +@@ -135,7 +135,7 @@ main(int argc, char** argv) + static intmax_t idx= 0; + static intmax_t ncores = Threading::GetNumberOfCores(); + static intmax_t ncpus = Threading::GetNumberOfPhysicalCpus(); +-static intmax_t nincr = std::max(ncores / ncpus, 1); ++static intmax_t nincr = 1; + auto_idx = idx + nincr; + idx += nincr; + if(_idx % ncores == 0) diff -Nru ptl-2.3.0/debian/patches/series ptl-2.3.0/debian/patches/series --- ptl-2.3.0/debian/patches/series 1970-01-01 01:00:00.0 +0100 +++ ptl-2.3.0/debian/patches/series 2021-12-13 15:29:29.0 +0100 @@ -0,0 +1 @@ +mitigate-SIGFPE.diff
Bug#1001237: ptl: autopkgtest regression on armhf: Floating point exception
Source: ptl Version: 2.3.0-1 X-Debbugs-CC: debian...@lists.debian.org Severity: serious User: debian...@lists.debian.org Usertags: regression Dear maintainer(s), With a recent upload of ptl the autopkgtest of ptl fails in testing when that autopkgtest is run with the binary packages of ptl from unstable. It passes when run with only packages from testing. In tabular form: passfail ptlfrom testing2.3.0-1 all others from testingfrom testing I copied some of the output at the bottom of this report. Maybe the test gets a bit confused by the fact that this host has 160 cores? Currently this regression is blocking the migration to testing [1]. Can you please investigate the situation and fix it? More information about this bug and the reason for filing it can be found on https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation Paul [1] https://qa.debian.org/excuses.php?package=ptl https://ci.debian.net/data/autopkgtest/testing/armhf/p/ptl/17288801/log.gz /usr/include/c++/11/bits/stl_algobase.h:527:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iteratorstd::vector >’ changed in GCC 7.1 In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/algorithm:61, from /usr/include/PTL/Globals.hh:30, from /usr/include/PTL/Task.hh:33, from /tmp/autopkgtest-lxc.48w05yr2/downtmp/autopkgtest_tmp/common/utils.hh:25, from /tmp/autopkgtest-lxc.48w05yr2/downtmp/autopkgtest_tmp/basic/recursive_tasking.cc:26: /usr/include/c++/11/bits/stl_iterator.h: In function ‘_Iterator std::__niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container>) [with _Iterator = const long long int*; _Container = std::vectorlong int>]’: /usr/include/c++/11/bits/stl_iterator.h:1257:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iteratorstd::vector >’ changed in GCC 7.1 1257 | __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) | ^~~~ [100%] Linking CXX executable recursive_tbb_tasking [100%] Built target recursive_tbb_tasking ## !!! Backtrace is activated !!! ## [ptl-minimal]> Number of threads: 160 [PTL::ThreadPool] Starting thread 1... bash: line 1: 2328 Floating point exception/tmp/autopkgtest-lxc.48w05yr2/downtmp/build.SOP/src/debian/tests/examples 2> >(tee -a /tmp/autopkgtest-lxc.48w05yr2/downtmp/examples-stderr >&2) > >(tee -a /tmp/autopkgtest-lxc.48w05yr2/downtmp/examples-stdout) autopkgtest [16:13:41]: test examples OpenPGP_signature Description: OpenPGP digital signature