php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51347 mysqli_close / connection memory leak
Submitted: 2010-03-22 04:17 UTC Modified: 2010-05-15 12:50 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:4 (100.0%)
From: mat999 at gmail dot com Assigned: mysql
Status: Closed Package: MySQLi related
PHP Version: 5.3.2 OS: Debian Lenny / Linux
Private report: No CVE-ID:
 [2010-03-22 04:17 UTC] mat999 at gmail dot com
Description:
------------
Reproduced on:
 - Debian Lenny (dotdeb): PHP 5.3.2
 - Fastcgi & CLI
 - With and without xcache
 - amd64 architecture


Test script:
---------------
<?php
for($i=0;$i<=100000;$i++){
    $m = mysqli_init();
    mysqli_real_connect($m,'localhost','root','passwordmysql');
    $m = mysqli_close($m);
    unset($m);
    if(($i%1000)===0){
        echo "Memory consumption after $i iterations is " . memory_get_usage() . "<br /><br />";
        flush();
    }
}
die();
?>



Expected result:
----------------
Loop with a little if any memory increase.

Actual result:
--------------
Memory consumption after 0 iterations is 660120

Memory consumption after 1000 iterations is 852600

Memory consumption after 2000 iterations is 1044832

Memory consumption after 3000 iterations is 1245216

Memory consumption after 4000 iterations is 1429224

Memory consumption after 5000 iterations is 1645992

Memory consumption after 6000 iterations is 1830000

Memory consumption after 7000 iterations is 2014000

Memory consumption after 8000 iterations is 2198016

Memory consumption after 9000 iterations is 2447552

Memory consumption after 10000 iterations is 2631608

Memory consumption after 11000 iterations is 2815608

Memory consumption after 12000 iterations is 2999616

Memory consumption after 13000 iterations is 3183624

Memory consumption after 14000 iterations is 3367624

Memory consumption after 15000 iterations is 3551640

Memory consumption after 16000 iterations is 3735648

Memory consumption after 17000 iterations is 4050720

Memory consumption after 18000 iterations is 4234728

Memory consumption after 19000 iterations is 4418728

Memory consumption after 20000 iterations is 4602736

Memory consumption after 21000 iterations is 4786744

Memory consumption after 22000 iterations is 4970744

Memory consumption after 23000 iterations is 5154760

Memory consumption after 24000 iterations is 5338768

Memory consumption after 25000 iterations is 5522776

Memory consumption after 26000 iterations is 5706776

Memory consumption after 27000 iterations is 5890792

Memory consumption after 28000 iterations is 6074800

Memory consumption after 29000 iterations is 6258800

Memory consumption after 30000 iterations is 6442808

Memory consumption after 31000 iterations is 6626824

Memory consumption after 32000 iterations is 6810832

Memory consumption after 33000 iterations is 7256976

Memory consumption after 34000 iterations is 7440984

Memory consumption after 35000 iterations is 7625000

Memory consumption after 36000 iterations is 7809000

Memory consumption after 37000 iterations is 7993008

Memory consumption after 38000 iterations is 8177016

Memory consumption after 39000 iterations is 8361016

Memory consumption after 40000 iterations is 8545032

Memory consumption after 41000 iterations is 8729040

Memory consumption after 42000 iterations is 8913048

Memory consumption after 43000 iterations is 9097048

Memory consumption after 44000 iterations is 9281064

Memory consumption after 45000 iterations is 9465072

Memory consumption after 46000 iterations is 9649072

Memory consumption after 47000 iterations is 9833080

Memory consumption after 48000 iterations is 10017096

Memory consumption after 49000 iterations is 10201096

Memory consumption after 50000 iterations is 10385104

Memory consumption after 51000 iterations is 10569112

Memory consumption after 52000 iterations is 10753128

Memory consumption after 53000 iterations is 10937128

Memory consumption after 54000 iterations is 11121136

Memory consumption after 55000 iterations is 11305144

Memory consumption after 56000 iterations is 11489144

Memory consumption after 57000 iterations is 11673160

Memory consumption after 58000 iterations is 11857168

Memory consumption after 59000 iterations is 12041168

Memory consumption after 60000 iterations is 12225176

Memory consumption after 61000 iterations is 12409192

Memory consumption after 62000 iterations is 12593200

Memory consumption after 63000 iterations is 12777200

Memory consumption after 64000 iterations is 12961208

Memory consumption after 65000 iterations is 13145224

Memory consumption after 66000 iterations is 13853512

Memory consumption after 67000 iterations is 14037520

Memory consumption after 68000 iterations is 14221528

Memory consumption after 69000 iterations is 14405528

Memory consumption after 70000 iterations is 14589544

Memory consumption after 71000 iterations is 14773552

Memory consumption after 72000 iterations is 14957560

Memory consumption after 73000 iterations is 15141560

Memory consumption after 74000 iterations is 15325576

Memory consumption after 75000 iterations is 15509584

Memory consumption after 76000 iterations is 15693584

Memory consumption after 77000 iterations is 15877592

Memory consumption after 78000 iterations is 16061608

Memory consumption after 79000 iterations is 16245616

Memory consumption after 80000 iterations is 16429616

Memory consumption after 81000 iterations is 16613624

Memory consumption after 82000 iterations is 16797640

Memory consumption after 83000 iterations is 16981640

Memory consumption after 84000 iterations is 17165648

Memory consumption after 85000 iterations is 17349656

Memory consumption after 86000 iterations is 17533656

Memory consumption after 87000 iterations is 17717672

Memory consumption after 88000 iterations is 17901680

Memory consumption after 89000 iterations is 18085688

Memory consumption after 90000 iterations is 18269688

Memory consumption after 91000 iterations is 18453704

Memory consumption after 92000 iterations is 18637712

Memory consumption after 93000 iterations is 18821712

Memory consumption after 94000 iterations is 19005720

Memory consumption after 95000 iterations is 19189736

Memory consumption after 96000 iterations is 19373736

Memory consumption after 97000 iterations is 19557744

Memory consumption after 98000 iterations is 19741752

Memory consumption after 99000 iterations is 19925768

Memory consumption after 100000 iterations is 20109768


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-23 14:02 UTC] kalle@php.net
Did you compile PHP with mysqlnd or libmysql?
 [2010-03-23 14:04 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2010-03-23 21:42 UTC] mat999 at gmail dot com
-Status: Feedback +Status: Open
 [2010-03-23 21:42 UTC] mat999 at gmail dot com
No mysqlnd.
 [2010-03-24 13:56 UTC] uw@php.net
Please also try without Zend

nixnutz@ulflinux:~/src/php/php-src/branches/PHP_5_3> USE_ZEND_ALLOC=0 sapi/cli/php foo.php
Memory consumption after 0 iterations is 8280
Memory consumption after 1000 iterations is 8280
Memory consumption after 2000 iterations is 8280
Memory consumption after 3000 iterations is 8280
Memory consumption after 4000 iterations is 8280
Memory consumption after 5000 iterations is 8280
Memory consumption after 6000 iterations is 8280
Memory consumption after 7000 iterations is 8280
Memory consumption after 8000 iterations is 8280
Memory consumption after 9000 iterations is 8280
Memory consumption after 10000 iterations is 8280
 [2010-03-24 23:52 UTC] mat999 at gmail dot com
Yes that is the result obtained with that ENV var set, howeaver the processes usage still grows.

64031 root      20   0  173m  44m 6652 S   43  2.3   0:09.46 php5

In order to obtain that reading the following was used:
before executing:
USE_ZEND_ALLOC=0
export USE_ZEND_ALLOC=0

Script:
<?php
for($i=0;$i<=1000000;$i++){
    $m = mysqli_init();
    mysqli_real_connect($m,'localhost','root','passwordmysql');
    $m = mysqli_close($m);
    unset($m);
    if(($i%1000)===0){
        echo "Memory consumption after $i iterations is " . memory_get_usage() . "<br /><br />";
        flush();
        usleep(200);
    }
}
die();
?>

and top to obtain the usage
 [2010-04-01 13:50 UTC] andrey@php.net
Automatic comment from SVN on behalf of andrey
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=297271
Log: Fixed bug #51347 mysqli_close / connection memory leak
Streams API registers every stream as resource, which lands then
in EG(regular_list), however doesn't clean that when the stream is
closed. At the end this is a para-leak. At the end of the script
all memory is cleaned, however this is a problem for long runnig
scripts that open connections. For every opened and closed connection
about 150 Bytes on 32bit and 250 Bytes on 64bit will be &quot;lost&quot;,
according to memory_get_usage().
 [2010-04-01 14:46 UTC] andrey@php.net
Automatic comment from SVN on behalf of andrey
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=297274
Log: Better fix for bug #51347 mysqli_close / connection memory leak
 [2010-04-06 07:38 UTC] mat999 at gmail dot com
Gee, no responses on a proven bug...

Heres valgrind info, sorry no debug symbols for php5-mysql


[...]
==49959== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 52 from 4)
--49959--
--49959-- supp:     22 dl-hack4-64bit-addr-1
--49959-- supp:      2 dl-hack3-cond-2
--49959-- supp:     27 dl-hack3-cond-1
--49959-- supp:      1 dl-hack4-64bit-addr-2
==49959== malloc/free: in use at exit: 6,394 bytes in 22 blocks.
==49959== malloc/free: 31,095 allocs, 31,073 frees, 4,718,692 bytes allocated.
==49959==
==49959== searching for pointers to 22 not-freed blocks.
==49959== checked 1,626,688 bytes.
==49959==
==49959== 5 bytes in 1 blocks are indirectly lost in loss record 1 of 11
==49959==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==49959==    by 0x9161D71: strdup (in /lib/libc-2.7.so)
==49959==    by 0x91A0036: (within /lib/libc-2.7.so)
==49959==    by 0x91A1F78: getaddrinfo (in /lib/libc-2.7.so)
==49959==    by 0xA5C017E: ???
==49959==    by 0xA5C030D: ???
==49959==    by 0xA5C0488: ???
==49959==    by 0xA5C04A9: ???
==49959==    by 0xA5C7D96: ???
==49959==    by 0xA38C5FC: ???
==49959==    by 0x74A6CA: zend_startup_module_ex (in /usr/bin/php5)
==49959==    by 0x752E3A: zend_hash_apply (in /usr/bin/php5)
==49959==
==49959==
==49959== 12 bytes in 1 blocks are still reachable in loss record 2 of 11
==49959==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==49959==    by 0x9161D71: strdup (in /lib/libc-2.7.so)
==49959==    by 0x555354: zm_startup_intl (in /usr/bin/php5)
==49959==    by 0x74A6CA: zend_startup_module_ex (in /usr/bin/php5)
==49959==    by 0x752E3A: zend_hash_apply (in /usr/bin/php5)
==49959==    by 0x74DC29: zend_startup_modules (in /usr/bin/php5)
==49959==    by 0x6F1399: php_module_startup (in /usr/bin/php5)
==49959==    by 0x7D7B4C: php_cli_startup (in /usr/bin/php5)
==49959==    by 0x7D850F: main (in /usr/bin/php5)
==49959==
==49959==
==49959== 12 bytes in 1 blocks are still reachable in loss record 3 of 11
==49959==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==49959==    by 0x777588D: uprv_getDefaultLocaleID_3_8 (in /usr/lib/libicuuc.so.38.1)
==49959==    by 0x77AC129: (within /usr/lib/libicuuc.so.38.1)
==49959==    by 0x77AC2AE: icu_3_8::Locale::getDefault() (in /usr/lib/libicuuc.so.38.1)
==49959==    by 0x77AD7C8: (within /usr/lib/libicuuc.so.38.1)
==49959==    by 0x55534C: zm_startup_intl (in /usr/bin/php5)
==49959==    by 0x74A6CA: zend_startup_module_ex (in /usr/bin/php5)
==49959==    by 0x752E3A: zend_hash_apply (in /usr/bin/php5)
==49959==    by 0x74DC29: zend_startup_modules (in /usr/bin/php5)
==49959==    by 0x6F1399: php_module_startup (in /usr/bin/php5)
==49959==    by 0x7D7B4C: php_cli_startup (in /usr/bin/php5)
==49959==    by 0x7D850F: main (in /usr/bin/php5)
==49959==
==49959==
==49959== 32 bytes in 1 blocks are still reachable in loss record 4 of 11
==49959==    at 0x4C203E4: calloc (vg_replace_malloc.c:397)
==49959==    by 0x66C73DF: (within /lib/libdl-2.7.so)
==49959==    by 0x66C6F20: dlopen (in /lib/libdl-2.7.so)
==49959==    by 0x752274: zend_load_extension (in /usr/bin/php5)
==49959==    by 0x73D30D: zend_llist_apply (in /usr/bin/php5)
==49959==    by 0x6F8226: php_ini_register_extensions (in /usr/bin/php5)
==49959==    by 0x6F1394: php_module_startup (in /usr/bin/php5)
==49959==    by 0x7D7B4C: php_cli_startup (in /usr/bin/php5)
==49959==    by 0x7D850F: main (in /usr/bin/php5)
==49959==
==49959==
==49959== 53 bytes in 2 blocks are definitely lost in loss record 5 of 11
==49959==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==49959==    by 0xA5BF317: ???
==49959==    by 0xA5C0269: ???
==49959==    by 0xA5C030D: ???
==49959==    by 0xA5C0488: ???
==49959==    by 0xA5C04A9: ???
==49959==    by 0xA5C7D96: ???
==49959==    by 0xA38C5FC: ???
==49959==    by 0x74A6CA: zend_startup_module_ex (in /usr/bin/php5)
==49959==    by 0x752E3A: zend_hash_apply (in /usr/bin/php5)
==49959==    by 0x74DC29: zend_startup_modules (in /usr/bin/php5)
==49959==    by 0x6F1399: php_module_startup (in /usr/bin/php5)
==49959==
==49959==
==49959== 69 (64 direct, 5 indirect) bytes in 1 blocks are definitely lost in loss record 6 of 11
==49959==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==49959==    by 0x919FC83: (within /lib/libc-2.7.so)
==49959==    by 0x91A1F78: getaddrinfo (in /lib/libc-2.7.so)
==49959==    by 0xA5C017E: ???
==49959==    by 0xA5C030D: ???
==49959==    by 0xA5C0488: ???
==49959==    by 0xA5C04A9: ???
==49959==    by 0xA5C7D96: ???
==49959==    by 0xA38C5FC: ???
==49959==    by 0x74A6CA: zend_startup_module_ex (in /usr/bin/php5)
==49959==    by 0x752E3A: zend_hash_apply (in /usr/bin/php5)
==49959==    by 0x74DC29: zend_startup_modules (in /usr/bin/php5)
==49959==
==49959==
==49959== 176 bytes in 1 blocks are still reachable in loss record 7 of 11
==49959==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==49959==    by 0x77AC169: (within /usr/lib/libicuuc.so.38.1)
==49959==    by 0x77AC2AE: icu_3_8::Locale::getDefault() (in /usr/lib/libicuuc.so.38.1)
==49959==    by 0x77AD7C8: (within /usr/lib/libicuuc.so.38.1)
==49959==    by 0x55534C: zm_startup_intl (in /usr/bin/php5)
==49959==    by 0x74A6CA: zend_startup_module_ex (in /usr/bin/php5)
==49959==    by 0x752E3A: zend_hash_apply (in /usr/bin/php5)
==49959==    by 0x74DC29: zend_startup_modules (in /usr/bin/php5)
==49959==    by 0x6F1399: php_module_startup (in /usr/bin/php5)
==49959==    by 0x7D7B4C: php_cli_startup (in /usr/bin/php5)
==49959==    by 0x7D850F: main (in /usr/bin/php5)
==49959==
==49959==
==49959== 672 bytes in 1 blocks are still reachable in loss record 8 of 11
==49959==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==49959==    by 0x4011429: (within /lib/ld-2.7.so)
==49959==    by 0x4011A24: (within /lib/ld-2.7.so)
==49959==    by 0x400D385: (within /lib/ld-2.7.so)
==49959==    by 0x401111A: (within /lib/ld-2.7.so)
==49959==    by 0x66C6FBA: (within /lib/libdl-2.7.so)
==49959==    by 0x400D385: (within /lib/ld-2.7.so)
==49959==    by 0x66C736B: (within /lib/libdl-2.7.so)
==49959==    by 0x66C6F20: dlopen (in /lib/libdl-2.7.so)
==49959==    by 0x66A870: php_load_extension (in /usr/bin/php5)
==49959==    by 0x73D30D: zend_llist_apply (in /usr/bin/php5)
==49959==    by 0x6F8239: php_ini_register_extensions (in /usr/bin/php5)
==49959==
==49959==
==49959== 1,272 bytes in 11 blocks are still reachable in loss record 9 of 11
==49959==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==49959==    by 0x59BB8F2: CRYPTO_malloc (in /usr/lib/libcrypto.so.0.9.8)
==49959==    by 0x5A1C2DE: sk_new (in /usr/lib/libcrypto.so.0.9.8)
==49959==    by 0x572D649: (within /usr/lib/libssl.so.0.9.8)
==49959==    by 0x572D858: SSL_COMP_get_compression_methods (in /usr/lib/libssl.so.0.9.8)
==49959==    by 0x5733A0F: SSL_library_init (in /usr/lib/libssl.so.0.9.8)
==49959==    by 0x468BCE: zm_startup_openssl (in /usr/bin/php5)
==49959==    by 0x74A6CA: zend_startup_module_ex (in /usr/bin/php5)
==49959==    by 0x752E3A: zend_hash_apply (in /usr/bin/php5)
==49959==    by 0x74DC29: zend_startup_modules (in /usr/bin/php5)
==49959==    by 0x6F1399: php_module_startup (in /usr/bin/php5)
==49959==    by 0x7D7B4C: php_cli_startup (in /usr/bin/php5)
==49959==
==49959==
==49959== 2,048 bytes in 1 blocks are still reachable in loss record 10 of 11
==49959==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==49959==    by 0x753619: _zend_hash_init (in /usr/bin/php5)
==49959==    by 0x75366C: _zend_hash_init_ex (in /usr/bin/php5)
==49959==    by 0x7472D5: zend_startup (in /usr/bin/php5)
==49959==    by 0x6F0DCF: php_module_startup (in /usr/bin/php5)
==49959==    by 0x7D7B4C: php_cli_startup (in /usr/bin/php5)
==49959==    by 0x7D850F: main (in /usr/bin/php5)
==49959==
==49959==
==49959== 2,048 bytes in 1 blocks are still reachable in loss record 11 of 11
==49959==    at 0x4C2260E: malloc (vg_replace_malloc.c:207)
==49959==    by 0x73DC8D: zend_llist_init (in /usr/bin/php5)
==49959==    by 0x6FA902: sapi_activate (in /usr/bin/php5)
==49959==    by 0x6F0CB3: php_module_startup (in /usr/bin/php5)
==49959==    by 0x7D7B4C: php_cli_startup (in /usr/bin/php5)
==49959==    by 0x7D850F: main (in /usr/bin/php5)
==49959==
==49959== LEAK SUMMARY:
==49959==    definitely lost: 117 bytes in 3 blocks.
==49959==    indirectly lost: 5 bytes in 1 blocks.
==49959==      possibly lost: 0 bytes in 0 blocks.
==49959==    still reachable: 6,272 bytes in 18 blocks.
==49959==         suppressed: 0 bytes in 0 blocks.
--49959--  memcheck: sanity checks: 50 cheap, 4 expensive
--49959--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--49959--  memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10
--49959--  memcheck: auxmaps_L2: 0 searches, 0 nodes
--49959--  memcheck: SMs: n_issued      = 161 (2576k, 2M)
--49959--  memcheck: SMs: n_deissued    = 9 (144k, 0M)
--49959--  memcheck: SMs: max_noaccess  = 524287 (8388592k, 8191M)
--49959--  memcheck: SMs: max_undefined = 14 (224k, 0M)
--49959--  memcheck: SMs: max_defined   = 2155 (34480k, 33M)
--49959--  memcheck: SMs: max_non_DSM   = 160 (2560k, 2M)
--49959--  memcheck: max sec V bit nodes:    8 (0k, 0M)
--49959--  memcheck: set_sec_vbits8 calls: 13 (new: 8, updates: 5)
--49959--  memcheck: max shadow mem size:   6704k, 6M
--49959-- translate:            fast SP updates identified: 21,056 ( 84.1%)
--49959-- translate:   generic_known SP updates identified: 3,640 ( 14.5%)
--49959-- translate: generic_unknown SP updates identified: 331 (  1.3%)
--49959--     tt/tc: 44,478 tt lookups requiring 53,263 probes
--49959--     tt/tc: 44,478 fast-cache updates, 24 flushes
--49959--  transtab: new        18,748 (589,533 -> 7,876,845; ratio 133:10) [0 scs]
--49959--  transtab: dumped     0 (0 -> ??)
--49959--  transtab: discarded  1,820 (46,106 -> ??)
--49959-- scheduler: 5,020,598 jumps (bb entries).
--49959-- scheduler: 50/88,483 major/minor sched events.
--49959--    sanity: 51 cheap, 4 expensive checks.
--49959--    exectx: 12,289 lists, 10,787 contexts (avg 0 per list)
--49959--    exectx: 62,188 searches, 59,102 full compares (950 per 1000)
--49959--    exectx: 65 cmp2, 444 cmp4, 0 cmpAll
--49959--  errormgr: 44 supplist searches, 1,362 comparisons during search
--49959--  errormgr: 52 errlist searches, 607 comparisons during search
 [2010-04-15 12:50 UTC] andrey@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: mysql
 [2010-04-15 12:50 UTC] andrey@php.net
Can you try with 5.3.3-dev. I am sure I fixed this. Not a real leak, more like streams were freeing memory too late. Please try a snapshot from snaps.php.net
 [2010-04-15 13:01 UTC] mat999 at gmail dot com
-Status: Feedback +Status: Open
 [2010-04-15 13:01 UTC] mat999 at gmail dot com
ok on the weekend Ill remake my build environment and see what I can do.
 [2010-04-16 10:41 UTC] johannes@php.net
-Status: Open +Status: Feedback
 [2010-04-16 10:41 UTC] johannes@php.net
Keeping it on "Feedback" till there was actual feedback.
 [2010-04-25 07:08 UTC] mat999 at gmail dot com
-Status: Feedback +Status: Open
 [2010-04-25 07:08 UTC] mat999 at gmail dot com
Ok tested it on php 5.3.2, sorry had issues getting php to build on my server (some hacks to get other stuff compiled have screwed with libs)

Memory consumption after 0 iterations is 637088<br />
Memory consumption after 1000 iterations is 829464<br />
Memory consumption after 2000 iterations is 1021680<br />
Memory consumption after 3000 iterations is 1222080<br />
Memory consumption after 4000 iterations is 1406088<br />
Memory consumption after 5000 iterations is 1622856<br />
Memory consumption after 6000 iterations is 1806856<br />
Memory consumption after 7000 iterations is 1990864<br />
Memory consumption after 8000 iterations is 2174872<br />
Memory consumption after 9000 iterations is 2424448<br />
Memory consumption after 10000 iterations is 2608448<br />
Memory consumption after 11000 iterations is 2792464<br />
Memory consumption after 12000 iterations is 2976472<br />
Memory consumption after 13000 iterations is 3160480<br />
Memory consumption after 14000 iterations is 3344480<br />
Memory consumption after 15000 iterations is 3528496<br />
Memory consumption after 16000 iterations is 3712504<br />
Memory consumption after 17000 iterations is 4027576<br />
Memory consumption after 18000 iterations is 4211640<br />
Memory consumption after 19000 iterations is 4395640<br />
Memory consumption after 20000 iterations is 4579648<br />
Memory consumption after 21000 iterations is 4763656<br />
Memory consumption after 22000 iterations is 4947656<br />
Memory consumption after 23000 iterations is 5131672<br />
Memory consumption after 24000 iterations is 5315680<br />
Memory consumption after 25000 iterations is 5499688<br />
Memory consumption after 26000 iterations is 5683688<br />
Memory consumption after 27000 iterations is 5867704<br />
Memory consumption after 28000 iterations is 6051712<br />
Memory consumption after 29000 iterations is 6235712<br />
Memory consumption after 30000 iterations is 6419720<br />
Memory consumption after 31000 iterations is 6603736<br />
Memory consumption after 32000 iterations is 6787736<br />
Memory consumption after 33000 iterations is 7233888<br />
Memory consumption after 34000 iterations is 7417896<br />
Memory consumption after 35000 iterations is 7601912<br />
Memory consumption after 36000 iterations is 7785912<br />
Memory consumption after 37000 iterations is 7969920<br />
Memory consumption after 38000 iterations is 8153928<br />
Memory consumption after 39000 iterations is 8337928<br />
Memory consumption after 40000 iterations is 8521944<br />
Memory consumption after 41000 iterations is 8705952<br />
Memory consumption after 42000 iterations is 8889952<br />
Memory consumption after 43000 iterations is 9073960<br />
Memory consumption after 44000 iterations is 9257976<br />
Memory consumption after 45000 iterations is 9441984<br />
Memory consumption after 46000 iterations is 9625984<br />
Memory consumption after 47000 iterations is 9809992<br />
Memory consumption after 48000 iterations is 9994008<br />
Memory consumption after 49000 iterations is 10178008<br />
Memory consumption after 50000 iterations is 10362016<br />
Memory consumption after 51000 iterations is 10546024<br />
Memory consumption after 52000 iterations is 10730024<br />
Memory consumption after 53000 iterations is 10914040<br />
Memory consumption after 54000 iterations is 11098048<br />
Memory consumption after 55000 iterations is 11282056<br />
Memory consumption after 56000 iterations is 11466056<br />
Memory consumption after 57000 iterations is 11650072<br />
Memory consumption after 58000 iterations is 11834080<br />
Memory consumption after 59000 iterations is 12018080<br />
Memory consumption after 60000 iterations is 12202088<br />
Memory consumption after 61000 iterations is 12386104<br />
Memory consumption after 62000 iterations is 12570104<br />
Memory consumption after 63000 iterations is 12754112<br />
Memory consumption after 64000 iterations is 12938120<br />
Memory consumption after 65000 iterations is 13122136<br />
Memory consumption after 66000 iterations is 13830424<br />
Memory consumption after 67000 iterations is 14014432<br />
Memory consumption after 68000 iterations is 14198440<br />
Memory consumption after 69000 iterations is 14382440<br />
Memory consumption after 70000 iterations is 14566456<br />
Memory consumption after 71000 iterations is 14750464<br />
Memory consumption after 72000 iterations is 14934472<br />
Memory consumption after 73000 iterations is 15118472<br />
Memory consumption after 74000 iterations is 15302488<br />
Memory consumption after 75000 iterations is 15486496<br />
Memory consumption after 76000 iterations is 15670496<br />
Memory consumption after 77000 iterations is 15854504<br />
Memory consumption after 78000 iterations is 16038520<br />
Memory consumption after 79000 iterations is 16222520<br />
Memory consumption after 80000 iterations is 16406528<br />
Memory consumption after 81000 iterations is 16590536<br />
Memory consumption after 82000 iterations is 16774552<br />
Memory consumption after 83000 iterations is 16958552<br />
Memory consumption after 84000 iterations is 17142560<br />
Memory consumption after 85000 iterations is 17326568<br />
Memory consumption after 86000 iterations is 17510568<br />

Looks like its still there.
 [2010-04-30 01:48 UTC] felipe@php.net
-Status: Open +Status: Assigned
 [2010-05-11 12:10 UTC] andrey@php.net
-Status: Assigned +Status: Feedback
 [2010-05-11 12:10 UTC] andrey@php.net
Yes, 5.3.2 has it, the fix I committed is in 5.3.3-dev, the future 5.3.3. I asked that you try it, if possible. Sources are available at http://snaps.php.net
 [2010-05-14 15:16 UTC] mat999 at gmail dot com
Working on it at the moment. Ill try to get results by the end of the weekend.
 [2010-05-15 02:03 UTC] mat999 at gmail dot com
-Status: Feedback +Status: Open
 [2010-05-15 02:03 UTC] mat999 at gmail dot com
Thanks, your patch has fixed the issue.

Memory consumption after 0 iterations is 628552<br />
Memory consumption after 1000 iterations is 628584<br />
Memory consumption after 2000 iterations is 628584<br />
Memory consumption after 3000 iterations is 628584<br />
Memory consumption after 4000 iterations is 628584<br />
Memory consumption after 5000 iterations is 628584<br />
Memory consumption after 6000 iterations is 628584<br />
Memory consumption after 7000 iterations is 628584<br />
Memory consumption after 8000 iterations is 628584<br />
Memory consumption after 9000 iterations is 628584<br />
Memory consumption after 10000 iterations is 628584<br />
Memory consumption after 11000 iterations is 628584<br />
Memory consumption after 12000 iterations is 628584<br />
Memory consumption after 13000 iterations is 628584<br />
Memory consumption after 14000 iterations is 628584<br />
Memory consumption after 15000 iterations is 628584<br />
Memory consumption after 16000 iterations is 628584<br />
Memory consumption after 17000 iterations is 628584<br />
Memory consumption after 18000 iterations is 628584<br />
Memory consumption after 19000 iterations is 628584<br />
Memory consumption after 20000 iterations is 628584<br />
Memory consumption after 21000 iterations is 628584<br />
Memory consumption after 22000 iterations is 628584<br />
Memory consumption after 23000 iterations is 628584<br />
Memory consumption after 24000 iterations is 628584<br />
Memory consumption after 25000 iterations is 628584<br />
Memory consumption after 26000 iterations is 628584<br />
Memory consumption after 27000 iterations is 628584<br />
Memory consumption after 28000 iterations is 628584<br />
Memory consumption after 29000 iterations is 628584<br />
Memory consumption after 30000 iterations is 628584<br />
Memory consumption after 31000 iterations is 628584<br />
Memory consumption after 32000 iterations is 628584<br />
Memory consumption after 33000 iterations is 628584<br />
Memory consumption after 34000 iterations is 628584<br />
Memory consumption after 35000 iterations is 628584<br />
Memory consumption after 36000 iterations is 628584<br />
Memory consumption after 37000 iterations is 628584<br />
Memory consumption after 38000 iterations is 628584<br />
Memory consumption after 39000 iterations is 628584<br />
Memory consumption after 40000 iterations is 628584<br />
Memory consumption after 41000 iterations is 628584<br />
Memory consumption after 42000 iterations is 628584<br />
Memory consumption after 43000 iterations is 628584<br />
Memory consumption after 44000 iterations is 628584<br />
Memory consumption after 45000 iterations is 628584<br />
Memory consumption after 46000 iterations is 628584<br />
 [2010-05-15 12:50 UTC] johannes@php.net
-Status: Open +Status: Closed
 [2010-05-15 12:50 UTC] johannes@php.net
User confirmed fix -> closed
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 07:02:14 2014 UTC