[rrd-developers] rrd_graph.c crashed on right Y-axis with SI units

Tobias Oetiker tobi at oetiker.ch
Sun Aug 12 16:39:51 CEST 2012

Hi Martin,

> I was just trying to make rrdtool 1.4.7 from Gentoo to make throughput graphs
> in bps on the left axis and in Bps on the right one, when it suddenly crashed:
> Program terminated with signal 11, Segmentation fault.
> #0  0xb710c3dd in vfprintf () from /lib/libc.so.6
> (gdb) where
> #0  0xb710c3dd in vfprintf () from /lib/libc.so.6
> #1  0xb712e525 in vsprintf () from /lib/libc.so.6
> #2  0xb7113dcc in sprintf () from /lib/libc.so.6
> #3  0xb771bdee in draw_horizontal_grid (im=im at entry=0xbfefb710) at rrd_graph.c:2103
> #4  0xb771f0ee in grid_paint (im=im at entry=0xbfefb710) at rrd_graph.c:2678
> #5  0xb772586b in graph_paint (im=im at entry=0xbfefb710) at rrd_graph.c:3714
> #6  0xb7725abc in rrd_graph_v (argc=argc at entry=25, argv=argv at entry=0xbfefe998) at rrd_graph.c:4003
> #7  0xb7725c86 in rrd_graph (argc=argc at entry=25, argv=argv at entry=0xbfefe998, prdata=prdata at entry=0xbfefe7b4, xsize=xsize at entry=0xbfefe7b8,
>     ysize=ysize at entry=0xbfefe7bc, stream=stream at entry=0x0, ymin=ymin at entry=0xbfefe7c0, ymax=ymax at entry=0xbfefe7c8) at rrd_graph.c:3883
> #8  0x0804ad04 in HandleInputLine (argc=26, argv=0xbfefe994, out=0xb7266960 <_IO_2_1_stderr_>) at rrd_tool.c:871
> #9  0x08049303 in main (argc=26, argv=0xbfefe994) at rrd_tool.c:521
> (gdb) print draw_horizontal_grid::im->second_axis_format
> $1 = "%6.2lf %s"
oops ...

> Okay, then I decided I'll try to see the latest development version if that's
> been fixed.  Unfortunately, after checking out the SVN stuff, autocrap seemed
> to have created itself yet another problem it wasn't able to solve:
> $ ./autogen.sh
> ... (omitted) ...
> configure.ac:464: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
> ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
> ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
> ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
> ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
> ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
> ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
> configure.ac:464: the top level
> bindings/tcl/Makefile.am:31: error: 'pkglibdir' is not a legitimate directory for 'SCRIPTS'
> bindings/tcl/Makefile.am:30: error: 'pkglibdir' is not a legitimate directory for 'DATA'
> autoreconf-2.69: automake failed with exit status: 1
> $
> Anyway, I wrote a patch against 1.4.7 that works for me, but I'm not entirely
> confident on whether this is the desired behavior for everyone.  It enables
> unit scaling just the same way as on the left axis, and works with %s.

thanks for investigating this ... the intended behaviour is not to
autoscale in that way though ... there was already an incomplete
fix for this probem in r2123 ... I have not put in the rest of the
fix in r2297


Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900

More information about the rrd-developers mailing list