Title: [opsview-base] [323] Added ec13d45: Fix segfault when core workers disconnect
Revision
323
Author
tvoon
Date
2013-08-06 00:03:56 +0100 (Tue, 06 Aug 2013)

Log Message

Added ec13d45: Fix segfault when core workers disconnect

Modified Paths


Added Paths

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2013-08-05 23:02:48 UTC (rev 322)
+++ trunk/Makefile	2013-08-05 23:03:56 UTC (rev 323)
@@ -655,6 +655,7 @@
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_bugfix_d144cf1.patch
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_bugfix_57f5ff6.patch
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_bugfix_24dbf08.patch
+	cd ${NAGIOS} && patch -p1 < ../patches/nagios_bugfix_ec13d45.patch
 	if [ $(KERNEL_NAME) = Linux ] ; then \
 		cd ${NAGIOS} && CFLAGS="${CFLAGS}" ./configure --with-nagios-user=$(NAGIOS_USER) --with-nagios-group=$(NAGIOS_GROUP) --with-command-group=$(NAGIOS_GROUP) --with-cgiurl=/cgi-bin --with-htmurl=/ --enable-libtap ; \
 	elif [ $(KERNEL_NAME) = Darwin ] ; then \

Added: trunk/patches/nagios_bugfix_ec13d45.patch
===================================================================
--- trunk/patches/nagios_bugfix_ec13d45.patch	                        (rev 0)
+++ trunk/patches/nagios_bugfix_ec13d45.patch	2013-08-05 23:03:56 UTC (rev 323)
@@ -0,0 +1,28 @@
+commit ec13d45de2e8e1036c345c5c23b3604644ef9535
+Author: Andreas Ericsson <a...@op5.se>
+Date:   Mon Jun 10 16:55:44 2013 +0200
+
+    core: Stop segfaulting when core workers disconnect
+    
+    Previously we tried to remove the worker from the correct worker
+    list, but the worker list was a NULL pointer since we never set
+    the core worker list for core workers.
+    
+    Even though it's unseemly to brag, I'm kinda proud of the fact that
+    the workers don't die without being forcefully bludgeoned to death
+    by a signal.
+    
+    Signed-off-by: Andreas Ericsson <a...@op5.se>
+
+diff --git a/base/workers.c b/base/workers.c
+index ef5bd1b..3a24f1d 100644
+--- a/base/workers.c
++++ b/base/workers.c
+@@ -788,6 +788,7 @@ static int register_worker(int sd, char *buf, unsigned int len)
+ 		workers.len++;
+ 		workers.wps = realloc(workers.wps, workers.len * sizeof(struct wproc_worker *));
+ 		workers.wps[workers.len - 1] = worker;
++		worker->wp_list = &workers;
+ 	}
+ 	wproc_num_workers_online++;
+ 	kvvec_destroy(info, 0);

_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to