From: Craig Gowing Date: Tue, 20 Mar 2018 10:54:56 +0000 (+0000) Subject: Bug 4829: IPC shared memory leaks when disker queue overflows (#175) X-Git-Tag: SQUID_3_5_28~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fd88877c044d0f70df3f36298dcd3ddc67b65d5;p=thirdparty%2Fsquid.git Bug 4829: IPC shared memory leaks when disker queue overflows (#175) 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. --- diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index 5c52c33b88..f78de1f651 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -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;