[Bug 1350782] Re: Upstart does not reopen /var/log/upstart/* logfiles upon log rotation
arthur.j.odwyer at gmail.com
Wed Sep 30 01:40:04 UTC 2015
I'm seeing basically the same symptom: /etc/logrotate.d/upstart contains
"compress" without "delaycompress", which means that logrotate attempts
to compress /var/log/upstart/*.log while Upstart is still writing to
those files. The result is "gzip: stdin: file size changed while
zipping". I believe that at least PART of the appropriate solution is
to add "delaycompress" and/or "copytruncate" to
/etc/logrotate.d/upstart; however, logrotate might also need to notify
Upstart that the file has moved via SIGHUP or some such.
I'm using Ubuntu 14.04.2 LTS.
I do not see the same bug on Ubuntu 12.04.5 LTS; however, I also do not
see /lib/systemd/systemd-logind in the output of "ps aux", and I believe
that's the particular Upstart service which is trying to log during the
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
Upstart does not reopen /var/log/upstart/* logfiles upon log rotation
Status in upstart package in Ubuntu:
Note: this issue is reported from a 12.04 system, but I've confirmed
the same behavior on a 14.04 system.
Logrotate configuration for Upstart logs has no postrotate action:
As a result, when logs are rotated, upstart keeps open handles on
deleted log files instead of reopening the new log files:
# lsof -p1 | fgrep /var/log/upstart
. . .
init 1 root 8w REG 253,1 62 789436 /var/log/upstart/dbus.log.1 (deleted)
. . .
From this point on, all subsequent log messages are lost, delivered
into a deleted file.
I could not find a way to get the upstart init process to reopen its
log files, short of restarting _all_ services that log to
/var/log/upstart/*.log files, which does not seem like a good solution
DistroRelease: Ubuntu 12.04
Package: upstart 1.5-0ubuntu7.2
ProcVersionSignature: Ubuntu 3.2.0-60.91-generic 3.2.55
Uname: Linux 3.2.0-60-generic x86_64
Date: Thu Jul 31 10:43:25 2014
InstallationMedia: Ubuntu-Server 10.04.4 LTS "Lucid Lynx" - Release amd64 (20120214.2)
PATH=(custom, no user)
UpgradeStatus: Upgraded to precise on 2013-10-23 (280 days ago)
To manage notifications about this bug go to:
More information about the foundations-bugs