Using the above reproducer ^ .... I confirm that logrotate never recover if the statefile is corrupted unless you remove it or fix the corruption by hand.
The upstream fix introduce in 3.12.0-18 [1] is fixing the issue[2] (tested using Artful so far) Since all supported|devel releases are lower than 3.12 [3], then all releases are affected. [1] - https://github.com/logrotate/logrotate/commit/b9d82003002c98370e4131a7e43c76afcd23306a # git describe --contains b9d8200 3.12.0~18 [2] - https://github.com/logrotate/logrotate/issues/45 [3] - rmadison logrotate | 3.8.7-1ubuntu1 | trusty | source, amd64, arm64, armhf, i386, powerpc, ppc64el logrotate | 3.8.7-1ubuntu1 | vivid | source, amd64, arm64, armhf, i386, powerpc, ppc64el logrotate | 3.8.7-1ubuntu1.1 | trusty-updates | source, amd64, arm64, armhf, i386, powerpc, ppc64el logrotate | 3.8.7-2ubuntu2 | xenial | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x logrotate | 3.8.7-2ubuntu2.16.04.1 | xenial-updates | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x logrotate | 3.8.7-2ubuntu3 | zesty | source, amd64, arm64, armhf, i386, ppc64el, s390x logrotate | 3.8.7-2ubuntu3 | artful | source, amd64, arm64, armhf, i386, ppc64el, s390x Regards, Eric ** Tags added: sts sts-sru-needed ** Also affects: logrotate (Ubuntu Artful) Importance: Undecided Status: New ** Also affects: logrotate (Ubuntu Trusty) Importance: Undecided Status: New ** Also affects: logrotate (Ubuntu Xenial) Importance: Undecided Status: New ** Also affects: logrotate (Ubuntu Zesty) Importance: Undecided Status: New ** Bug watch added: github.com/logrotate/logrotate/issues #45 https://github.com/logrotate/logrotate/issues/45 ** Changed in: logrotate (Ubuntu Artful) Status: New => In Progress ** Changed in: logrotate (Ubuntu Artful) Importance: Undecided => Medium ** Changed in: logrotate (Ubuntu Artful) Assignee: (unassigned) => Eric Desrochers (slashd) -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to logrotate in Ubuntu. https://bugs.launchpad.net/bugs/1709670 Title: logrotate never recovers if the statefile is corrupted Status in logrotate package in Ubuntu: In Progress Status in logrotate source package in Trusty: New Status in logrotate source package in Xenial: New Status in logrotate source package in Zesty: New Status in logrotate source package in Artful: In Progress Bug description: - Install logrotate - Run "/etc/cron.daily/logrotate" ## The first logrotate run will generate the statefile "var/lib/logrotate/status" - Modify "/var/lib/logrotate/status" by removing the first line in order to corrupt the file - Re-run "/etc/cron.daily/logrotate" and you will get something like this "error: bad top line in state file /var/lib/logrotate/status" every time you run logrotate logrotate never recovers if the statefile is corrupted unless you remove it or fix the corruption by hand. System will eventually run out of disk space and crash. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1709670/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp