#31558 [Fbk->Opn]: "apachectl graceful" leaks

From: Date: Tue, 17 May 2005 22:49:55 +0000
Subject: #31558 [Fbk->Opn]: "apachectl graceful" leaks
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79120@lists.php.net to get a copy of this message
 ID:               31558
 User updated by:  jdw at nearlyfreespeech dot net
 Reported By:      jdw at nearlyfreespeech dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         Apache related
 Operating System: FreeBSD
 PHP Version:      4CVS-2005-01-21
 New Comment:

Interestingly, there is some evidence that this bug may be either
mitigated or fixed in 4.3.11.

We have also switched to using more shared modules, so it is also
possible that the leak still exists, but is related to a specific
extension that is now not being loaded by the "core" apache process
(causing the leak not to accrue across generations).  It may be
possible for us to investigate that possibility and provide more
information to rule it in or out.


Previous Comments:
------------------------------------------------------------------------

[2005-05-18 00:16:04] sniper@php.net

Yes it would. We're currently focused on PHP 5 development, and if you
really want stuff get fixed: Try the snapshot.
(if this happens in PHP 5.1-dev too, it's more likely to be fixed also
in the PHP_4_3 branch..)


------------------------------------------------------------------------

[2005-05-17 14:11:36] jdw at nearlyfreespeech dot net

Um, as this is a PHP 4 bug, trying a PHP 5 snapshot would not seem to
be appropriate.

------------------------------------------------------------------------

[2005-05-17 12:02:53] sniper@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

[2005-01-22 06:55:13] jdw at nearlyfreespeech dot net

I also looked at the source code.  Without a detailed understanding of
zend_hash_*, it isn't clear that all the per_dir_info malloc() cases in
sapi/apache/mod_php4.c (particularly php_value_handler_ex() ) are being
properly freed by php_destroy_per_dir_info().  That's just a WAG, but
it might be something to look into as a possible cause.

------------------------------------------------------------------------

[2005-01-22 06:48:32] jdw at nearlyfreespeech dot net

This test has been completed.  I believe this graph of the results
pretty much speaks for itself:

http://example.nfshost.com/ApacheGracefulMem.png

Results:
- With PHP enabled, "graceful" leak averages 903,000 bytes
- With PHP disabled, "graceful" leak averages 8,900 bytes
- "No PHP" test memory usage *converges* (leaks are front-loaded and
poorly represented by the linear fit -- hard to see because of the
scale of the graph)
- "PHP" test memory usage *diverges* (increases linearly until process
limits intervene)

Methodology:
- Apache 1.3.33
- PHP version php4-STABLE-200501210130
- same Apache binary, same server, same conditions
- same conf file (with "LoadModule php4_module" "php_admin_value" and
"php_value" lines removed for the "No HP" test)
- 200 consecutive "graceful" restarts of Apache process
- considering only "master" process
- no requests issued during test

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/31558

-- 
Edit this bug report at http://bugs.php.net/?id=31558&edit=1


Thread (18 messages)

« previous php.bugs (#79120) next »