From: Christos Tsantilas Date: Wed, 2 Mar 2016 09:12:10 +0000 (+0200) Subject: Squid crashes on shutdown while cleaning up idle ICAP connections. X-Git-Tag: SQUID_3_5_16~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0bb1c9f6fe6e1e963b74d9fc644b0ccf4f57c32;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 5126c5425c..155e475a41 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1899,6 +1899,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 */