Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686276 - app-admin/syslog-ng - File size changes while logrotate is zipping /var/log/messages-$(date)
Summary: app-admin/syslog-ng - File size changes while logrotate is zipping /var/log/m...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tomáš Mózes
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-05-19 01:53 UTC by anonymous
Modified: 2019-12-20 05:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anonymous 2019-05-19 01:53:41 UTC
error: Compressing program wrote following message to stderr when compressing log /var/log/messages-20190519:
gzip: stdin: file size changed while zipping

Perhaps, `delaycompression` should be added to /etc/logrotate.d/syslog-ng?
Comment 1 anonymous 2019-07-14 02:41:51 UTC
I suggest adding delaycompress to /etc/logrotate.d/syslog-ng
Comment 2 Tomáš Mózes 2019-07-14 10:36:05 UTC
Can you please test whether it really helps?
Comment 3 anonymous 2019-07-16 07:18:16 UTC
I added 'daily' and 'delaycompress' to test it on a daily basis. It works.
You can add just 'delaycompress' to it.
Comment 4 Tomáš Mózes 2019-08-12 13:24:54 UTC
The strange thing is that this come out just recently and maybe it is related to some other piece of software (logrotate?). I've started seeing these messages as you opened the bug report, but it's only on some of the machines.

The configuration file haven't been touched for ages.
Comment 5 anonymous 2019-08-13 02:30:32 UTC
Just add `delaycompress` to /etc/logrotate.d/syslog-ng
Comment 6 Sergey S. Starikoff 2019-09-01 18:17:32 UTC
(In reply to Tomáš Mózes from comment #4)
> The strange thing is that this come out just recently and maybe it is
> related to some other piece of software (logrotate?). I've started seeing
> these messages as you opened the bug report, but it's only on some of the
> machines.
> 
> The configuration file haven't been touched for ages.

This issue is not very clear and requires some mandatory conditions and skills to detect.
It is not app-admin/syslog-ng but app-admin/logrotate issue.

For my experiens «delaycompress» option is easy, quick and durty workaround.
I'm not responsible about usage of pre-rotate block, but quessing, that HUP signal is sent in postrotate logrotate simply MUST send this signal BEFORE starting compress command.
This will fix issue everywhere, not only in discussed case os syslog daemon.
Comment 7 Tomáš Mózes 2019-09-02 12:57:25 UTC
The only thing is that compression is not enabled by default in the syslog's logrotate configuration, so it's weird to add the delayed compression option. Probably both should be added in case we don't find anything better.
Comment 8 anonymous 2019-12-20 03:54:08 UTC
/etc/logrotate.conf from the gentoo package contains compress option.
Comment 9 Tomáš Mózes 2019-12-20 05:26:33 UTC
Yeah, the PR adds the delaycompress option to all log files. I've tested on some servers and it seems to have fixed the issue. Thanks
Comment 10 Larry the Git Cow gentoo-dev 2019-12-20 05:45:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cff8b1d82fbfc63b4d27db8e1dd43396c849f5d

commit 8cff8b1d82fbfc63b4d27db8e1dd43396c849f5d
Author:     Tomas Mozes <hydrapolic@gmail.com>
AuthorDate: 2019-12-19 15:16:36 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2019-12-20 05:45:11 +0000

    app-admin/syslog-ng: bump to 3.25.1
    
    Closes: https://bugs.gentoo.org/686276
    Package-Manager: Portage-2.3.82, Repoman-2.3.20
    Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-admin/syslog-ng/Manifest                       |   1 +
 app-admin/syslog-ng/files/syslog-ng.logrotate      |  12 --
 .../syslog-ng/files/syslog-ng.logrotate.hardened   |  75 ---------
 .../files/syslog-ng.logrotate.hardened.in          |   8 +
 app-admin/syslog-ng/files/syslog-ng.logrotate.in   |   1 +
 app-admin/syslog-ng/syslog-ng-3.25.1.ebuild        | 169 +++++++++++++++++++++
 6 files changed, 179 insertions(+), 87 deletions(-)