Hi! On Mon, 2018-04-02 at 08:58:58 +0200, Dirk Heinrichs wrote: > Package: dpkg > Version: 1.18.24 > Severity: normal
> since a couple of days, I'm getting strange error mails from cron > daemon with subject > > "Cron <root@mail> test -x /usr/sbin/anacron || ( cd / && run- > parts --report /etc/cron.daily )" > > from some hosts. They're all related to executing /etc/cron.daily/dpkg > but with slightly different content. One host even sends 2(!) mails. > Here's the content: > Host1: > > /etc/cron.daily/dpkg: > cp: cannot create regular file 'dpkg.status': File exists This smells like a race condition, between logrotate and dpkg being called and recreating the file before logrotate does. But I might be wrong. > mv: cannot move './/dpkg.status.5.gz' to './/dpkg.status.6.gz': No such > file or directory > mv: cannot move './/dpkg.status.4.gz' to './/dpkg.status.5.gz': No such > file or directory > mv: cannot move './/dpkg.status.3.gz' to './/dpkg.status.4.gz': No such > file or directory > mv: cannot move './/dpkg.status.2.gz' to './/dpkg.status.3.gz': No such > file or directory > mv: cannot move './/dpkg.status.1.gz' to './/dpkg.status.2.gz': No such > file or directory But I'm not sure why it would fail to move aside the one that I'd expect had been moved before. I'd need to check logrotate's code. […] > run-parts: /etc/cron.daily/logrotate exited with return code 1 > If I execute /etc/cron.daily/dpkg manually, it always finishes without > error. That's to be expected on normal conditions, yes. :) > In case it matters, these hosts are setup as LXC-based OS containers > running on libvirt. But I think I've seen these mails from physical > hosts in the past as well. Do you perhaps have something like unattended-ugrades or something similar enabled on all those hosts? Thanks, Guillem