ID: 23331
User updated by: jakub at icewarp dot com
Reported By: jakub at icewarp dot com
Status: Open
Bug Type: IIS related
Operating System: win32
PHP Version: 4.3.3RC5-dev
New Comment:
I think I tracked down the leak.
In this function:
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
There's at the end this:
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id,
thread_resources->count);
Now if I uncomment this. It does not leak the memory for the 2 calls
from my last post.
The call translates to
return &thread_resources->storage;
Why should this leak? Please, C++ people help us here.
Previous Comments:
------------------------------------------------------------------------
[2003-10-04 06:17:00] jakub at icewarp dot com
I have been digging more into this issue and I have found this.
1. HttpExtensionProc like this does not leak at all.
DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
{ return 0; }
2. 1. HttpExtensionProc like this does leak.
DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
{
TSRMLS_FETCH();
ts_free_thread();
return 0;
}
It is clear that the ts_free_thread does not free everything. I'm not a
C/C++ guru please people help here. This issue has been here since 2
years ago and nobody fixed it yet. Let me know.
Jakub
------------------------------------------------------------------------
[2003-08-21 10:52:24] jakub at icewarp dot com
I can send you a small tool I made. It connects to any web server and
issues the GET /... HTTP command in a given cycle and given number of
threads. You can test it easily with it. It's very handy. Just let me
know.
------------------------------------------------------------------------
[2003-08-18 09:42:43] jakub at icewarp dot com
That's what I thought of too so I removed all extensions and the
results I posted are without any extensions.
------------------------------------------------------------------------
[2003-08-18 09:31:14] [EMAIL PROTECTED]
You have some extensions loaded in php.ini, right?
Which ones are those? What if you don't load them?
------------------------------------------------------------------------
[2003-08-18 09:24:49] jakub at icewarp dot com
The problem is still there. Nothing has changed.
I performed the same 2 tests.
1. LoadLibrary and FreeLibrary - 200 cycles = 50MB leak
2. HttpExtensionProc - 1000 calls = 500kB leak
Please, let me know how can I help.
Jakub
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/23331
--
Edit this bug report at http://bugs.php.net/?id=23331&edit=1