[Bug 1709670] Re: logrotate never recovers if the statefile is corrupted

Eric Desrochers eric.desrochers at canonical.com
Wed Aug 9 18:29:43 UTC 2017


Debdiff for stable release : Zesty/17.04

** Patch added: "lp1709670-logrotate-zesty.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1709670/+attachment/4929665/+files/lp1709670-logrotate-zesty.debdiff

** Changed in: logrotate (Ubuntu Zesty)
     Assignee: (unassigned) => Eric Desrochers (slashd)

** Changed in: logrotate (Ubuntu Xenial)
     Assignee: (unassigned) => Eric Desrochers (slashd)

** Changed in: logrotate (Ubuntu Trusty)
     Assignee: (unassigned) => Eric Desrochers (slashd)

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
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:
  Confirmed
Status in logrotate source package in Xenial:
  Confirmed
Status in logrotate source package in Zesty:
  Confirmed
Status in logrotate source package in Artful:
  In Progress
Status in logrotate package in Debian:
  Unknown

Bug description:
  [Impact]

  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 on /var/log for instance.

  [Test Case]

  - 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 one will get the following error : "error: bad top line in state file /var/lib/logrotate/status" every time you run logrotate

  Unless you remove the statefile and start again or fix the corruption
  by hand.

  [Regression Potential]

   * Risk of potential regression is low, and IMHO couldn't be worst than the actual situation where logrotate simply doesn't recover from a corrupt statefile.
   
   * The current patch does recover (after verification) and has been through some upstream CI validation, community feedbacks, et al.

  [Other Info]

  * Upstream commit:
  https://github.com/logrotate/logrotate/commit/b9d82003002c98370e4131a7e43c76afcd23306a

  * Upstream bug:
  https://github.com/logrotate/logrotate/issues/45

  * Debian bug:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871592

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1709670/+subscriptions



More information about the Ubuntu-sponsors mailing list