Problem with memory leaks in php5ts.dll
Posted: Wed Feb 11, 2009 9:46 am
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
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