[rrd-developers] Occasional core dumps

paulw at oninit.com paulw at oninit.com
Wed Jul 18 13:38:47 MEST 2001

I've been getting occasional core dumps when doing graphs, not often
but often enough to try and trace it.

I found in data_proc that the array element used in 
im->gdes[vidx].data[<calculation>] was not being calculated properly all 
the time.  Why I have no idea, 'cos if I do the index calculation prior
it's usage in the element it works fine

gr_time   995368117   
vidx     1            
start    995367900    
step     300          
step + 1 301          
ds_cnt   1            
ds       0            
calc     1088356720

So I've changed

 value = 
             ((unsigned long)floor((double)                              
                          (gr_time - im->gdes[vidx].start )              
                          / im->gdes[vidx].step)+1)                      
             /* added one because data was not being aligned properly    
                this fixes it. We may also be having a problem in fetch

	int idx=0;

	idx=((unsigned long)floor((double)                              
                          (gr_time - im->gdes[vidx].start )              
                          / im->gdes[vidx].step)+1)                      

	 value = im->gdes[vidx].data[idx];

Anybody shed any light on this??  What am I missing??

BTW I'm on Solaris 7 and gcc-2.95 and rrdtool-1.0.33

Paul Watson             #          
Oninit Ltd              # You are only young once
Tel: +44 1436 672201    # but you can be immature
Fax: +44 1436 678693    # for ever
www.oninit.com          #

Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the rrd-developers mailing list