[syslog-ng] syslog-ng.ctl socket fd leak in 3.3.3

Peter Eisenlohr peter.eisenlohr at inform-software.com
Wed Jan 11 13:45:06 CET 2012


Hi,

the following patch fixes the problem for me. Not sure if this is the
right place for the close(), though.

   Peter

--- ../syslog-ng-3.3.3.orig/lib/control.c       2011-04-30
23:04:19.000000000 +0200
+++ lib/control.c       2012-01-11 13:41:56.000000000 +0100
@@ -244,8 +244,8 @@
   return;
  destroy_connection:
   control_connection_stop_watches(self);
+  close(self->control_io.fd);
   control_connection_free(self);
-
 }

 static void


Am 11.01.2012 13:18, schrieb Peter Eisenlohr:
> Hi Jakub,
> 
> confirmed. The other syslog-ng-ctl commands (verbose, debug, trace) also
> leave behind an open file descriptor.
> 
>   Peter
> 
> 
> Am 11.01.2012 12:52, schrieb Jakub Jankowski:
>> Hi,
>>
>> can anyone confirm my observations?
>>
>> $ lsof -n -p $(cat /var/run/syslog-ng.pid) | grep -c /var/lib/syslog-ng/syslog-ng.ctl
>> 129
>> $ syslog-ng-ctl stats >/dev/null; echo $?
>> 0
>> $ lsof -n -p $(cat /var/run/syslog-ng.pid) | grep -c /var/lib/syslog-ng/syslog-ng.ctl
>> 130
>> $
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
> 


More information about the syslog-ng mailing list