<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=542295312-23052005><FONT face=Arial size=2>Hi
all,</FONT></SPAN></DIV>
<DIV><SPAN class=542295312-23052005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=542295312-23052005><FONT face=Arial size=2>I am currently
investigating this problem, so more information could
follow.</FONT></SPAN></DIV>
<DIV><SPAN class=542295312-23052005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=542295312-23052005><FONT face=Arial size=2>I generate my nagios
configuration from several sources, some from LDAP, some from external
databases, etc. This just to say that the object configuration files I generate
are quite big (about 100 K lines and 2,5 M bytes). I recently added some new
hosts to my Nagios configuration and, after this addition, the nagios daemon is
still working perfectly, but all the CGIs tell me that they 'Could not
read object configuration data'.</FONT></SPAN></DIV>
<DIV><SPAN class=542295312-23052005><STRONG><FONT face=Arial
size=2></FONT></STRONG></SPAN> </DIV>
<DIV><SPAN class=542295312-23052005><FONT face=Arial size=2>After some traces in
the code, I found that every CGI programs are failing in
xodtemplate_register_servicegroup in the test for a non null
svc_description.</FONT></SPAN></DIV>
<DIV><SPAN class=542295312-23052005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=542295312-23052005><FONT face=Arial size=2>If I tell
him to printf 'this_servicegroup->members', I get a SIGSEGV ! Hmm ! So,
I had it printf every 'host_name' returned by strtok, and I saw that the last
one before the errror was truncated. And after this field, strtok returns
NULL (for svc_description). There, we know that we have a problem when reading
the cache file because the string is not null-terminated. And, looking in the
cache file, I found the line to be perfect. So, the problem is in the read part.
Another thing : if I look at the character offset where it is stopping, it is
character number 65538 in the line. If I substract the 'members' prefix of 12
chars, I get an offset of 65526.</FONT></SPAN></DIV>
<DIV><SPAN class=542295312-23052005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=542295312-23052005><FONT face=Arial size=2>This is where I am
for now. I am going to look at the function reading the cache
file.</FONT></SPAN><SPAN class=542295312-23052005></SPAN></DIV></BODY></HTML>