RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1401694 - rotatelogs: creation of zombie processes when -p is used
Summary: rotatelogs: creation of zombie processes when -p is used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: httpd
Version: 6.8
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: Jan Houska
URL:
Whiteboard:
Depends On:
Blocks: 1403212 1451333
TreeView+ depends on / blocked
 
Reported: 2016-12-05 20:29 UTC by Robert Bost
Modified: 2020-03-11 15:27 UTC (History)
4 users (show)

Fixed In Version: httpd-2.2.15-59.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1403212 1451333 (view as bug list)
Environment:
Last Closed: 2017-03-21 11:51:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0784 0 normal SHIPPED_LIVE httpd bug fix update 2017-03-21 12:49:39 UTC

Description Robert Bost 2016-12-05 20:29:33 UTC
Description of problem: Rotatelogs creates zombie processes for program specified in -p flag


Version-Release number of selected component (if applicable): httpd-2.2.15-55.el6_8.2.x86_64


How reproducible: Always


Steps to Reproduce:
Change ErrorLog directive to use rotatelogs command with -p flag. For example:

  ErrorLog "|/usr/sbin/rotatelogs -l -p /bin/gzip -f -L /var/log/httpd/error_log /tmp/error%h 100B"


Actual results: Results in defunct/zombie gzip process

Additional info: The problem appears to be addressed in Apache 2.4.10 :
*) rotatelogs: Avoid creation of zombie processes when -p is used on
Unix platforms. [Joe Orton]
http://archive.apache.org/dist/httpd/CHANGES_2.4.10

Comment 9 Jan Houska 2016-12-19 12:09:28 UTC
Verified:

Old Fail:
:: [   LOG    ] :: Installed:    : httpd-2.2.15-55.el6_8.2.x86_64 

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Looking for possible running gzip proces. :: actually running 'ps -A | grep 'gzip' | tee output1.log'
:: [   PASS   ] :: Looking for possible running gzip proces. (Expected 1, got 1)
:: [   PASS   ] :: File 'output1.log' should not contain 'gzip' 
:: [  BEGIN   ] :: Restarting httpd :: actually running 'httpStart'
httpd is stopped
:: [  BEGIN   ] :: Disabling mod_ssl and mod_nss :: actually running 'httpDisableMod ssl nss'
:: [  BEGIN   ] :: Disabling /etc/httpd/conf.d/ssl.conf :: actually running 'mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.disabled'
:: [   PASS   ] :: Disabling /etc/httpd/conf.d/ssl.conf (Expected 0, got 0)
:: [   PASS   ] :: Disabling mod_ssl and mod_nss (Expected 0, got 0)
:: [  BEGIN   ] :: starting httpd service :: actually running 'rlServiceStart httpd'
httpd is stopped
Starting httpd: gzip: /var/log/httpd/errorX.1481897780 has 1 other link  -- unchanged
[  OK  ]
:: [ 14:16:20 ] :: rlServiceStart: Service httpd started successfully
:: [   PASS   ] :: starting httpd service (Expected 0, got 0)
:: [  BEGIN   ] :: Creating test file :: actually running 'echo 'ok' > /var/www/html/http_testfile'
:: [   PASS   ] :: Creating test file (Expected 0, got 0)
:: [   PASS   ] :: Restarting httpd (Expected 0, got 0)
:: [  BEGIN   ] :: Looking for possible running gzip proces. :: actually running 'ps -A | grep 'gzip' | tee output2.log'
31183 ?        00:00:00 gzip <defunct>
:: [   FAIL   ] :: Looking for possible running gzip proces. (Expected 1, got 0)
:: [   FAIL   ] :: File 'output2.log' should not contain 'gzip' 
31183 ?        00:00:00 gzip <defunct>
'89ec0eda-b609-4fb6-b3e9-179e944b045d'
Test result: FAIL
   metric: 2
   Log: /var/tmp/beakerlib-49194282/journal.txt
    Info: Searching AVC errors produced since 1481915779.82 (Fri Dec 16 14:16:19 2016)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.6k1WtR
:
   AvcLog: /mnt/testarea/tmp.6k1WtR


New Pass:
:: [   LOG    ] :: Installed:    : httpd-2.2.15-59.el6.x86_64 

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Looking for possible running gzip proces. :: actually running 'ps -A | grep 'gzip' | tee output1.log'
:: [   PASS   ] :: Looking for possible running gzip proces. (Expected 1, got 1)
:: [   PASS   ] :: File 'output1.log' should not contain 'gzip' 
:: [  BEGIN   ] :: Restarting httpd :: actually running 'httpStart'
httpd is stopped
:: [  BEGIN   ] :: Disabling mod_ssl and mod_nss :: actually running 'httpDisableMod ssl nss'
:: [  BEGIN   ] :: Disabling /etc/httpd/conf.d/ssl.conf :: actually running 'mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.disabled'
:: [   PASS   ] :: Disabling /etc/httpd/conf.d/ssl.conf (Expected 0, got 0)
:: [   PASS   ] :: Disabling mod_ssl and mod_nss (Expected 0, got 0)
:: [  BEGIN   ] :: starting httpd service :: actually running 'rlServiceStart httpd'
httpd is stopped
Starting httpd: gzip: /var/log/httpd/errorX.1481897909 has 1 other link  -- unchanged
[  OK  ]
:: [ 14:18:29 ] :: rlServiceStart: Service httpd started successfully
:: [   PASS   ] :: starting httpd service (Expected 0, got 0)
:: [  BEGIN   ] :: Creating test file :: actually running 'echo 'ok' > /var/www/html/http_testfile'
:: [   PASS   ] :: Creating test file (Expected 0, got 0)
:: [   PASS   ] :: Restarting httpd (Expected 0, got 0)
:: [  BEGIN   ] :: Looking for possible running gzip proces. :: actually running 'ps -A | grep 'gzip' | tee output2.log'
:: [   PASS   ] :: Looking for possible running gzip proces. (Expected 1, got 1)
:: [   PASS   ] :: File 'output2.log' should not contain 'gzip' 
'08dc1248-1dce-4260-94e6-12158215ebbb'
Test result: PASS
   metric: 0
   Log: /var/tmp/beakerlib-49194284/journal.txt
    Info: Searching AVC errors produced since 1481915909.16 (Fri Dec 16 14:18:29 2016)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.sNdA5Z
:
   AvcLog: /mnt/testarea/tmp.sNdA5Z

Comment 11 errata-xmlrpc 2017-03-21 11:51:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0784.html


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