[rrd-users] Oddities with rrdtool
Jean-Yves Avenard
jyavenard at gmail.com
Fri Jan 1 01:55:21 CET 2010
Hi
2010/1/1 Benny Baumann <BenBE at geshi.org>:
> Looks like some random memory corruption or uninitialized memory. Could
> you please provide a valgrind log of a run where graphing worked and one
> where it didn't?
I'm not familiar with valgrind ; I usually use Purify ...
But I'll have a try next when I see the problem occuring next...
Currently working, that's the output from valgrind:
valgrind /usr/bin/rrdtool graph /tmp/powerjSwa9v -l 0 \
> -t 'USAGE - DAILY (hourly average) 1/1/2010' \
> -x HOUR:1:HOUR:4:HOUR:2:0:%k --slope-mode \
> --step 3600 --start 1262304000 --end 1262390400 \
> -w 480 -h 120 \
> -W '(c) Jean-Yves Avenard 2009-2010. All rights reserved' COMMENT:' ' \
> COMMENT:'Maximum ' \
> COMMENT:'Average ' \
> COMMENT:'Minimum ' \
> COMMENT:'Total View\l' DEF:total=currentcost3.rrd:total:AVERAGE:start=1262304000:end=1262343599 \
> CDEF:totalw=total,3600,/ CDEF:ctotal=totalw,3600,* \
> VDEF:vtotalmax=ctotal,MAXIMUM \
> VDEF:vtotalavg=ctotal,AVERAGE \
> VDEF:vtotalmin=ctotal,MINIMUM \
> VDEF:vtotaltot=totalw,TOTAL AREA:ctotal#ff4500:'Total ' \
> GPRINT:vtotalmax:'%6.1lf %sWh ' \
> GPRINT:vtotalavg:'%6.1lf %sWh ' \
> GPRINT:vtotalmin:'%6.1lf %sWh ' \
> GPRINT:vtotaltot:'%7.2lf %sWh\l' DEF:ch1=currentcost3.rrd:ch1:AVERAGE:start=1262304000:end=1262343599 \
> CDEF:ch1w=ch1,3600,/ CDEF:cch1=ch1w,3600,* \
> VDEF:vch1max=cch1,MAXIMUM \
> VDEF:vch1avg=cch1,AVERAGE \
> VDEF:vch1min=cch1,MINIMUM \
> VDEF:vch1tot=ch1w,TOTAL AREA:cch1#add8e6:'Pool ' \
> GPRINT:vch1max:'%6.1lf %sWh ' \
> GPRINT:vch1avg:'%6.1lf %sWh ' \
> GPRINT:vch1min:'%6.1lf %sWh ' \
> GPRINT:vch1tot:'%7.2lf %sWh\l' DEF:ext=solarprod3.rrd:total:AVERAGE:start=1262304000:end=1262343599 \
> CDEF:extw=ext CDEF:cext=extw,3600,* \
> VDEF:vextmax=cext,MAXIMUM \
> VDEF:vextavg=cext,AVERAGE \
> VDEF:vextmin=cext,MINIMUM \
> VDEF:vexttot=extw,TOTAL AREA:cext#FFd700a0:'Solar ' \
> GPRINT:vextmax:'%6.1lf %sWh ' \
> GPRINT:vextavg:'%6.1lf %sWh ' \
> GPRINT:vextmin:'%6.1lf %sWh ' \
> GPRINT:vexttot:'%7.2lf %sWh\l' COMMENT:'-----------------------------------------------------------------\l' HRULE:0#999999 DEF:import=feedin30min3.rrd:in:AVERAGE:start=1262304000:end=1262343599 \
> CDEF:importw=import,1800,/ \
> CDEF:cimport=importw,3600,* \
> CDEF:cimport2=cimport,-1,* \
> VDEF:vimportmax=cimport,MAXIMUM \
> VDEF:vimportavg=cimport,AVERAGE \
> VDEF:vimportmin=cimport,MINIMUM \
> VDEF:vimporttot=importw,TOTAL AREA:cimport2#ff4500:'Import ' \
> GPRINT:vimportmax:'%6.1lf %sWh ' \
> GPRINT:vimportavg:'%6.1lf %sWh ' \
> GPRINT:vimportmin:'%6.1lf %sWh ' \
> GPRINT:vimporttot:'%7.2lf %sWh\l' DEF:export=feedin30min3.rrd:out:AVERAGE:start=1262304000:end=1262343599 \
> CDEF:exportw=export,1800,/ \
> CDEF:cexport=exportw,3600,* \
> CDEF:cexport2=cexport,-1,* \
> VDEF:vexportmax=cexport,MAXIMUM \
> VDEF:vexportavg=cexport,AVERAGE \
> VDEF:vexportmin=cexport,MINIMUM \
> VDEF:vexporttot=exportw,TOTAL AREA:cexport2#FFd700a0:'Export ' \
> GPRINT:vexportmax:'%6.1lf %sWh ' \
> GPRINT:vexportavg:'%6.1lf %sWh ' \
> GPRINT:vexportmin:'%6.1lf %sWh ' \
> GPRINT:vexporttot:'%7.2lf %sWh\l'
==10650== Memcheck, a memory error detector
==10650== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==10650== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for
copyright info
==10650== Command: /usr/bin/rrdtool graph /tmp/powerjSwa9v -l 0 -t
USAGE\ -\ DAILY\ (hourly\ average)\ 1/1/2010 -x
HOUR:1:HOUR:4:HOUR:2:0:%k --slope-mode --step 3600 --start 1262304000
--end 1262390400 -w 480 -h 120 -W (c)\ Jean-Yves\ Avenard\ 2009-2010.\
All\ rights\ reserved COMMENT:\ \ \ \ \ \ \ \ \ \ \ \
COMMENT:Maximum\ \ \ \ COMMENT:Average\ \ \ \ COMMENT:Minimum\ \ \ \
COMMENT:Total\ View\\l
DEF:total=currentcost3.rrd:total:AVERAGE:start=1262304000:end=1262343599
CDEF:totalw=total,3600,/ CDEF:ctotal=totalw,3600,*
VDEF:vtotalmax=ctotal,MAXIMUM VDEF:vtotalavg=ctotal,AVERAGE
VDEF:vtotalmin=ctotal,MINIMUM VDEF:vtotaltot=totalw,TOTAL
AREA:ctotal#ff4500:Total\ \ \ GPRINT:vtotalmax:%6.1lf\ %sWh\
GPRINT:vtotalavg:%6.1lf\ %sWh\ GPRINT:vtotalmin:%6.1lf\ %sWh\ \
GPRINT:vtotaltot:%7.2lf\ %sWh\\l
DEF:ch1=currentcost3.rrd:ch1:AVERAGE:start=1262304000:end=1262343599
CDEF:ch1w=ch1,3600,/ CDEF:cch1=ch1w,3600,* VDEF:vch1max=cch1,MAXIMUM
VDEF:vch1avg=cch1,AVERAGE VDEF:vch1min=cch1,MINIMUM
VDEF:vch1tot=ch1w,TOTAL AREA:cch1#add8e6:Pool\ \ \ \
GPRINT:vch1max:%6.1lf\ %sWh\ GPRINT:vch1avg:%6.1lf\ %sWh\
GPRINT:vch1min:%6.1lf\ %sWh\ \ GPRINT:vch1tot:%7.2lf\ %sWh\\l
DEF:ext=solarprod3.rrd:total:AVERAGE:start=1262304000:end=1262343599
CDEF:extw=ext CDEF:cext=extw,3600,* VDEF:vextmax=cext,MAXIMUM
VDEF:vextavg=cext,AVERAGE VDEF:vextmin=cext,MINIMUM
VDEF:vexttot=extw,TOTAL AREA:cext#FFd700a0:Solar\ \ \
GPRINT:vextmax:%6.1lf\ %sWh\ GPRINT:vextavg:%6.1lf\ %sWh\
GPRINT:vextmin:%6.1lf\ %sWh\ \ GPRINT:vexttot:%7.2lf\ %sWh\\l
COMMENT:-----------------------------------------------------------------\\l
HRULE:0#999999 DEF:import=feedin30min3.rrd:in:AVERAGE:start=1262304000:end=1262343599
CDEF:importw=import,1800,/ CDEF:cimport=importw,3600,*
CDEF:cimport2=cimport,-1,* VDEF:vimportmax=cimport,MAXIMUM
VDEF:vimportavg=cimport,AVERAGE VDEF:vimportmin=cimport,MINIMUM
VDEF:vimporttot=importw,TOTAL AREA:cimport2#ff4500:Import\ \
GPRINT:vimportmax:%6.1lf\ %sWh\ GPRINT:vimportavg:%6.1lf\ %sWh\
GPRINT:vimportmin:%6.1lf\ %sWh\ \ GPRINT:vimporttot:%7.2lf\ %sWh\\l
DEF:export=feedin30min3.rrd:out:AVERAGE:start=1262304000:end=1262343599
CDEF:exportw=export,1800,/ CDEF:cexport=exportw,3600,*
CDEF:cexport2=cexport,-1,* VDEF:vexportmax=cexport,MAXIMUM
VDEF:vexportavg=cexport,AVERAGE VDEF:vexportmin=cexport,MINIMUM
VDEF:vexporttot=exportw,TOTAL AREA:cexport2#FFd700a0:Export\ \
GPRINT:vexportmax:%6.1lf\ %sWh\ GPRINT:vexportavg:%6.1lf\ %sWh\
GPRINT:vexportmin:%6.1lf\ %sWh\ \ GPRINT:vexporttot:%7.2lf\ %sWh\\l
==10650==
==10650== Invalid read of size 8
==10650== at 0x4E37D56: data_proc (rrd_graph.c:1253)
==10650== by 0x4E3FFD1: graph_paint (rrd_graph.c:3276)
==10650== by 0x4E43308: rrd_graph_v (rrd_graph.c:3939)
==10650== by 0x4E42D05: rrd_graph (rrd_graph.c:3820)
==10650== by 0x402F78: HandleInputLine (rrd_tool.c:790)
==10650== by 0x40377B: main (rrd_tool.c:511)
==10650== Address 0x97966f8 is 0 bytes after a block of size 88 alloc'd
==10650== at 0x4C25153: malloc (vg_replace_malloc.c:195)
==10650== by 0x4E37686: data_calc (rrd_graph.c:1127)
==10650== by 0x4E3FC97: graph_paint (rrd_graph.c:3232)
==10650== by 0x4E43308: rrd_graph_v (rrd_graph.c:3939)
==10650== by 0x4E42D05: rrd_graph (rrd_graph.c:3820)
==10650== by 0x402F78: HandleInputLine (rrd_tool.c:790)
==10650== by 0x40377B: main (rrd_tool.c:511)
==10650==
561x288
==10650==
==10650== HEAP SUMMARY:
==10650== in use at exit: 376,314 bytes in 4,296 blocks
==10650== total heap usage: 14,880 allocs, 10,584 frees, 9,257,593
bytes allocated
==10650==
==10650== LEAK SUMMARY:
==10650== definitely lost: 8,508 bytes in 14 blocks
==10650== indirectly lost: 19,408 bytes in 609 blocks
==10650== possibly lost: 229,291 bytes in 988 blocks
==10650== still reachable: 119,107 bytes in 2,685 blocks
==10650== suppressed: 0 bytes in 0 blocks
==10650== Rerun with --leak-check=full to see details of leaked memory
==10650==
==10650== For counts of detected and suppressed errors, rerun with: -v
==10650== ERROR SUMMARY: 5 errors from 1 contexts (suppressed: 7 from 7)
> Please install the library symbols for rrdtool and associated libraries
> beforehand so valgrind finds them and reports proper locations in you dump.
I compiled rrdtool on a Ubuntu 9.10 myself as the current ubuntu
packages are broken (the python binding package is empty)
So getting the debugging symbols isn't a problem
>> http://i45.tinypic.com/2mmhxj.png -> ok
>> http://i45.tinypic.com/2llldn9.png -> ok
>> http://i45.tinypic.com/2llldn9.jpg -> ok
>> http://i50.tinypic.com/8vn3pk.png -> not ok
>>
>> I have another plot that is made of only 3 graphs.
>> Sometimes any combination of 2 or 3 graph works ; but graphing one
>> alone doesn't work ; getting those ? in the scale on the lest.
>>
> hmmm, can't see the question marks you mentioned for the last of those
> links. Could you please elaborate?
Oops, my bad..
Here is one
http://i45.tinypic.com/1owv0g.png
It happens about twice a day now. On all system logging similar data
(power monitoring, one at home, one at work)
> hmmm, could you also check the used libraries for their version numbers.
> If you have another computer where it works, could you provide version
> numbers for it too? (Just to see if this is related to some externally
> used librariy)
It has the same behaviour on two completely different machines. That
is from time to time, no graph is generated and the scale on the right
contains '?'
The two machines are : one is running RRDTOOL 1.3.9 on a FreeBSD 64
bits machine and the other is running RRDTOOL 1.4.2 on a Ubuntu 9.10
(linux 2.6.31)
So it couldn't be any different from one another, the FreeBSD box
doesn't even use glibc
On the ubuntu 9.10:
$ ldd /usr/local/bin/rrdtool
linux-vdso.so.1 => (0x00007fff087ff000)
librrd.so.4 => /usr/local/lib/librrd.so.4 (0x00007fdf4ba05000)
$ls -l /usr/local/lib/librrd.so.4
lrwxrwxrwx 1 root root 15 2009-12-31 03:25 /usr/local/lib/librrd.so.4
-> librrd.so.4.1.2
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007fdf4b6b7000)
libm.so.6 => /lib/libm.so.6 (0x00007fdf4b433000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00007fdf4b20c000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007fdf4b000000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007fdf4adb7000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007fdf4ab34000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007fdf4a8ed000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007fdf4a6e9000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00007fdf4a422000)
libc.so.6 => /lib/libc.so.6 (0x00007fdf4a0b3000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fdf49eaf000)
libz.so.1 => /lib/libz.so.1 (0x00007fdf49c98000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007fdf49a6f000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007fdf497ea000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007fdf495b8000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007fdf49373000)
libdirectfb-1.2.so.0 => /usr/lib/libdirectfb-1.2.so.0 (0x00007fdf490e8000)
libfusion-1.2.so.0 => /usr/lib/libfusion-1.2.so.0 (0x00007fdf48ede000)
libdirect-1.2.so.0 => /usr/lib/libdirect-1.2.so.0 (0x00007fdf48cc3000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fdf48aa7000)
libxcb-render-util.so.0 => /usr/lib/libxcb-render-util.so.0
(0x00007fdf488a3000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007fdf4869a000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fdf4847e000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007fdf48274000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fdf47f3e000)
libpcre.so.3 => /lib/libpcre.so.3 (0x00007fdf47d10000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdf4bc42000)
libexpat.so.1 => /lib/libexpat.so.1 (0x00007fdf47ae7000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fdf478e4000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fdf476df000)
On FreeBSD:
/usr/local/bin/rrdtool:
librrd.so.5 => /usr/local/lib/librrd.so.5 (0x2807e000)
libpangocairo-1.0.so.0 => /usr/local/lib/libpangocairo-1.0.so.0 (0x280b4000)
libcairo.so.2 => /usr/local/lib/libcairo.so.2 (0x280be000)
libpixman-1.so.9 => /usr/local/lib/libpixman-1.so.9 (0x2811c000)
libpng.so.5 => /usr/local/lib/libpng.so.5 (0x28166000)
libxcb-render-util.so.0 => /usr/local/lib/libxcb-render-util.so.0 (0x28188000)
libxcb-render.so.0 => /usr/local/lib/libxcb-render.so.0 (0x2818c000)
libxcb.so.2 => /usr/local/lib/libxcb.so.2 (0x28192000)
libXau.so.6 => /usr/local/lib/libXau.so.6 (0x281a7000)
libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x281aa000)
libpangoft2-1.0.so.0 => /usr/local/lib/libpangoft2-1.0.so.0 (0x281af000)
libpango-1.0.so.0 => /usr/local/lib/libpango-1.0.so.0 (0x281db000)
libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0x28218000)
libfreetype.so.9 => /usr/local/lib/libfreetype.so.9 (0x28242000)
libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x282af000)
libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0 (0x282cd000)
libgmodule-2.0.so.0 => /usr/local/lib/libgmodule-2.0.so.0 (0x28303000)
libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x28307000)
libintl.so.8 => /usr/local/lib/libintl.so.8 (0x283ad000)
libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x283b6000)
libxml2.so.5 => /usr/local/lib/libxml2.so.5 (0x283e8000)
libz.so.3 => /lib/libz.so.3 (0x284fc000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x2850d000)
libm.so.4 => /lib/libm.so.4 (0x28602000)
libpthread.so.2 => /lib/libpthread.so.2 (0x28617000)
libc.so.6 => /lib/libc.so.6 (0x2863c000)
Thanks for your help
Jean-Yves
More information about the rrd-users
mailing list