Bug 1980948 - logrotate of nginx error_log reports gzip: stdin: file size changed while zipping
Summary: logrotate of nginx error_log reports gzip: stdin: file size changed while zip...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nginx
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Felix Kaechele
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-10 03:48 UTC by Kenneth Porter
Modified: 2021-10-27 02:41 UTC (History)
9 users (show)

Fixed In Version: nginx-1.20.1-9.el7
Clone Of:
Environment:
Last Closed: 2021-10-27 02:41:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kenneth Porter 2021-07-10 03:48:33 UTC
Daily logrotate intermittently reports "gzip: stdin: file size changed while zipping". Setting it to --verbose reveals that nginx is still writing to one of its logs. I'm adding delaycompress to its logrotate config file. Verbose report:

rotating pattern: /var/log/nginx/*.log  after 1 days (10 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/nginx/access.log
  log needs rotating
considering log /var/log/nginx/error.log
  log needs rotating
rotating log /var/log/nginx/access.log, log->rotateCount is 10
dateext suffix '-20210709'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
rotating log /var/log/nginx/error.log, log->rotateCount is 10
dateext suffix '-20210709'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
fscreate context set to unconfined_u:object_r:httpd_log_t:s0
renaming /var/log/nginx/access.log to /var/log/nginx/access.log-20210709
creating new /var/log/nginx/access.log mode = 0640 uid = 990 gid = 0
fscreate context set to unconfined_u:object_r:httpd_log_t:s0
renaming /var/log/nginx/error.log to /var/log/nginx/error.log-20210709
creating new /var/log/nginx/error.log mode = 0640 uid = 990 gid = 0
running postrotate script
compressing log with: /bin/gzip
set default create context to unconfined_u:object_r:httpd_log_t:s0
removing old log /var/log/nginx/access.log-20210628.gz
compressing log with: /bin/gzip
set default create context to unconfined_u:object_r:httpd_log_t:s0
gzip: stdin: file size changed while zipping
removing old log /var/log/nginx/error.log-20210628.gz

Comment 1 Felix Kaechele 2021-10-08 02:24:42 UTC
Hi Kenneth,

thanks for taking the time to report this. The notification email must have slipped through the cracks. Sorry about that.

I have queued your fix for the next version.

Thanks again!

Comment 2 Fedora Update System 2021-10-19 00:41:09 UTC
FEDORA-EPEL-2021-4297ff9918 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-4297ff9918

Comment 3 Fedora Update System 2021-10-19 16:12:04 UTC
FEDORA-EPEL-2021-4297ff9918 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-4297ff9918

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2021-10-27 02:41:47 UTC
FEDORA-EPEL-2021-4297ff9918 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.


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