[hobbit] Re: Status not available

Henrik Stoerner henrik at hswn.dk
Tue Mar 1 09:33:51 CET 2005


I've found something that might explain it, but I am certainly not
sure if it's the cause of your problems. This bug would only trigger
if some client of yours was sending in very large "data" messages,
like 100 KB or more.

Could you try the attached patch and let me know if it solves your
problem?

If not, I would like you to try and disable all of the hobbitd worker
modules in hobbitlaunch.cfg - i.e. bbstatus, bbhistory, bbdata,
bbnotes, bbenadies, bbpage, larrdstatus and larrddata. Restart hobbit
and see if it still crashes. If it doesn't then we've narrowed down
the problem - if it does, then the problem is somewhere else than
where I've been looking so far.

Thanks,
Henrik
-------------- next part --------------
--- hobbitd/hobbitd.c	2005/02/27 12:00:50	1.117
+++ hobbitd/hobbitd.c	2005/03/01 08:27:04
@@ -433,10 +433,11 @@
 	channel->msgcount++;
 	gettimeofday(&tstamp, &tz);
 	if (readymsg) {
-		n = sprintf(channel->channelbuf, 
+		n = snprintf(channel->channelbuf, (SHAREDBUFSZ-1),
 			    "@@%s#%u|%d.%06d|%s|%s\n@@\n", 
 			    channelmarker, channel->seq, (int) tstamp.tv_sec, (int) tstamp.tv_usec, sender,
 			    readymsg);
+		*(channel->channelbuf + n) = '\0';
 	}
 	else {
 		switch(channel->channelid) {


More information about the Xymon mailing list