Bug#816272: [Pkg-clamav-devel] Bug#816272: Bug#816272: clamav-freshclam: logrotate errors out with "gzip: stdin: file size changed while zipping"

2016-04-05 Thread Christian Pernegger
Hi,

no error e-mail this week, yay!

It looks like this is/was a duplicate of #788652 in the end (at least
the clamav-freshclam part of it). If you agree, please close & merge
as appropriate.

Thank you,
Christian



Bug#816272: [Pkg-clamav-devel] Bug#816272: Bug#816272: clamav-freshclam: logrotate errors out with "gzip: stdin: file size changed while zipping"

2016-03-22 Thread Christian Pernegger
Hi again,

sorry for the delay. TBH I was hoping againt hope that this'll just go
away. I've gotten two more error e-mails in the meantime:

21st:
/etc/cron.daily/logrotate:
error: error running non-shared postrotate script for
/var/log/clamav/freshclam.log of '/var/log/clamav/freshclam.log '
gzip: stdin: file size changed while zipping
run-parts: /etc/cron.daily/logrotate exited with return code 1

13th:
/etc/cron.daily/logrotate:
error: error running non-shared postrotate script for
/var/log/clamav/freshclam.log of '/var/log/clamav/freshclam.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1

Question: Is this one error, definitely coming from clamav-freshclam, or
could it be that the gzip line comes from $otherpackage, i.e., would
multiple unrelated errors land in one e-mail?

Verbose output of a forced logrotate run is attached. Nothing about gzip,
just the postrotate script failing. I'm guessing that'd be:

if [ -d /run/systemd/system ]; then
 systemctl -q is-active clamav-freshclam && systemctl kill
--signal=SIGHUP clamav-freshclam
else
 /etc/init.d/clamav-freshclam reload-log > /dev/null
fi

Now "[ -d /run/systemd/system ]" obviously holds, "systemctl -q is-active
clamav-freshclam && echo test" prints nothing (as expected) so this should
be a no-op. $? is 3, though, maybe that's interpreted as failure?

Regards
Christian


logrotate.log
Description: Binary data


Bug#816272: [Pkg-clamav-devel] Bug#816272: Bug#816272: clamav-freshclam: logrotate errors out with "gzip: stdin: file size changed while zipping"

2016-03-07 Thread Sebastian Andrzej Siewior
On 2016-03-06 12:30:59 [+0100], Christian Pernegger wrote:
> > When you select `cron' in debconf then it will roll the big dice
> Tried that yesterday, result:
> 18 */12 * * *clamav [ -x /usr/bin/freshclam ] &&
> /usr/bin/freshclam --quiet >/dev/null
> 
> It now runs at 18 past noon and midnight, but I still got a
> (different) error e-mail this morning:
> /etc/cron.daily/logrotate:
> error: error running non-shared postrotate script for
> /var/log/clamav/freshclam.log of '/var/log/clamav/freshclam.log '
> run-parts: /etc/cron.daily/logrotate exited with return code 1

now there is nothing.

> Maybe that's just an artefact of the recent debconf run, we'll see in a week.
> 
> > So *I* really think just adding the extra option to lograte is the simplest
> > thing to do.
> 
> I'd love to but it is already in there as standard:

yes, indeed. I somehow though that it was not. But that makes no sense
then. It rotates the freshclam.log to freshclam.log.0 on the first week
and on the second week it performs gzip on freshclam.log.0. freshclam
should no longer have a handle on it.
Could you try to force a lograte? The -v option of lorotate might give
more information on what is going on.

> Christian

Sebastian