[rrd-developers] rrd_graph.c: draw_horizontal_grid(), im->maxval=NaN(0xfffffffffffff)
Stanislav Sinyagin
ssinyagin at yahoo.com
Fri Apr 25 23:46:03 MEST 2003
Hi all,
with today's CVS snapshot, as well as with 2003-04-12,
gcc-3.2.2 on Solaris 8, with optimisation disabled:
created the following RRD, with no data in it:
> /usr/local/rrdtool-1.1.0/bin/rrdtool info /tmp/getdim-23809.rrd
filename = "/tmp/getdim-23809.rrd"
rrd_version = "0001"
step = 300
last_update = 1051305680
ds[A].type = "GAUGE"
ds[A].minimal_heartbeat = 300
ds[A].min = NaN
ds[A].max = NaN
ds[A].last_ds = ""
ds[A].value = 0.0000000000e+00
ds[A].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 100
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = 1.0609978950e-314
rra[0].cdp_prep[0].unknown_datapoints = 4294967295
The following graph command takes ages:
/usr/local/rrdtool-1.1.0/bin/rrdtool graph /tmp/aaaa.png --imgformat=PNG --width=500 --height=400
DEF:A=/tmp/getdim-23809.rrd:A:AVERAGE LINE1:A#000000
In the debugger, it appeared that the loop end is far beyond the horizont:
1570 if ( Y0 >= im->yorigin-im->ysize
(gdb)
1568 for (i = sgrid; i <= egrid; i++){
(gdb) where
#0 draw_horizontal_grid (im=0xffbec930) at rrd_graph.c:1568
#1 0x2ef4c in grid_paint (im=0xffbec930) at rrd_graph.c:1874
#2 0x31b88 in graph_paint (im=0xffbec930, calcpr=0xffbed1b8)
at rrd_graph.c:2442
#3 0x32a78 in rrd_graph (argc=7, argv=0xffbefaf0, prdata=0xffbed1b8,
xsize=0xffbed1c0, ysize=0xffbed1c4) at rrd_graph.c:2598
#4 0x1c734 in HandleInputLine (argc=8, argv=0xffbefaec, out=0xff340294)
at rrd_tool.c:591
#5 0x1b474 in main (argc=8, argv=0xffbefaec) at rrd_tool.c:364
(gdb) p sgrid
$1 = 18
(gdb) p egrid
$2 = 2147483647
(gdb) p i
$3 = 194438
(gdb) p im->maxval
$4 = NaN(0xfffffffffffff)
Perhaps soon I'll get more debug information, now it's time to go to bed...
The strange thing is that it doesn't happen always: sometimes it draws
the graph the usual way.
The code that uses this and where I found this problem is here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/rrfw/src/bin/rrd_getdim.in
Cheers,
Stan
--
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