[Nagios-devel] File Descriptor Leak.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] File Descriptor Leak.

Post by Guest »

NOTE: I've fixed this problem in 1.0a7. I haven't verified the leak is =
present in the latest version. Looking at the code (xdata/xpdfile.c =
rev. 1.3), I believe it's still there.

[root@tn-s0-101-2 bin]# lsof -p `cat /var/run/nagios.pid` | egrep =
perf.log
nagios 25966 root 6w REG 8,9 3828 1053 =
/var/log/nagios/hostperf.log
nagios 25966 root 7w REG 8,9 295729 1055 =
/var/log/nagios/serviceperf.log
[root@tn-s0-101-2 bin]# kill -HUP `cat /var/run/nagios.pid`
[root@tn-s0-101-2 bin]# lsof -p `cat /var/run/nagios.pid` | egrep =
perf.log
nagios 25966 root 6w REG 8,9 3828 1053 =
/var/log/nagios/hostperf.log
nagios 25966 root 7w REG 8,9 296219 1055 =
/var/log/nagios/serviceperf.log
nagios 25966 root 8w REG 8,9 3828 1053 =
/var/log/nagios/hostperf.log
nagios 25966 root 9w REG 8,9 296219 1055 =
/var/log/nagios/serviceperf.log

Here's where I've added fclose() calls:

--- /scratch2/nagios-cvs/nagios/xdata/xpdfile.c Sun Dec 1 20:30:12 2002
+++ ./xpdfile.c Mon Feb 10 17:48:16 2003
@@ -213,6 +213,10 @@
free(xpdfile_host_perfdata_file);
free(xpdfile_service_perfdata_file);

+ /* close files */
+ fclose(xpdfile_host_perfdata_fp);
+ fclose(xpdfile_service_perfdata_fp);
+
return OK;
}




Vijay Gadad





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: vgadad@persistcorp.com
Locked