PHP 4.0 Bug #7199 Updated: Memmory leak when calling x-httpd-php-source
| From: | Bug Database | Date: | Sat, 14 Oct 2000 03:40:34 +0000 |
| Subject: | PHP 4.0 Bug #7199 Updated: Memmory leak when calling x-httpd-php-source | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34982@lists.php.net to get a copy of this message | ||
ID: 7199
User Update by: jason@inetgurus.net
Status: Open
Bug Type: Apache related
Description: Memmory leak when calling x-httpd-php-source
Well I have been stabbing at this for a really long time.
I ended up in in zend-scanner.l where I can see lex allocating the 16K block as it should, but I am
not sure how to free a block with zends internal engine. Since the sapi module calls
open_file_for_scanning, I can see why the block is allocated. I have tried calling
zend_destroy_file_handle, since php_execute_script calls it. That did clean the file_handle but not
the memmory area. I can also see the that zend_execute_scripts will recycle from already allocated
code, but of coure just calling open_file_for_scanning would bypass this and not use a cached
instance. Is there a need to clear the current op_array associated with this?
Previous Comments:
---------------------------------------------------------------------------
[2000-10-13 22:20:43] jason@inetgurus.net
bug still exists in latest cvs
---------------------------------------------------------------------------
[2000-10-13 20:53:29] andi@php.net
Can you please try the latest CVS. A memory leak was fixed.
---------------------------------------------------------------------------
[2000-10-13 20:41:17] jason@inetgurus.net
I am currently debugging php trying to find the leak. So far it appears that the memmory segment is
allocated by the function open_file_for_scanning, and that it is never cleared. I will post more as
I find more.
-Jason
---------------------------------------------------------------------------
[2000-10-13 17:28:02] jason@inetgurus.net
Verified bug on php 4.0.3/Apache 1.3.12/Redhat Linux 6.2 Intel/DSO, with the exception of memmory
growing in 4K increments.(Arch difference from sparc)
---------------------------------------------------------------------------
[2000-10-13 16:58:24] jason@inetgurus.net
There is a memmory leak somewhere when requesting a phps file. Apache in single process mode (httpd
-X) will grow exactly 16K each time. I have tested the highlight_file functions and they appear to
be fine. This leads me to believe that the leak is apache specific. I have been tracing through
trying to find the cause and so far have had no luck
Jason
---------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view the rest of the comments,
please view the bug report online.
Full Bug description available at: http://bugs.php.net/?id=7199