ID: 47090 Updated by: j...@php.net Reported By: dominique dot fournier at grenoble dot cnrs dot fr dot -Status: Open +Status: Feedback Bug Type: Streams related Operating System: Linux PHP Version: 5.2.8 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ And when you test new versions, UPDATE the version field to reflect the last version you could reproduce this. Also: minimize the configure line to the bare minimum one with which you can still reproduce this, disable ALL shared extensions, etc. The line you showed above contains stuff that hasn't existed for years.. Previous Comments: ------------------------------------------------------------------------ [2009-01-14 10:48:50] dominique dot fournier at grenoble dot cnrs dot fr dot 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 ------------------------------------------------------------------------ [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