ID: 47090
User updated by: dominique dot fournier at grenoble dot cnrs dot fr dot
Reported By: dominique dot fournier at grenoble dot cnrs dot fr dot
Status: Open
Bug Type: Streams related
Operating System: Linux
PHP Version: 5.2.8
New Comment:
More informations :
CVS version has the problem too. BUT : when PHP is compiled with
--enable-debug option, the leak disapear. Without debug, and with
USE_ZEND_ALLOC=1, the problem persist.
./configure --prefix=/usr --disable-cgi
--with-config-file-path=/etc/php5/cli
--with-config-file-scan-dir=/etc/php5/cli/conf.d --build=i486-linux-gnu
--host=i486-linux-gnu --mandir=/usr/share/man --enable-memory-limit
--with-regex=php --disable-rpath --disable-static --with-pic
--with-layout=GNU --with-pear=/usr/share/php --enable-calendar
--enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-track-vars
--enable-trans-sid --enable-bcmath --with-bz2 --enable-ctype --with-db4
--without-gdbm --with-iconv --enable-exif --enable-filepro --enable-ftp
--with-gettext --enable-mbstring --with-pcre-regex=/usr --enable-shmop
--enable-sockets --enable-wddx --with-libxml-dir=/usr --with-zlib
--with-kerberos=/usr --with-openssl=/usr --enable-dbx --enable-soap
--enable-zip --with-mime-magic=/usr/share/file/magic.mime
--with-exec-dir=/usr/lib/php5/libexec --without-mm --disable-pdo
--without-mysql --without-sybase-ct --without-sqlite --enable-pcntl
--with-ncurses=/usr --enable-debug
OR --disable-debug
Previous Comments:
------------------------------------------------------------------------
[2009-01-14 02:28:22] crrodriguez at opensuse dot org
Cannot reproduce,memory usage is stable with 5_2 and 5_3.
------------------------------------------------------------------------
[2009-01-13 16:26:42] dominique dot fournier at grenoble dot cnrs dot
fr dot
Description:
------------
When export USE_ZEND_ALLOC=1, before run the following script in CLI,
there is a memory_leak.
When export USE_ZEND_ALLOC=0, the script leave on the same value.
The IP in the script is available, but the port is closed (no service
available on this port).
Reproduce code:
---------------
<?
for ($i =0 ; $i <30 ; $i++)
{
$...@stream_socket_client('tcp://127.0.0.1:800', $error, $err);
unset ($fp);
unset ($error);
unset ($err);
echo memory_get_usage()."\n";
}
?>
Expected result:
----------------
Always the same value (in my case, when ALLOC=0, 8200)
Actual result:
--------------
49936
50016
50044
... repeat with an increment 30 times
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47090&edit=1