From: Christos Tsantilas Date: Thu, 3 Mar 2016 00:49:45 +0000 (+1300) Subject: Squid crashes on shutdown while cleaning up idle ICAP connections. X-Git-Tag: SQUID_4_0_8~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2b80c5b9bb1e2b2401271fae613974b0a64ed6b;p=thirdparty%2Fsquid.git Squid crashes on shutdown while cleaning up idle ICAP connections. The global Adaptation::Icap::TheConfig object is automatically destroyed when Squid exits. Its destructor destroys Icap::ServiceRep objects that, in turn, close all open connections in the idle connections pool. Since this happens after comm_exit has destroyed all Comm structures associated with those connections, Squid crases. This is a Measurement Factory project. --- diff --git a/src/main.cc b/src/main.cc index 88e83d382e..91284ce296 100644 --- a/src/main.cc +++ b/src/main.cc @@ -2036,6 +2036,9 @@ SquidShutdown() WIN32_svcstatusupdate(SERVICE_STOP_PENDING, 10000); #endif +#if ICAP_CLIENT + Adaptation::Icap::TheConfig.freeService(); +#endif Store::Root().sync(); /* Flush pending object writes/unlinks */