]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Avoid !writeableAnchor_ assertions when Squid shuts down.
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 24 Jul 2013 21:45:02 +0000 (15:45 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 24 Jul 2013 21:45:02 +0000 (15:45 -0600)
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.

src/fs/rock/RockIoState.cc

index a202e3db8830e37f52d0b56a07a6e8fdaecd08f5..be0f4638b07155ae9f79c8ae4f8282bc78203441 100644 (file)
@@ -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);