Bug 585992

Summary: wrong redirection in apachectl command, leaking disk space
Product: Red Hat Enterprise Linux 5 Reporter: jan horacek <jahor>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: low    
Version: 5.6   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-22 20:16:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description jan horacek 2010-04-26 15:35:34 UTC
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
[root@fort-pub23 rhel-apachectl-fix]# rpm -qf /usr/sbin/apachectl
[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:


Steps to Reproduce:

leave server running with apache running. 

disk space is leaking.


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
-    if $HTTPD $OPTIONS -t >&/dev/null; then
+    if $HTTPD $OPTIONS -t &>/dev/null; then
        $HTTPD $OPTIONS -k $ARGV

Comment 1 Joe Orton 2010-04-26 17:06:54 UTC
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 20:44:33 UTC
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 15:20:37 UTC
Do you have further feedback on the issue?

Comment 4 jan horacek 2010-06-22 20:11:49 UTC
no i have nothing to add. i vote for closing this bug as notabug

Comment 5 Joe Orton 2010-06-22 20:16:26 UTC
OK, thanks for getting back to us.