RE: Small memory leak on multithreaded server

2014-11-24 Thread Barbe, Charles
| 585.421.5565 From: owner-openssl-us...@openssl.org [owner-openssl-us...@openssl.org] on behalf of Dr. Stephen Henson [st...@openssl.org] Sent: Friday, November 21, 2014 1:40 PM To: openssl-users@openssl.org Subject: Re: Small memory leak on multithreaded

Re: Small memory leak on multithreaded server

2014-11-24 Thread chris . gray
As the maintainer of an "alternative" JavaVM I can confirm that we absolutely had to support library unloading because one customer was using it heavily - and that was quite a few years ago. Early Sun VMs didn't support library unloading, but then those VMs also did not garbage-collect obsolete cla

Re: Small memory leak on multithreaded server

2014-11-23 Thread Viktor Dukhovni
On Sun, Nov 23, 2014 at 10:56:41PM +0100, Jakob Bohm wrote: > >Unloading of shared libraries is generally unsafe. Loading and > >unloading of pure of Java packages may work well enough, but I > >would [not] expect a Java runtime that unloads native libraries to stay > >running for very long. > >

Re: Small memory leak on multithreaded server

2014-11-23 Thread Jakob Bohm
On 21-11-2014 23:23, Viktor Dukhovni wrote: On Fri, Nov 21, 2014 at 04:13:58PM -0500, Jeffrey Walton wrote: A fixed amount of memory that is not deallocated and is independent of the number of operations performed, is NOT a memory leak. Languages like Java and C# can continuously load and unloa

RE: Small memory leak on multithreaded server

2014-11-21 Thread Barbe, Charles
g] Sent: Friday, November 21, 2014 1:40 PM To: openssl-users@openssl.org Subject: Re: Small memory leak on multithreaded server On Fri, Nov 21, 2014, Barbe, Charles wrote: > Yes... sorry, forgot to include this part of my shutdown sequence. One thing > I am noticing is that I do not call X40

Re: Small memory leak on multithreaded server

2014-11-21 Thread Viktor Dukhovni
On Fri, Nov 21, 2014 at 04:13:58PM -0500, Jeffrey Walton wrote: > > A fixed amount of memory that is not deallocated and is independent > > of the number of operations performed, is NOT a memory leak. > > Languages like Java and C# can continuously load and unload a library. > You will see a growth

Re: Small memory leak on multithreaded server

2014-11-21 Thread Jeffrey Walton
> A fixed amount of memory that is not deallocated and is independent > of the number of operations performed, is NOT a memory leak. Languages like Java and C# can continuously load and unload a library. You will see a growth in memory usage because the memory is not reclaimed. > Librariers to all

Re: Small memory leak on multithreaded server

2014-11-21 Thread Dr. Stephen Henson
On Fri, Nov 21, 2014, Barbe, Charles wrote: > Yes... sorry, forgot to include this part of my shutdown sequence. One thing > I am noticing is that I do not call X409_free on my certs. I even have a > comment in my code saying that I am not freeing them because I think they > will be freed when the

RE: Small memory leak on multithreaded server

2014-11-21 Thread Barbe, Charles
: Re: Small memory leak on multithreaded server On Fri, Nov 21, 2014, Barbe, Charles wrote: > Thanks for the response... here is the code that runs when my connection > closes: > > void OpensslConnection::cleanup() > { > if(ssl != NULL) > { > if(isConnected

Re: Small memory leak on multithreaded server

2014-11-21 Thread Dr. Stephen Henson
On Fri, Nov 21, 2014, Barbe, Charles wrote: > Thanks for the response... here is the code that runs when my connection > closes: > > void OpensslConnection::cleanup() > { > if(ssl != NULL) > { > if(isConnected) > { > while(SSL_shutdown(ssl) == 0) >

Re: Small memory leak on multithreaded server

2014-11-21 Thread Viktor Dukhovni
On Fri, Nov 21, 2014 at 03:21:47PM +, Barbe, Charles wrote: > What looks suspicious to me is the calls to "x509v3_cache_extensions" > that are in the traces below. This implies to me that openssl is > caching something. How do I ask it to clear that cache? If i need > to augment the library to

RE: Small memory leak on multithreaded server

2014-11-21 Thread Barbe, Charles
r-openssl-us...@openssl.org [owner-openssl-us...@openssl.org] on behalf of Dr. Stephen Henson [st...@openssl.org] Sent: Thursday, November 20, 2014 9:50 PM To: openssl-users@openssl.org Subject: Re: Small memory leak on multithreaded server On Thu, Nov 20, 2014, Barbe, Charles wrote: > Hello,

Re: Small memory leak on multithreaded server

2014-11-21 Thread Jakob Bohm
tes). From: owner-openssl-us...@openssl.org [owner-openssl-us...@openssl.org] on behalf of Jeffrey Walton [noloa...@gmail.com] Sent: Thursday, November 20, 2014 6:03 PM To: OpenSSL Users List Subject: Re: Small memory leak on multithreaded server Any help would be apprecia

Re: Small memory leak on multithreaded server

2014-11-21 Thread Viktor Dukhovni
On Fri, Nov 21, 2014 at 02:26:45PM +, Barbe, Charles wrote: > static void > openSslShutdown () > { You could try adding: ENGINE_cleanup(); if that helps. > CONF_modules_free(); > ERR_remove_state(0); > CONF_modules_unload(1); > ERR_free_strings(); > EVP_cl

RE: Small memory leak on multithreaded server

2014-11-21 Thread Barbe, Charles
-us...@openssl.org [owner-openssl-us...@openssl.org] on behalf of Jeffrey Walton [noloa...@gmail.com] Sent: Thursday, November 20, 2014 6:03 PM To: OpenSSL Users List Subject: Re: Small memory leak on multithreaded server > Any help would be appreciated. This could be one of two problems. Fir

RE: Small memory leak on multithreaded server

2014-11-21 Thread Barbe, Charles
: Re: Small memory leak on multithreaded server On Thu, Nov 20, 2014 at 10:19:32PM +, Barbe, Charles wrote: > I can do any combination of steps 2,3 and 4 above (ie. leave some > of them out) and I always get the same amount of memory left over > after I shut down my application. I bel

Re: Small memory leak on multithreaded server

2014-11-20 Thread Dr. Stephen Henson
On Thu, Nov 20, 2014, Barbe, Charles wrote: > Hello, > > I have noticed a small and consistent memory leak in my multithreaded openssl > server and am wondering if somebody can help me figure out what I need to do > to free it when my application closes. I am on OpenSSL version 1.0.1j. Here's

Re: Small memory leak on multithreaded server

2014-11-20 Thread Viktor Dukhovni
On Thu, Nov 20, 2014 at 10:19:32PM +, Barbe, Charles wrote: > I can do any combination of steps 2,3 and 4 above (ie. leave some > of them out) and I always get the same amount of memory left over > after I shut down my application. I believe this means that this > is some sort of global inform

Re: Small memory leak on multithreaded server

2014-11-20 Thread Jeffrey Walton
> Any help would be appreciated. This could be one of two problems. First, it could be an issue with your code and the way you handle cleanup. To help diagnose this, please show us your cleanup code. Second, it could be the memory leak from the compression methods. This is a well known problem da