From: Alex Rousskov Date: Wed, 24 Jul 2013 21:45:02 +0000 (-0600) Subject: Avoid !writeableAnchor_ assertions when Squid shuts down. X-Git-Tag: SQUID_3_5_0_1~444^2~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ec749c6fb64dc36226427a4abb1d3a5a78aa406;p=thirdparty%2Fsquid.git Avoid !writeableAnchor_ assertions when Squid shuts down. A shutting down Squid deletes locked StoreEntry objects, which may trigger deletion of Rock::IoState that is still writing to disk. We should fix the shutdown sequence. Meanwhile, the Rock::IoState code does not need to mislead admins with an assert. --- diff --git a/src/fs/rock/RockIoState.cc b/src/fs/rock/RockIoState.cc index a202e3db88..be0f4638b0 100644 --- a/src/fs/rock/RockIoState.cc +++ b/src/fs/rock/RockIoState.cc @@ -47,7 +47,7 @@ Rock::IoState::~IoState() // The dir map entry may still be open for reading at the point because // the map entry lock is associated with StoreEntry, not IoState. // assert(!readableAnchor_); - assert(!writeableAnchor_); + assert(shutting_down || !writeableAnchor_); if (callback_data) cbdataReferenceDone(callback_data);