Bug 585992 - wrong redirection in apachectl command, leaking disk space
wrong redirection in apachectl command, leaking disk space
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd (Show other bugs)
5.6
x86_64 Linux
low Severity medium
: rc
: ---
Assigned To: Joe Orton
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-26 11:35 EDT by jan horacek
Modified: 2010-06-22 16:16 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-22 16:16:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jan horacek 2010-04-26 11:35:34 EDT
Description of problem:

we found leaked storage after some time of server runtime. this was found as possible cause.

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

[root@fort-pub23 rhel-apachectl-fix]# uname -a
Linux fort-pub23 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@fort-pub23 rhel-apachectl-fix]# rpm -qa | grep httpd
httpd-2.2.3-31.el5_4.2
[root@fort-pub23 rhel-apachectl-fix]# rpm -qf /usr/sbin/apachectl
httpd-2.2.3-31.el5_4.2
[root@fort-pub23 rhel-apachectl-fix]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.4 (Tikanga)

found on 5.5 too

How reproducible:


wrong 

Steps to Reproduce:
1.

leave server running with apache running. 

2.
 
disk space is leaking.

3.

after reboot, space is again available

Actual results:


Expected results:


Additional info:

it looks like typo in redirection. here is the fix:

# diff -Nru apachectl.orig apachectl.fixed 
--- apachectl.orig      2009-11-10 15:05:43.000000000 +0100
+++ apachectl.fixed     2010-04-26 17:26:06.000000000 +0200
@@ -101,7 +101,7 @@
 
 case $ARGV in
 restart|graceful)
-    if $HTTPD $OPTIONS -t >&/dev/null; then
+    if $HTTPD $OPTIONS -t &>/dev/null; then
        $HTTPD $OPTIONS -k $ARGV
        ERROR=$?
     else
Comment 1 Joe Orton 2010-04-26 13:06:54 EDT
Those are equivalent in bash; what led do you make that change and what difference does it make?

If you are regularly doing a reload/graceful restart of httpd, various modules can leak memory.
Comment 2 jan horacek 2010-04-26 16:44:33 EDT
thanks for fast response.

this redirection was the first thing that was suspicious for us. script hash /bin/sh (not bash) shebang and this type of redirection is not common (>& is used mostly with output redirection by id) i checked that newer apache2 package in debian is using the more common style "2>/dev/null"

what is leaking is not ram memory, but disk space.

we will follow this issue more and report any informations.
Comment 3 Joe Orton 2010-06-09 11:20:37 EDT
Do you have further feedback on the issue?
Comment 4 jan horacek 2010-06-22 16:11:49 EDT
no i have nothing to add. i vote for closing this bug as notabug
Comment 5 Joe Orton 2010-06-22 16:16:26 EDT
OK, thanks for getting back to us.

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