]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4829: IPC shared memory leaks when disker queue overflows (#175)
authorCraig Gowing <craiggowing@gmail.com>
Tue, 20 Mar 2018 10:54:56 +0000 (10:54 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Tue, 20 Mar 2018 10:54:56 +0000 (23:54 +1300)
The fixed leak was accompanied by these cache.log errors:

ERROR: worker I/O push queue for ... overflow: ...

I/O queue overflows during disk read requests log the same error but do
not leak memory. Repeated overflows during disk write requests could
eventually exhaust IPC shared memory:

ERROR: ... exception: run out of shared memory pages for IPC I/O

With IPC memory exhausted due to leaks, rock disk I/O stops forever.

src/DiskIO/IpcIo/IpcIoFile.cc

index a6a21d4b3e2efd30449f26a4a6e9b69eb9d8ead2..735cf0f09f74a0e830c3a9fc62e83adf4c4d7fcf 100644 (file)
@@ -372,6 +372,8 @@ IpcIoFile::push(IpcIoPendingRequest *const pending)
                dbName << " overflow: " <<
                SipcIo(KidIdentifier, ipcIo, diskId)); // TODO: report queue len
         // TODO: grow queue size
+        if (ipcIo.page)
+            Ipc::Mem::PutPage(ipcIo.page);
 
         pending->completeIo(NULL);
         delete pending;