From: paras_shah2 at symantec dot com Operating system: Windows 2k3, XP PHP version: 5.2CVS-2009-02-12 (snap) PHP Bug Type: Apache related Bug description: Problem with memory leaks in php5ts.dll PostPosted: Wed Feb 11, 2009 10:46 am
Description: ------------ Hi , I have PHP (5.2.6) running as Apache module on apache web server 5.0. We found memory leaks in zend_read_static_property() and zend_hash_quick_add_or_update() as number of clients increase from 100 to 300 etc. Please find following readings for details. I would like to know is anybody face memory leaks issues in zend_read_static_property() and zend_hash_quick_add_or_update() functions. If yes then what needs to be done to resolve this issue.Please notes that as per my initial analysis it seems these functions are part of php5ts.dll and this dll is initialized and load by php.exe. I would be grateful to you if you could answer my query as early as possible.Please reply earliest. Thanks, Paras 300 Client Log Excerpt: ( Test ran with php.ini changes - session.gc_maxlifetime = 20 mins, memory_limit = 10MB) 1. zend_read_static_property() method allocates ~70MB + 70516736 ( 70778880 - 262144) 270 allocs BackTrace51D + 269 ( 270 - 1) BackTrace51D allocations ntdll!RtlAllocateHeapSlowly+00000041 ntdll!RtlAllocateHeap+00000E9F php5ts!zend_read_static_property+000000E5 php5ts!zend_mm_shutdown+00000102 2. zend_hash_quick_add_or_update() method allocates ~54MB + 54264832 ( 54572964 - 308132) 635465 allocs BackTrace3F1 + 632150 ( 635465 - 3315) BackTrace3F1 allocations ntdll!RtlAllocateHeapSlowly+00000041 ntdll!RtlAllocateHeap+00000E9F msvcrt!malloc+0000006C php5ts!zend_hash_quick_add_or_update+00000261 100 Client Log Excerpt:( Test ran without php.ini, session.gc_maxlifetime = 30 days, memory_limit= not set, i.e., PHP default 128MB is set) 1. zend_read_static_property() method allocates ~3MB + 3407872 ( 3670016 - 262144) 14 allocs BackTrace51D + 13 ( 14 - 1) BackTrace51D allocations ntdll!RtlAllocateHeapSlowly+00000041 ntdll!RtlAllocateHeap+00000E9F php5ts!zend_read_static_property+000000E5 php5ts!zend_mm_shutdown+00000102 2. zend_hash_quick_add_or_update() method allocates ~4MB + 4459436 ( 4767568 - 308132) 55168 allocs BackTrace3F1 + 51853 ( 55168 - 3315) BackTrace3F1 allocations ntdll!RtlAllocateHeapSlowly+00000041 ntdll!RtlAllocateHeap+00000E9F msvcrt!malloc+0000006C php5ts!zend_hash_quick_add_or_update+00000261 Reproduce code: --------------- This reproduccible through performance tool -- Edit bug report at http://bugs.php.net/?id=47364&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47364&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47364&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47364&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47364&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47364&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47364&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47364&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47364&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47364&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47364&r=support Expected behavior: http://bugs.php.net/fix.php?id=47364&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47364&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47364&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47364&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47364&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47364&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47364&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47364&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47364&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47364&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47364&r=mysqlcfg
