Re: [syslog-ng] File descriptor leaks with 3.0.1
On Mon, 2009-02-16 at 15:52 +1300, chris packham wrote:
Also seems to be present in the latest version checked out from the git repo but I'll do some more digging.
I've confirmed that this does indeed happen on the latest version from the git repo. I've attached a patch that addresses this. Looks like the 'include' implementation assumes that yy_switch_to_buffer closes the old file (which flex 2.5.33 doesn't, I haven't tried other versions).
Hi, On Tue, 2009-02-17 at 09:58 +1300, chris packham wrote:
On Mon, 2009-02-16 at 15:52 +1300, chris packham wrote:
Also seems to be present in the latest version checked out from the git repo but I'll do some more digging.
I've confirmed that this does indeed happen on the latest version from the git repo. I've attached a patch that addresses this. Looks like the 'include' implementation assumes that yy_switch_to_buffer closes the old file (which flex 2.5.33 doesn't, I haven't tried other versions).
Thanks for the patch, I've integrated it with slight stylisting modifications. commit dd7b45a8f230ceb204fb7de5f48a2d03ced97ab7 Author: Chris Packham <chris.packham@alliedtelesis.co.nz> Date: Sat Feb 28 14:39:39 2009 +0100 fix file descriptor leak when using includes When using the newly introduced includes feature the files that are included are not closed and cause a file descriptor leak. Depending on the system ulimit, number of includes and frequency of re-configuration this can cause configuration not to be applied. To address this it is necessary to close the included file after processing it. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> -- Bazsi
participants (2)
-
Balazs Scheidler
-
chris packham