php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35820 php4ts.dll memory leak
Submitted: 2005-12-27 19:28 UTC Modified: 2006-01-17 20:00 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:4 (100.0%)
From: ottawaremovethissixtyseven at hotmail dot com Assigned:
Status: Closed Package: IIS related
PHP Version: 5CVS-2006-01-05 (snap) OS: W2K
Private report: No CVE-ID: None
 [2005-12-27 19:28 UTC] ottawaremovethissixtyseven at hotmail dot com
Description:
------------
Latest 4.x snapshot has memory leaks in php4ts.dll.

Here is the output from the debugger:
---------------------------------------------------
php4ts.dll is responsible for 45.47 MBytes worth of outstanding allocations (92% Leak Probability). The following are the top 2 memory consuming functions:

php4ts!XmlParseXmlDecl+9d: 21.43 MBytes worth of outstanding allocations.
php4ts!XmlParseXmlDecl+fb: 13.86 MBytes worth of outstanding allocations.
---------------------------------------------------

We are running performance tests against W2K/IIS5 in ISAPI mode. Very simple PHP scripts which open a connection to Oracle thru ODBC. These performance test run without issue in CGI mode but the CPU performance is unacceptable so we are trying to get ISAPI working.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-04 22:50 UTC] tony2001@php.net
Debug symbols:
http://snaps.php.net/win32/php5.1-dbgpack-win32-latest.zip

>There is a significant memory leak in php5ts.dll.
It's great that you keep repeating this and still have not provided any information about the problem.
Does your debugger provide it?

Honestly saying, I don't think this leak even exists, because I can't see any leaks with valgrind on Linux (and I'm sure nobody is able to reproduce it on Windows) and I incline to think that your debugging tool gives you wrong results.
 [2006-01-07 04:46 UTC] ottawaremovethissixtyseven at hotmail dot com
Load Test:

5 hours. 300 concurrent users loading phpinfo().

DebugDiag results:

php5ts.dll is responsible for 83.81 MBytes worth of outstanding allocations (69% Leak Probability). The following are the top 2 memory consuming functions:

php5ts!_zend_hash_add_or_update+2da: 39.46 MBytes worth of outstanding allocations.

php5ts!_zend_hash_add_or_update+15d: 23.05 MBytes worth of outstanding allocations.
 [2006-01-07 11:45 UTC] tony2001@php.net
Nice try, but this info is totally useless without a calltrace.
 [2006-01-07 17:06 UTC] ottawaremovethissixtyseven at hotmail dot com
What exactly is a calltrace? I will try and provide this.
 [2006-01-07 17:11 UTC] sniper@php.net
It's the thing that contains the function calls that called those functions that leaked. But try provide a reproducing script first. And not one with phpinfo(); which we know leaks.
(it's meant to leak, no bug there)
 [2006-01-08 13:22 UTC] nlopess@php.net
I assume you are using the new IIS Debug Diagnostics Tool, so if you load the PHP debug symbols correctly you'll receive a more human-understandable report that you can send to us.
I have not tried PHP4, but I don't get any error with PHP 5 (well I don't know which extensions you are using..)
 [2006-01-11 19:18 UTC] ottawaremovethissixtyseven at hotmail dot com
Yes. We are using IIS Debug Diagnostics Tool. We will send a human readable report shortly.

Can you please tell me where I can find the debug symbols for the PHP 5.1.1 official November 28th release?
 [2006-01-11 22:19 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip

You can find the debug pack here for it: http://snaps.php.net/

 [2006-01-17 17:31 UTC] ottawaremovethissixtyseven at hotmail dot com
There is a memory leak in php4ts.dll.
The answer is to switch to PHP 5.

There is no memory leak in php5ts.dll (version 5.1).

We thought there was a memory leak in php5ts.dll but found out phpinfo() is meant to leak. It's not a bug. We didn't know this.

As soon as we switched to a different script for testing, we saw no more memory leaks in php5ts.dll

You can close this case and thank you all for your patience and help in this issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 15:01:31 2024 UTC