logrotate randomly fails with 'File exists'

Bug #1646818 reported by Jon Ribbens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
logrotate (Ubuntu)
New
Undecided
Unassigned

Bug Description

I have a bunch of Ubuntu 14.04 cloud-based servers and they randomly and intermittently fail during logrotate (3.8.7-1ubuntu1) with the following email being returned via cron:

    /etc/cron.daily/logrotate:
    error: error creating output file /var/log/syslog.1.gz: File exists
    run-parts: /etc/cron.daily/logrotate exited with return code 1

Once in this state, it appears that the affected log(s) never get rotated from then on, resulting in the disk gradually filling up:

$ ls -l /var/log/syslog*
-rw-r----- 1 syslog adm 728263740 Dec 2 12:41 /var/log/syslog
-rw-r----- 1 syslog adm 16794619 Oct 19 05:17 /var/log/syslog.1
-rw-r----- 1 syslog adm 704512 Oct 20 05:16 /var/log/syslog.1.gz
-rw-r----- 1 syslog adm 1361774 Oct 18 05:05 /var/log/syslog.2.gz
-rw-r----- 1 syslog adm 1367745 Oct 17 05:01 /var/log/syslog.3.gz
-rw-r----- 1 syslog adm 1347087 Oct 16 04:50 /var/log/syslog.4.gz
-rw-r----- 1 syslog adm 1331506 Oct 15 04:50 /var/log/syslog.5.gz
-rw-r----- 1 syslog adm 1349794 Oct 14 05:10 /var/log/syslog.6.gz
-rw-r----- 1 syslog adm 1359010 Oct 13 05:10 /var/log/syslog.7.gz

Note that I also sometimes get an error report "gzip: stdin: file size changed while zipping" which may or may not be related.

These servers are not related and have very minimal changes from an out-of-the-box Ubuntu server 14.04 bare install (basically: bind9, postfix, python3 and unattended-upgrades are installed and configured), so this is presumably affecting all Ubuntu users and would seem quite serious. Disks filling up can prevent services running of course, but also prevent security patches being applied so this is effectively a security issue.

Revision history for this message
Jon Ribbens (jribbens-r) wrote :

(Sorry, I don't know why the bug reporting system randomly assigned it to 'munin', I didn't select that.)

affects: munin (Ubuntu) → logrotate (Ubuntu)
Revision history for this message
Jon Ribbens (jribbens-r) wrote :

Oh, also forgot to mention that openntpd is installed. (As is 'vim' but I don't see how that could make any difference...)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.