objects.cache : CGI fails if line longer than 64K characters (2.0 b3)

Fran=?utf-8?B?w6c=?=ois Laupretre francois.laupretre-prestataire at calyon.com
Mon May 23 15:17:26 CEST 2005


Hi all,
 
I am currently investigating this problem, so more information could follow.
 
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'.
 
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.
 
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.
 
This is where I am for now. I am going to look at the function reading the
cache file.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20050523/531aa1f9/attachment.html>
-------------- next part --------------
Ce message et ses pièces jointes (le "message") est destiné à l'usage    
exclusif de son destinataire.                                            
Si vous recevez ce message par erreur, merci d'en aviser immédiatement   
l'expéditeur  et de le détruire ensuite. Le présent message  pouvant  
être altéré à notre insu,  CALYON Corporate and Investment Bank                              
ne peut pas être engagé par son contenu. Tous droits réservés. 
          
This message and/or any  attachments (the "message") is intended for     
the sole use of its addressee.                                            
If you are not the addressee, please immediately notify the sender and    
then destroy the message.  As this message and/or any attachments may 
have been altered without our knowledge,  its content  is not legally 
binding on CALYON Corporate and Investment Bank. All rights reserved.                                                                


More information about the Developers mailing list