You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Mark Kolb (JIRA)" <ax...@ws.apache.org> on 2005/06/06 21:01:09 UTC

[jira] Created: (AXISCPP-674) Memory leak

Memory leak
-----------

         Key: AXISCPP-674
         URL: http://issues.apache.org/jira/browse/AXISCPP-674
     Project: Axis-C++
        Type: Bug
    Versions: 1.5 Final    
 Environment: Win2000
    Reporter: Mark Kolb
    Priority: Critical


When running a simple client test in a loop both the client and server memory continue to climb and never come back down.  I used the calculator example and modified it with a loop around the add.  I noticed the memory climbing very quickly in the client using performance viewer for that process.  Also, the server process which is listed as Apache#1 also has a memory leak.  It is using the Calculator.dll that is part of the Axis package.   This occurred for both HTTP and HTTPS protocols.   I did this test with the 1.5 Final release.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-674) Memory leak

Posted by "Stephan Pelikan (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-674?page=comments#action_12315121 ] 

Stephan Pelikan commented on AXISCPP-674:
-----------------------------------------

I called an empty Webservice (method without parameters and returns NULL) on

Linux (RHES3) + Apache 2
and
HP-UX + Apache 1.3

in a loop 10.000 times and messured an average leak of 256 bytes per request. The used OS or Apache-Version seems to have no effect on the memory consumption.

> Memory leak
> -----------
>
>          Key: AXISCPP-674
>          URL: http://issues.apache.org/jira/browse/AXISCPP-674
>      Project: Axis-C++
>         Type: Bug
>     Versions: 1.5 Final
>  Environment: Win2000
>     Reporter: Mark Kolb
>     Priority: Critical

>
> When running a simple client test in a loop both the client and server memory continue to climb and never come back down.  I used the calculator example and modified it with a loop around the add.  I noticed the memory climbing very quickly in the client using performance viewer for that process.  Also, the server process which is listed as Apache#1 also has a memory leak.  It is using the Calculator.dll that is part of the Axis package.   This occurred for both HTTP and HTTPS protocols.   I did this test with the 1.5 Final release.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-674) Memory leak

Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-674?page=comments#action_12320662 ] 

Henrik Nordberg commented on AXISCPP-674:
-----------------------------------------

Jonathan, what are you suggesting?

operator delete is allowed to change the pointer after deleting it. Thus this is unsafe:

int *p = 0;
delete p; // safe
delete p; // an error, because p may not be 0 any longer

If what you are saying is just adjusting memory so that delete will act on the same location the next time, then that may hide the problem, but it will not get rid of it.

> Memory leak
> -----------
>
>          Key: AXISCPP-674
>          URL: http://issues.apache.org/jira/browse/AXISCPP-674
>      Project: Axis-C++
>         Type: Bug
>     Versions: 1.5 Final
>  Environment: Win2000
>     Reporter: Mark Kolb
>     Assignee: Samisa Abeysinghe
>     Priority: Critical

>
> When running a simple client test in a loop both the client and server memory continue to climb and never come back down.  I used the calculator example and modified it with a loop around the add.  I noticed the memory climbing very quickly in the client using performance viewer for that process.  Also, the server process which is listed as Apache#1 also has a memory leak.  It is using the Calculator.dll that is part of the Axis package.   This occurred for both HTTP and HTTPS protocols.   I did this test with the 1.5 Final release.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-674) Memory leak

Posted by "Jonathan Davies (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-674?page=comments#action_12320561 ] 

Jonathan Davies commented on AXISCPP-674:
-----------------------------------------

Running the debug version of the Calculator sample on Win2000, the modification in ChannelFactory::UnLoadChannelLibrary to use:

delete m_pChannel[iLibIndex];

causes the delete operator to call free( ) which then tries to use the _crtheap set to a different value to that when the memory was allocated. Building a MAP file for HTTPChannel_D.dll shows it has a _crtheap variable and uses heapcreate.

Reseting the value of _crtheap in the debugger to that when the allocation was performed removes the problem.



> Memory leak
> -----------
>
>          Key: AXISCPP-674
>          URL: http://issues.apache.org/jira/browse/AXISCPP-674
>      Project: Axis-C++
>         Type: Bug
>     Versions: 1.5 Final
>  Environment: Win2000
>     Reporter: Mark Kolb
>     Assignee: Samisa Abeysinghe
>     Priority: Critical

>
> When running a simple client test in a loop both the client and server memory continue to climb and never come back down.  I used the calculator example and modified it with a loop around the add.  I noticed the memory climbing very quickly in the client using performance viewer for that process.  Also, the server process which is listed as Apache#1 also has a memory leak.  It is using the Calculator.dll that is part of the Axis package.   This occurred for both HTTP and HTTPS protocols.   I did this test with the 1.5 Final release.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-674) Memory leak

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-674?page=comments#action_12317026 ] 

Samisa Abeysinghe commented on AXISCPP-674:
-------------------------------------------

I had a look into this and fixed a leak due to non allocation of channel objects.

Now I get 0 defnitely lost bytes with the valgrind profiler. 

Please check with latest CVS

> Memory leak
> -----------
>
>          Key: AXISCPP-674
>          URL: http://issues.apache.org/jira/browse/AXISCPP-674
>      Project: Axis-C++
>         Type: Bug
>     Versions: 1.5 Final
>  Environment: Win2000
>     Reporter: Mark Kolb
>     Assignee: Samisa Abeysinghe
>     Priority: Critical

>
> When running a simple client test in a loop both the client and server memory continue to climb and never come back down.  I used the calculator example and modified it with a loop around the add.  I noticed the memory climbing very quickly in the client using performance viewer for that process.  Also, the server process which is listed as Apache#1 also has a memory leak.  It is using the Calculator.dll that is part of the Axis package.   This occurred for both HTTP and HTTPS protocols.   I did this test with the 1.5 Final release.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXISCPP-674) Memory leak

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-674?page=all ]
     
Samisa Abeysinghe resolved AXISCPP-674:
---------------------------------------

    Resolution: Fixed

I have placed a fix in CVS, please re-open if the issue persists

> Memory leak
> -----------
>
>          Key: AXISCPP-674
>          URL: http://issues.apache.org/jira/browse/AXISCPP-674
>      Project: Axis-C++
>         Type: Bug
>     Versions: 1.5 Final
>  Environment: Win2000
>     Reporter: Mark Kolb
>     Assignee: Samisa Abeysinghe
>     Priority: Critical

>
> When running a simple client test in a loop both the client and server memory continue to climb and never come back down.  I used the calculator example and modified it with a loop around the add.  I noticed the memory climbing very quickly in the client using performance viewer for that process.  Also, the server process which is listed as Apache#1 also has a memory leak.  It is using the Calculator.dll that is part of the Axis package.   This occurred for both HTTP and HTTPS protocols.   I did this test with the 1.5 Final release.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-674) Memory leak

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-674?page=all ]

Samisa Abeysinghe reassigned AXISCPP-674:
-----------------------------------------

    Assign To: Samisa Abeysinghe

> Memory leak
> -----------
>
>          Key: AXISCPP-674
>          URL: http://issues.apache.org/jira/browse/AXISCPP-674
>      Project: Axis-C++
>         Type: Bug
>     Versions: 1.5 Final
>  Environment: Win2000
>     Reporter: Mark Kolb
>     Assignee: Samisa Abeysinghe
>     Priority: Critical

>
> When running a simple client test in a loop both the client and server memory continue to climb and never come back down.  I used the calculator example and modified it with a loop around the add.  I noticed the memory climbing very quickly in the client using performance viewer for that process.  Also, the server process which is listed as Apache#1 also has a memory leak.  It is using the Calculator.dll that is part of the Axis package.   This occurred for both HTTP and HTTPS protocols.   I did this test with the 1.5 Final release.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXISCPP-674) Memory leak

Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-674?page=all ]
     
Fred Preston closed AXISCPP-674:
--------------------------------


> Memory leak
> -----------
>
>          Key: AXISCPP-674
>          URL: http://issues.apache.org/jira/browse/AXISCPP-674
>      Project: Axis-C++
>         Type: Bug

>     Versions: 1.5 Final
>  Environment: Win2000
>     Reporter: Mark Kolb
>     Assignee: Samisa Abeysinghe
>     Priority: Critical

>
> When running a simple client test in a loop both the client and server memory continue to climb and never come back down.  I used the calculator example and modified it with a loop around the add.  I noticed the memory climbing very quickly in the client using performance viewer for that process.  Also, the server process which is listed as Apache#1 also has a memory leak.  It is using the Calculator.dll that is part of the Axis package.   This occurred for both HTTP and HTTPS protocols.   I did this test with the 1.5 Final release.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-674) Memory leak

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-674?page=comments#action_12314315 ] 

Samisa Abeysinghe commented on AXISCPP-674:
-------------------------------------------

I think we still have these memory leaks in the current CVS codebase.

We should be fixing those before 1.6 release

> Memory leak
> -----------
>
>          Key: AXISCPP-674
>          URL: http://issues.apache.org/jira/browse/AXISCPP-674
>      Project: Axis-C++
>         Type: Bug
>     Versions: 1.5 Final
>  Environment: Win2000
>     Reporter: Mark Kolb
>     Priority: Critical

>
> When running a simple client test in a loop both the client and server memory continue to climb and never come back down.  I used the calculator example and modified it with a loop around the add.  I noticed the memory climbing very quickly in the client using performance viewer for that process.  Also, the server process which is listed as Apache#1 also has a memory leak.  It is using the Calculator.dll that is part of the Axis package.   This occurred for both HTTP and HTTPS protocols.   I did this test with the 1.5 Final release.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-674) Memory leak

Posted by "Jonathan Davies (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-674?page=comments#action_12322577 ] 

Jonathan Davies commented on AXISCPP-674:
-----------------------------------------

My bad choice of words: "removes the problem". what I should have said was "prevents the line _ASSERTE(_CrtIsValidHeapPointer(pUserData)); in dbgheap.c from asserting showing that my build is passing the wrong _crtheap value to _free_dbg called by the delete operator. As you say this obviously does'nt fix anything. 

Please see the mail: 
http://www.mail-archive.com/axis-c-dev@ws.apache.org/msg03599.html
which describes the details, rather than repeat them all here.

I'd be only too happy to be told I'm linking wrongly or similar , I'm using multithreaded dll for everything but can't track down the cause.

> Memory leak
> -----------
>
>          Key: AXISCPP-674
>          URL: http://issues.apache.org/jira/browse/AXISCPP-674
>      Project: Axis-C++
>         Type: Bug
>     Versions: 1.5 Final
>  Environment: Win2000
>     Reporter: Mark Kolb
>     Assignee: Samisa Abeysinghe
>     Priority: Critical

>
> When running a simple client test in a loop both the client and server memory continue to climb and never come back down.  I used the calculator example and modified it with a loop around the add.  I noticed the memory climbing very quickly in the client using performance viewer for that process.  Also, the server process which is listed as Apache#1 also has a memory leak.  It is using the Calculator.dll that is part of the Axis package.   This occurred for both HTTP and HTTPS protocols.   I did this test with the 1.5 Final release.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira