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_4_0_25~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f874ca832275554e634255f3d0f7d35d69ed0cf4;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 a6a21d4b3e..735cf0f09f 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;