Package: logrotate
Version: 3.11.0-0.1
Severity: normal

Dear Maintainer,

logrotate does not ever recover from a corrupted statefile.

Reproducer :
- Install logrotate
- Run by hand "/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.

The following upstream[1] commit introduce in 3.12.0 version is fixing the 

[1] -

# git clone
# git describe --contains b9d8200

[2] -

-- System Information:
Debian Release: 8.7
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.0-47-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Reply via email to