#23331 [Opn]: Memory leak in ISAPI

2003-08-21 Thread jakub at icewarp dot com
 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 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.


Previous Comments:


[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



[2003-08-15 08:48:14] [EMAIL PROTECTED]

btw. Isn't this same as bug #16325 ??




[2003-08-15 08:31:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





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



#23331 [Opn]: Memory leak in ISAPI

2003-10-04 Thread jakub at icewarp dot com
 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 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


Previous Comments:


[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



[2003-08-15 08:48:14] [EMAIL PROTECTED]

btw. Isn't this same as bug #16325 ??




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


#23331 [Opn]: Memory leak in ISAPI

2003-10-04 Thread jakub at icewarp dot com
 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


#25844 [NEW]: General memory leak

2003-10-12 Thread jakub at icewarp dot com
From: jakub at icewarp dot com
Operating system: Windows (Any)
PHP version:  4.3.4RC1
PHP Bug Type: Session related
Bug description:  General memory leak

Description:

This problem is hardly to be reproduced in CGI because the module is
always released after finish. So the only way to reproduce it for me is
the ISAPI module. You can use some web traffic tool and simulate a 1000
web accesses to any PHP script and see the memory of the ISAPI handler
leaks. 

I'm using my own web server engine so I found out that 1000 hits to a
simple  page leaks about 700kb.

I started debugging and compiling my own PHP core and found out this:

Having the body of the funtion like this:
DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
{ return 0; }

leaks no memory. So we proved it's not the web server engine that leaks
(other ISAPI modules do not leak anyway).

Using the most simple body like this:

2. 1. HttpExtensionProc like this does leak.
DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
{
TSRMLS_FETCH();
ts_free_thread();
return 0;
}

Leaks the memory as discussed above. So I kept digging more.


Then I found the call that actually leaks the memory is:

TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id,
thread_resources->count);

In the function:
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)

The problem is with the 
return &array;
Call which leaks the memory. If I remove it it does not leak. If I remove
the pointer character it does not leak.

So the question is why does the return call leak when passing back the
pointer? I'm not a C++ guru so I can't make this out. 

I had to post it here because when I posted the problem to ISAPI section
nobody cared. This problem has been there for the last 2 years for sure.
The leak is 100% reproducable and the question is why wouldn't it leak on
Linux

Please help us here? Thank you
Jakub


-- 
Edit bug report at http://bugs.php.net/?id=25844&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25844&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25844&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=25844&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=25844&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25844&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=25844&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=25844&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=25844&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=25844&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=25844&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=25844&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25844&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=25844&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=25844&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=25844&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25844&r=float


#31910 [NEW]: A special string containing "E" causes an Unhandled Exception

2005-02-10 Thread jakub at icewarp dot com
From: jakub at icewarp dot com
Operating system: Any
PHP version:  4CVS-2005-02-10 (stable)
PHP Bug Type: Variables related
Bug description:  A special string containing "E" causes an Unhandled Exception

Description:

Hi
This problem happens only in the 4.3.11 dev version.
It is 100% reproducable. See the code below. It will produce the following
error:

PHP has encountered an Unhandled Exception Code -1073741679 at 011171E3

The problem must be that PHP thinks it's a real number or something. It
didn't occur in previous versions. Please, try to fix it.

Cheers
Jakub

Reproduce code:
---


Actual result:
--
PHP has encountered an Unhandled Exception Code -1073741679 at 011171E3

-- 
Edit bug report at http://bugs.php.net/?id=31910&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31910&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31910&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31910&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=31910&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=31910&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=31910&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=31910&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=31910&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31910&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=31910&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=31910&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=31910&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=31910&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31910&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=31910&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=31910&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31910&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31910&r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=31910&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31910&r=mysqlcfg


#31910 [Fbk->Opn]: A special string containing "E" causes an Unhandled Exception

2005-02-10 Thread jakub at icewarp dot com
 ID:   31910
 User updated by:  jakub at icewarp dot com
 Reported By:  jakub at icewarp dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  4CVS-2005-02-10
 New Comment:

I'm testing PHP for Windows. I've just tested 4.3.10 and it has the
same problem. 4.3.8 does suffer from this problem.
I doubt it has anything with ISAPI or other PHP interface. If you test
PHP on windows it is 100% reproducable. I have colleagues who reported
the same problem on different machines.

I'm not sure what you mean by configure line. The PHP.INI is the
default one shipped with PHP.

The question is why did it change. It must have been the version 4.3.9
or 4.3.10 that changed something. If you prepend an alphabet character
before the string it will not occur.

Colleagues believe the "E" stands for an exponent or similar. Let me
know how I can help


Previous Comments:


[2005-02-10 14:43:31] [EMAIL PROTECTED]

What might have been the configure line you used?
I can _not_ reproduce this with latest CVS version of PHP_4_3 branch
nor with HEAD (upcoming PHP 5.1 branch).




----

[2005-02-10 10:23:27] jakub at icewarp dot com

Description:

Hi
This problem happens only in the 4.3.11 dev version.
It is 100% reproducable. See the code below. It will produce the
following error:

PHP has encountered an Unhandled Exception Code -1073741679 at
011171E3

The problem must be that PHP thinks it's a real number or something. It
didn't occur in previous versions. Please, try to fix it.

Cheers
Jakub

Reproduce code:
---


Actual result:
--
PHP has encountered an Unhandled Exception Code -1073741679 at 011171E3





-- 
Edit this bug report at http://bugs.php.net/?id=31910&edit=1


#31910 [Fbk->Opn]: A special string containing "E" causes an Unhandled Exception

2005-02-11 Thread jakub at icewarp dot com
 ID:   31910
 User updated by:  jakub at icewarp dot com
 Reported By:  jakub at icewarp dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: win32
 PHP Version:  4CVS-2005-02-10
 New Comment:

I did some more tests and it is true I could not reproduce it in
command line using php.exe (CGI). It is a subject of the ISAPI
interface only then. Did you test ISAPI?


Previous Comments:


[2005-02-11 03:40:37] [EMAIL PROTECTED]

And I can not reproduce this with Apache2 SAPI either..
So please tell me HOW to reproduce this?




[2005-02-11 03:35:20] [EMAIL PROTECTED]

I can _not_ reproduce this with the latest CVS snapshot build for win32
either. (still using CLI)





[2005-02-11 03:31:51] [EMAIL PROTECTED]

I can _not_ reproduce this on windows using Debug build of CLI binary.




[2005-02-10 15:04:56] [EMAIL PROTECTED]

Updated OS field to be correct. Works fine on *nix.




[2005-02-10 15:02:44] jakub at icewarp dot com

I'm testing PHP for Windows. I've just tested 4.3.10 and it has the
same problem. 4.3.8 does suffer from this problem.
I doubt it has anything with ISAPI or other PHP interface. If you test
PHP on windows it is 100% reproducable. I have colleagues who reported
the same problem on different machines.

I'm not sure what you mean by configure line. The PHP.INI is the
default one shipped with PHP.

The question is why did it change. It must have been the version 4.3.9
or 4.3.10 that changed something. If you prepend an alphabet character
before the string it will not occur.

Colleagues believe the "E" stands for an exponent or similar. Let me
know how I can help



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/31910

-- 
Edit this bug report at http://bugs.php.net/?id=31910&edit=1


#31910 [Opn]: A special string containing "E" causes an Unhandled Exception

2005-02-14 Thread jakub at icewarp dot com
 ID:   31910
 User updated by:  jakub at icewarp dot com
 Reported By:  jakub at icewarp dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: win32 / ISAPI
 PHP Version:  4CVS-2005-02-10
 New Comment:

Any news on the issue?


Previous Comments:


[2005-02-11 10:13:33] jakub at icewarp dot com

I did some more tests and it is true I could not reproduce it in
command line using php.exe (CGI). It is a subject of the ISAPI
interface only then. Did you test ISAPI?



[2005-02-11 03:40:37] [EMAIL PROTECTED]

And I can not reproduce this with Apache2 SAPI either..
So please tell me HOW to reproduce this?




[2005-02-11 03:35:20] [EMAIL PROTECTED]

I can _not_ reproduce this with the latest CVS snapshot build for win32
either. (still using CLI)





[2005-02-11 03:31:51] [EMAIL PROTECTED]

I can _not_ reproduce this on windows using Debug build of CLI binary.




[2005-02-10 15:04:56] [EMAIL PROTECTED]

Updated OS field to be correct. Works fine on *nix.




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/31910

-- 
Edit this bug report at http://bugs.php.net/?id=31910&edit=1


#31910 [Opn]: A special string containing "E" causes an Unhandled Exception

2005-02-14 Thread jakub at icewarp dot com
 ID:   31910
 User updated by:  jakub at icewarp dot com
 Reported By:  jakub at icewarp dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: win32 / ISAPI
 PHP Version:  4CVS-2005-02-10
 New Comment:

Yes it might be that... I can reproduce it since 4.3.10.


Previous Comments:


[2005-02-14 21:48:19] plyrvt at mail dot ru

Maybe this is related somehow to 
4.3.10 Changelog: "Added the %F modifier to *printf to render a
non-locale-aware representation of a float with the . as decimal
separator."
and is locale-dependent?



[2005-02-14 21:17:17] plyrvt at mail dot ru

"PHP has encountered an Unhandled Exception Code %d at %p"
it's a part of php4isapi.dll file, but I cannot reproduce this bug
neither under 4.3.8 nor 4.3.9 nor 5.0.2 (winxp-sp1-iis5.1)

----

[2005-02-14 18:44:45] jakub at icewarp dot com

Any news on the issue?

----

[2005-02-11 10:13:33] jakub at icewarp dot com

I did some more tests and it is true I could not reproduce it in
command line using php.exe (CGI). It is a subject of the ISAPI
interface only then. Did you test ISAPI?



[2005-02-11 03:40:37] [EMAIL PROTECTED]

And I can not reproduce this with Apache2 SAPI either..
So please tell me HOW to reproduce this?




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/31910

-- 
Edit this bug report at http://bugs.php.net/?id=31910&edit=1


#31910 [Fbk->Opn]: A special string containing "E" causes an Unhandled Exception

2005-02-15 Thread jakub at icewarp dot com
 ID:   31910
 User updated by:  jakub at icewarp dot com
 Reported By:  jakub at icewarp dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: win32 / ISAPI
 PHP Version:  4CVS-2005-02-10
 New Comment:

It occurs on all Windows locales US, CZ. Reproduced it on W2000 and
WXP. Please, try 4.3.10 or later
Thank you


Previous Comments:


[2005-02-15 10:51:32] [EMAIL PROTECTED]

If you think it might be that, than what's your locale?
Nobody can reproduce it except you, so just don't sit & wait - run the
code on another winblows box, try to get more info etc.



[2005-02-15 07:39:13] jakub at icewarp dot com

Yes it might be that... I can reproduce it since 4.3.10.



[2005-02-14 21:48:19] plyrvt at mail dot ru

Maybe this is related somehow to 
4.3.10 Changelog: "Added the %F modifier to *printf to render a
non-locale-aware representation of a float with the . as decimal
separator."
and is locale-dependent?



[2005-02-14 21:17:17] plyrvt at mail dot ru

"PHP has encountered an Unhandled Exception Code %d at %p"
it's a part of php4isapi.dll file, but I cannot reproduce this bug
neither under 4.3.8 nor 4.3.9 nor 5.0.2 (winxp-sp1-iis5.1)

--------

[2005-02-14 18:44:45] jakub at icewarp dot com

Any news on the issue?



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/31910

-- 
Edit this bug report at http://bugs.php.net/?id=31910&edit=1


#16325 [Com]: Memory leak causes DLLHOST to become large

2003-08-15 Thread jakub at icewarp dot com
 ID:   16325
 Comment by:   jakub at icewarp dot com
 Reported By:  mail-php dot net at kimihia dot org dot nz
 Status:   Verified
 Bug Type: IIS related
 Operating System: Windows 2000 Server
 PHP Version:  4.3.2RC1
 New Comment:

Yes it's exactly the same problem as bug #23331. I'm the writer of it.
If you need any info I'd like to help. I wrote my own web server so I
can test anything... I'd like that to be solved at last. It's been
there since the beginning. A little tool generating X hits per second
proves it.
Cheers
J


Previous Comments:


[2003-08-15 08:48:58] [EMAIL PROTECTED]

Isn't this same as bug #23331 is about? (which seems to have a bit more
analysis of the problem too)




[2003-06-09 03:47:28] [EMAIL PROTECTED]

Sorry for the spam.

Who are code writers for IIS related stuff?

I'm supposed to be the guy who examines all these IIS related bugs, but
I've never had to modify the code.



[2003-06-09 03:45:08] mail-php dot net at kimihia dot org dot nz

I still watch this bug ocassionally, but as I no longer have access to
the Windows 2000 Server it is little use.

When I left, and when I stepped someone else through it recently when
they upgraded, there were using ISAPI for a page that needed to set
cookies. Due to the memory problems (which only appear when multiple
PHP processes are running) it is not used throughout the entire site.



[2003-06-07 06:32:04] nicolai at petri dot cc

Same shit still...

Why not fix the bug instead of closing this pr constantly ? 
IIS + PHP + ISAPI is a no-go for all my testcases.. Is anybody actually
using this successfully ?



[2003-05-29 14:52:26] fer at onplaza dot com

Same as others, normally HOSTDLL.EXE grows between 1-2 Mb per request.

I've stopped all the rest of services, created a phpinfo.php whith only
the named function and a phpinfo.htm; both in the same directory, and
if only happens when calling the .php extension page.

That's why I think that in this case we are not in front of an IIS
problem. Looks like a big leak of memory that in some cases php is
unable to handle


This is my 6'th year using PHP.
Fer



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/16325

-- 
Edit this bug report at http://bugs.php.net/?id=16325&edit=1



#23331 [Fbk->Opn]: Memory leak in ISAPI

2003-08-18 Thread jakub at icewarp dot com
 ID:   23331
 User updated by:  jakub at icewarp dot com
 Reported By:  jakub at icewarp dot com
-Status:   Feedback
+Status:   Open
 Bug Type: IIS related
 Operating System: W2K
 PHP Version:  4.3.2RC1
 New Comment:

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


Previous Comments:


[2003-08-15 08:48:14] [EMAIL PROTECTED]

btw. Isn't this same as bug #16325 ??




[2003-08-15 08:31:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2003-05-05 03:20:29] jakub at icewarp dot com

Still the same. Btw. what I testing now is not the COM object issue but
simple HttpExtension call which leaks the memory. Each call to the
ISAPI module leaks some memory. Tell me. Thanks



[2003-05-03 10:22:59] jakub at icewarp dot com

I was wrong about the [EMAIL PROTECTED] it is called by Windows
automatically. However I have found for instance this.
If you load the ISAPI module and free it in a cycle again it does not
free the memory.
for ($i=0;$i<1000;$i++)
{
  lh = loadlibrary("...isapi.dll");
  freelibrary(lh);
}
After 200 cycles the process consumes 50MB. I don't think that should
happen. What is wrong?



[2003-05-03 04:02:26] jakub at icewarp dot com

Some more info I have found.
The DllMain function from the ISAPI dll is incorrectly exported and has
the name [EMAIL PROTECTED] so it cannot be called by the web server. When you
call the PROCESS_ATTACH and DETACH DllMain calls it raises and
exception. THREAD_ATTACH and DETACH work fine but still the memory leak
is there. Each call to the HttpExtensionProc leaks about 1kB of memory.
Please try to have a look at it
J



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



#23331 [Fbk->Opn]: Memory leak in ISAPI

2003-08-18 Thread jakub at icewarp dot com
 ID:   23331
 User updated by:  jakub at icewarp dot com
 Reported By:  jakub at icewarp dot com
-Status:   Feedback
+Status:   Open
 Bug Type: IIS related
 Operating System: win32
 PHP Version:  4.3.3RC4-dev
 New Comment:

That's what I thought of too so I removed all extensions and the
results I posted are without any extensions.


Previous Comments:


[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



[2003-08-15 08:48:14] [EMAIL PROTECTED]

btw. Isn't this same as bug #16325 ??




[2003-08-15 08:31:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2003-05-05 03:20:29] jakub at icewarp dot com

Still the same. Btw. what I testing now is not the COM object issue but
simple HttpExtension call which leaks the memory. Each call to the
ISAPI module leaks some memory. Tell me. Thanks



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



#34343 [NEW]: Huge memory leaks in ISAPI

2005-09-02 Thread jakub at icewarp dot com
From: jakub at icewarp dot com
Operating system: Any
PHP version:  4.4.0
PHP Bug Type: IIS related
Bug description:  Huge memory leaks in ISAPI

Description:

Since PHP 3.0 there is a huge memory leak in the ISAPI module. Probably it
is inside of the PHP core itself.
It is very easy to reproduce it. A simple



code leaks about 28MB after 200 calls.

Please, somebody fix it. Take your precious time, create an ISAPI
extension call to PHP ISAPI DLLm pass it info.html and loop it 200 times
and find the memory leak...

>From what I saw PHP 4.4.0 is faster than previous versions but seem to
leak more.

I'm willing to help anyway I can. Thank you


-- 
Edit bug report at http://bugs.php.net/?id=34343&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34343&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34343&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34343&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=34343&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=34343&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=34343&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=34343&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=34343&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34343&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=34343&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=34343&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=34343&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=34343&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34343&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=34343&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=34343&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34343&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34343&r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=34343&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34343&r=mysqlcfg