diff -Nru atop-2.9.0/debian/changelog atop-2.9.0/debian/changelog --- atop-2.9.0/debian/changelog 2023-07-01 14:37:19.000000000 +0000 +++ atop-2.9.0/debian/changelog 2023-10-05 02:25:12.000000000 +0000 @@ -1,3 +1,10 @@ +atop (2.9.0-1ubuntu1) mantic; urgency=medium + + * d/p/atopacctd_return_error.patch: apply upstream patch to fix SIGFPE in + acctprocnt() (LP: #1725896, LP: #2037910). + + -- Vladimir Petko Thu, 05 Oct 2023 15:25:12 +1300 + atop (2.9.0-1) unstable; urgency=medium * new upstream version 2.9.0 diff -Nru atop-2.9.0/debian/control atop-2.9.0/debian/control --- atop-2.9.0/debian/control 2023-07-01 14:37:19.000000000 +0000 +++ atop-2.9.0/debian/control 2023-10-05 02:25:12.000000000 +0000 @@ -1,7 +1,8 @@ Source: atop Section: admin Priority: optional -Maintainer: Marc Haber +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Marc Haber Uploaders: Marc Haber Build-Depends: debhelper-compat (= 13), zlib1g-dev, libncurses-dev Standards-Version: 4.6.2 diff -Nru atop-2.9.0/debian/patches/atopacctd_return_error.patch atop-2.9.0/debian/patches/atopacctd_return_error.patch --- atop-2.9.0/debian/patches/atopacctd_return_error.patch 1970-01-01 00:00:00.000000000 +0000 +++ atop-2.9.0/debian/patches/atopacctd_return_error.patch 2023-10-05 02:25:12.000000000 +0000 @@ -0,0 +1,31 @@ +Description: Avoid floating point exception when atopacctd fails + When the atopacctd service crashes, it may leave a 0-length shadow file. + atopacctd() routine tries to read it and fails. It returns 1 (success) + and sets maxshadowrec size to the size from the 'current' file. The rest + of the code assumes that the shadow file read was successful and tries + to use an empty acct structure, causing a division by zero. +Author: Gerlof Langeveld +Bug: https://github.com/Atoptool/atop/issues/277 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/atop/+bug/2037910 +Applied-Upstream: https://github.com/Atoptool/atop/commit/f72f7c06278ec9ad2209975eca67c2e3c0b3a44b +Last-Update: 2023-10-08 +--- a/acctproc.c ++++ b/acctproc.c +@@ -430,7 +430,6 @@ atopacctd(int swon) + { + if ( swon && !acctvers(acctfd) ) + { +- + int maxcnt = 40; + + if ( fork() == 0 ) +@@ -453,7 +452,8 @@ atopacctd(int swon) + &semunlock, 1); + + regainrootprivs(); +- return 1; ++ maxshadowrec = 0; ++ return -1; // try other + } + } + diff -Nru atop-2.9.0/debian/patches/series atop-2.9.0/debian/patches/series --- atop-2.9.0/debian/patches/series 2023-07-01 14:37:19.000000000 +0000 +++ atop-2.9.0/debian/patches/series 2023-10-05 02:25:12.000000000 +0000 @@ -15,3 +15,4 @@ no-atopgpud handle-default-file default +atopacctd_return_error.patch