Xymon Mailing List Archive search

hobbitd_rrdtool core

3 messages in this thread

list Erich Zigler · Fri, 21 Jul 2006 16:29:58 -0500 ·
Greetings,
 I have migrated from bigbrother to hobbit-4.2-beta-20060605. I have
followed the documentation and hobbitd_rrdtool is the only thing that is
not working properly. It keeps generating core files. The output is
attached to this message. Any help would be greatly appreciated.

Thank you,

Erich Zigler
-------------- next part --------------
#0  0x003667a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x003a67f5 in raise () from /lib/tls/libc.so.6
#2  0x003a8199 in abort () from /lib/tls/libc.so.6
#3  0x003da4ea in __libc_message () from /lib/tls/libc.so.6
#4  0x003e0c6f in _int_free () from /lib/tls/libc.so.6
#5  0x003e0fea in free () from /lib/tls/libc.so.6
#6  0x0804e7ce in do_sendmail_rrd (hostname=0xb7f86fd3 "omega.uta.edu", testname=0xb7f86fe1 "sendmail",
    msg=0xb7f87015 "status omega,uta,edu.sendmail green Fri Jul 21 16:18:58 CDT 2006  <sendmail>\nStatistics from Tue Jul 27 04:02:01 2004\n M   msgsfr  bytes_from   msgsto    bytes_to  msgsrej msgsdis  Mailer\n 1        0 "..., tstamp=1153516738) at rrd/do_sendmail.c:128
#7  0x08050ce2 in update_rrd (hostname=0xb7f86fd3 "omega.uta.edu", testname=0xb7f86fe1 "sendmail",
    msg=0xb7f87015 "status omega,uta,edu.sendmail green Fri Jul 21 16:18:58 CDT 2006  <sendmail>\nStatistics from Tue Jul 27 04:02:01 2004\n M   msgsfr  bytes_from   msgsto    bytes_to  msgsrej msgsdis  Mailer\n 1        0 "..., tstamp=1153516738, sender=0xb7f86fc4 "129.107.56.23", ldef=0x947fcb8) at do_rrd.c:286
#8  0x08049f11 in main (argc=2, argv=0xbffd0464) at hobbitd_rrd.c:153
list Henrik Størner · Fri, 21 Jul 2006 23:43:09 +0200 ·
quoted from Erich Zigler
On Fri, Jul 21, 2006 at 04:29:58PM -0500, Erich Zigler wrote:
Greetings,
 I have migrated from bigbrother to hobbit-4.2-beta-20060605. I have
followed the documentation and hobbitd_rrdtool is the only thing that is
not working properly. It keeps generating core files. The output is
attached to this message. Any help would be greatly appreciated.
#6  0x0804e7ce in do_sendmail_rrd (hostname=0xb7f86fd3 "omega.uta.edu", testname=0xb7f86fe1 "sendmail",
    msg=0xb7f87015 "status omega,uta,edu.sendmail green Fri Jul 21 16:18:58 CDT 2006  <sendmail>\nStatistics from Tue Jul 27 04:02:01 2004\n M   msgsfr  bytes_from   msgsto    bytes_to  msgsrej msgsdis  Mailer\n 1        0 "..., tstamp=1153516738) at rrd/do_sendmail.c:128
I believe this particular bug was fixed in as part of the beta testing.
Could you try the current release candidate, 4.2-RC-20060712, available
on the sourceforge page ?


Regards,
Henrik
list Henrik Størner · Thu, 3 Aug 2006 08:13:45 +0200 ·
quoted from Erich Zigler
On Fri, Jul 21, 2006 at 04:29:58PM -0500, Erich Zigler wrote:
Greetings,
 I have migrated from bigbrother to hobbit-4.2-beta-20060605. I have
followed the documentation and hobbitd_rrdtool is the only thing that is
not working properly. It keeps generating core files. The output is
attached to this message. Any help would be greatly appreciated.
This patch will solve this issue; against the current 4.2 RC.


Regards,
Henrik

-------------- next part --------------
--- hobbitd/rrd/do_sendmail.c	2006/07/09 21:10:14	1.12
+++ hobbitd/rrd/do_sendmail.c	2006/08/03 06:11:59
@@ -8,7 +8,7 @@
 /*                                                                            */
 /*----------------------------------------------------------------------------*/
 
-static char sendmail_rcsid[] = "$Id: do_sendmail.c,v 1.12 2006/07/09 21:10:14 henrik Exp $";
+static char sendmail_rcsid[] = "$Id: do_sendmail.c,v 1.13 2006/08/03 06:11:57 henrik Exp $";
 
 int do_sendmail_rrd(char *hostname, char *testname, char *msg, time_t tstamp)
 {
@@ -115,16 +115,18 @@
 gotdata:
 			if (*rrdvalues) {
 				int dscount, i;
-				char **dsnames;
+				char **dsnames = NULL;
 
 				setupfn("sendmail.%s.rrd", mailer);
 
 				/* Get the RRD-file dataset count, so we can decide what to do */
 				dscount = rrddatasets(hostname, rrdfn, &dsnames);
 
-				/* Free the dsnames list */
-				for (i=0; (i<dscount); i++) xfree(dsnames[i]);
-				xfree(dsnames);
+				if ((dscount > 0) && dsnames) {
+					/* Free the dsnames list */
+					for (i=0; (i<dscount); i++) xfree(dsnames[i]);
+					xfree(dsnames);
+				}
 
 				if (dscount == 6) {
 					char *p;