Edit report at https://bugs.php.net/bug.php?id=55115&edit=1

 ID:                 55115
 Updated by:         s...@php.net
 Reported by:        ar...@php.net
 Summary:            Large segment of memory still reachable with more
                     than one request
 Status:             Assigned
 Type:               Bug
 Package:            Built-in web server
 Operating System:   Ubuntu
 PHP Version:        5.4SVN-2011-07-03 (SVN)
 Assigned To:        moriyoshi
 Block user comment: N
 Private report:     N

 New Comment:

If use the RFC routing example, starting the server as "php -S localhost:8000 
routing.php" and browse for an existing JPG files, I see:

PHP Development Server is listening on localhost:8000 in 
/home/cjones/public_html ... Press Ctrl-C to quit.
[Wed Jul  6 13:09:58 2011] ::1:39867: /oraclelogo.jpg
[Wed Jul  6 13:09:58 2011]  Script:  '/home/cjones/public_html/oraclelogo.jpg'
/home/cjones/phpsrc/php/php-src/branches/PHP_5_4/main/output.c(802) :  Freeing 
0xB4F53250 (48 bytes), script=/home/cjones/public_html/oraclelogo.jpg
/home/cjones/phpsrc/php/php-src/branches/PHP_5_4/Zend/zend_alloc.c(2529) : 
Actual location (location was relayed)
[Wed Jul  6 13:09:58 2011]  Script:  '/home/cjones/public_html/oraclelogo.jpg'
/home/cjones/phpsrc/php/php-src/branches/PHP_5_4/main/output.c(803) :  Freeing 
0xB4F532AC (23 bytes), script=/home/cjones/public_html/oraclelogo.jpg
[Wed Jul  6 13:09:58 2011]  Script:  '/home/cjones/public_html/oraclelogo.jpg'
/home/cjones/phpsrc/php/php-src/branches/PHP_5_4/main/output.c(808) :  Freeing 
0xB4F532F0 (8192 bytes), script=/home/cjones/public_html/oraclelogo.jpg
[Wed Jul  6 13:09:58 2011]  Script:  '/home/cjones/public_html/oraclelogo.jpg'
/home/cjones/phpsrc/php/php-src/branches/PHP_5_4/Zend/zend_stack.c(37) :  
Freeing 0xB4F5531C (256 bytes), script=/home/cjones/public_html/oraclelogo.jpg
[Wed Jul  6 13:09:58 2011]  Script:  '/home/cjones/public_html/oraclelogo.jpg'
/home/cjones/phpsrc/php/php-src/branches/PHP_5_4/Zend/zend_stack.c(42) :  
Freeing 0xB4F55448 (4 bytes), script=/home/cjones/public_html/oraclelogo.jpg
=== Total 5 memory leaks detected ===
[Wed Jul  6 13:09:59 2011] ::1:39868: /favicon.ico

If I repeat this with valgrind, I see the same output.  After ^C, I get 5.5K 
loss records reported by valgrind.


Previous Comments:
------------------------------------------------------------------------
[2011-07-03 00:32:32] ar...@php.net

Description:
------------
When using the CLI server, more than one access results in a huge amount of 
still reachable memory.

Test script:
---------------
touch t.php
valgrind --leak-check=full --show-reachable=yes php -S localhost:8080
[browser] /t.php
[browser] /t.php
<ctrl+c>

Actual result:
--------------
55k lines of segments that are apparently still reachable


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



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

Reply via email to