Bug 567365 - log deleted after "gzip: stdin: Input/output error"
Summary: log deleted after "gzip: stdin: Input/output error"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: logrotate
Version: 5.3
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Jan Kaluža
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 604073
TreeView+ depends on / blocked
 
Reported: 2010-02-22 18:38 UTC by Dmytro Lisnichenko
Modified: 2013-04-12 20:36 UTC (History)
8 users (show)

Fixed In Version: logrotate-3.7.4-12
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 604073 (view as bug list)
Environment:
Last Closed: 2011-05-18 14:57:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed patch (453 bytes, patch)
2010-06-15 11:28 UTC, Jan Kaluža
no flags Details | Diff
prosode patch (375 bytes, patch)
2010-06-24 12:21 UTC, Jan Kaluža
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0816 0 normal SHIPPED_LIVE logrotate bug fix update 2011-05-18 14:57:14 UTC

Description Dmytro Lisnichenko 2010-02-22 18:38:57 UTC
Description of problem:
Our logs for httpd are stored on NFS. After some temporary problem with NFS (not known yet) the logrotate was not able to compress one of the logs and removed it. I would suggest if logrotate receives some error from gzip it shouldn't remove original file and should keep it untouched. Some very important logs might be lost. 

This was sent by email: 

gzip: stdin: Input/output error 
error: unable to open /mnt/*****/logs/access.log.1 for compression

The config for rotation of these logs is following 

{
    daily
    missingok
    rotate 730
    compress
    delaycompress
    create 644 root root
    notifempty
    sharedscripts
    postrotate
        /sbin/service httpd reload > /dev/null 2>/dev/null || true
    endscript
}

Version-Release number of selected component (if applicable):
logrotate-3.7.4-9

Comment 1 Jan Kaluža 2010-06-15 11:28:06 UTC
Created attachment 424122 [details]
proposed patch

This patch fixes described bug.

Comment 2 Jan Kaluža 2010-06-24 12:21:20 UTC
Created attachment 426548 [details]
prosode patch

I think this patch fixes this bug for RHEL5 (unfortunately, previous one fixed the problem only for RHEL6).

In my opinion, there is problem in renaming "log" to "log.1" when "rename" function returns error code. In that case we shouldn't continue with rotation process for that particular log, because "log.1" doesn't have to be created and in next step we overwrite "log" (so it's lost).

The gzip error is showed only as result of non existing "log.1" file. After applying this patch, rotation is stopped before the compress code.

Comment 5 RHEL Program Management 2011-01-11 20:38:22 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2011-01-11 23:01:36 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 12 errata-xmlrpc 2011-05-18 14:57:19 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0816.html


Note You need to log in before you can comment on or make changes to this bug.