[bug?] Crash of hobbitsvc.cgi on trends column display

Charles Goyard cgoyard at cvf.fr
Tue Nov 28 15:47:14 CET 2006


Hi Henrik,

Yesterday I upgraded my hobbit server to take advantage of the
all-in-one corrections, plus the "split-ncv" feature (have a peek in
your spambox to see my message about this :)). I then found a bug
that did not show up on the test host, so I rolled back.

Since then, hobbitsvc.cgi segfaults when I click on the trends column
(renamed _graphs in my setup) :

http://monitor/hobbit-cgi/bb-hostsvc.sh?HOST=somehost.dom&SERVICE=_graphs

Here's gdb output :


#0  bbh_find_item (host=0x8088210, item=BBH_DISPLAYNAME) at
loadhosts.c:160
#1  0x0804e652 in rrdlink_text (host=0x807f980, rrd=0x80881f0,wantmeta=HG_PLAIN_LINK) at hobbitsvc-trends.c:120
#2  0x0804eb99 in generate_trends (hostname=0x80769d8 "somehost.dom") at hobbitsvc-trends.c:288
#3  0x08049feb in do_request () at hobbitsvc.c:216
#4  0x0804aeb6 in main (argc=1, argv=0xbf935594) at hobbitsvc.c:518

just before the crash, I have :

i=0
host->elems gives "Cannot access memory at address 0x0"
item=BBH_DISPLAYNAME
bbh_item_key[item]="NAME:"

160             while (host->elems[i] && strncasecmp(host->elems[i],bbh_item_key[item], strlen(bbh_item_key[item]))) i++;


Can it come from a missing "something" in the configuration ? Can it
crash because of corrupted rrd files ? I continue my investigations,
but you sure can help :).



[oh, I found another small bug, not severe at all: when running
hobbitsvc.cgi from the command line, it segfaults if SCRIPT_NAME is not
set. Maybe it should set SCRIPT_NAME to a sensible default or at least
exit grcefully]


-- 
Charles Goyard - cgoyard at cvf.fr - (+33) 1 45 38 01 31



More information about the Xymon mailing list