Re: /bzr/squid3/trunk/ r9532: Regression Fix: Bug 2586: Memory leaks on reconfigure

From: Christos Tsantilas <>
Date: Tue, 24 Feb 2009 08:10:29 -0500 (EST)

>> ------------------------------------------------------------
>> revno: 9532
>> committer: Christos Tsantilas <>
>> branch nick: TRUNK
>> timestamp: Tue 2009-02-24 01:18:23 +0200
>> message:
>> Regression Fix: Bug 2586: Memory leaks on reconfigure
>> The patch is not correct. Some of the objects freed here can be in
>> during reconfigure.
> Sigh, another design flaw in the current config handling.
The configure/reconfigure/shutdown is a nightmare for many reasons.
> Exactly how are they in use, and which ones?
The Config.ssl_client.sslContext is used by the http side sockets
( FwdState::initiateSSL method.) Maybe it is still in use during

The peer_free is not really called . But if someone wants to fix peer
leaks must convert the struct peer to a refcounted class (or cbdata class)
and create a destructor to free the strings and ssl objects.

The part of the patch for leaks in CacheManager::registerAction is
OK. The part for, I am not sure.....

> NP: reconfigure and shutdown both call the free-up after all client
connections are supposed to be dead. And all non-memory management
components are already shutdown.

If I am not wrong during reconfigure only the sockets listening for new
connections closed. The other sockets (these which are opened by the
client and these which are opened by the squid to remote servers) remains
I think is not difficult to fix these leaks, but needs more work .....

> 'reconfigure' global is available for selective preservation during
> Amos

Received on Tue Feb 24 2009 - 15:39:37 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 24 2009 - 12:00:03 MST