php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47364 Problem with memory leaks in php5ts.dll PostPosted: Wed Feb 11, 2009 10:46 am
Submitted: 2009-02-12 05:15 UTC Modified: 2009-02-13 00:12 UTC
From: paras_shah2 at symantec dot com Assigned:
Status: Not a bug Package: Apache related
PHP Version: 5.2.6 OS: win32 only - Windows 2k3, XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: paras_shah2 at symantec dot com
New email:
PHP Version: OS:

 

 [2009-02-12 05:15 UTC] paras_shah2 at symantec dot com
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-13 00:12 UTC] jani@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 03:01:27 2024 UTC