[rrd-developers] Re: 1.0.8 RRDs perl coredump?

Tobias Weingartner weingart at cs.ualberta.ca
Thu Nov 25 23:37:03 MET 1999


On Thursday, November 25, Tobias Oetiker wrote:
> 
> aaargh ... I love it ... unfortunately I can not recreate this problem on
> solaris ... could you trie to reproduce this on the command line ... put a
> print statement before the create call in perl and try to execute with
> rrdtool ...

irricana:95> perl base.t
[...]
RRDs::create demo1.rrd, -b 943519060 -s 100 DS:a:GAUGE:2000:U:U DS:b:GAUGE:200:U:U DS:c:GAUGE:200:U:U DS:d:GAUGE:200:U:U DS:e:DERIVE:200:U:U RRA:AVERAGE:0.5:1:5000 RRA:AVERAGE:0.5:10:500
Segmentation fault (core dumped)
irricana:96> rrdtool create demo1.rrd -b 943519060 -s 100 DS:a:GAUGE:2000:U:U DS:b:GAUGE:200:U:U DS:c:GAUGE:200:U:U DS:d:GAUGE:200:U:U DS:e:DERIVE:200:U:U RRA:AVERAGE:0.5:1:5000 RRA:AVERAGE:0.5:10:500
irricana:97> 

Well, seems to be a perl<->RRDs "thingmajig".  Also, looking at the gdb
output, I find this:

#0  0x4014501a in init_scanner (argc=1, argv=0xefbfd884) at parsetime.c:372
372     sc_len += strlen(*argv++);
(gdb) p *argv
$1 = 0x0
(gdb) where
#0  0x4014501a in init_scanner (argc=1, argv=0xefbfd884) at parsetime.c:372
#1  0x40145d11 in parsetime (tspec=0x0, ptv=0xefbfd8d4) at parsetime.c:792
#2  0x4014661f in rrd_create (argc=13, argv=0x89080) at rrd_create.c:64
#3  0x401426a7 in XS_RRDs_create (cv=0xccd98) at RRDs.xs:84
#4  0x36ab2 in Perl_pp_entersub ()
#5  0x63e02 in Perl_runops_standard ()
#6  0x392d in perl_run ()
#7  0x1773 in main ()

Which tells me that a NULL deref caused the problem.  Looking up the stack,
argv = &tspec, and tspec = 0x0, so that is still ok.  Looking further up
the stack, we find that tspec = optarg.  However, optarg = '943519060'.

So, how did optarg='something' turn into tspec=0x0?

--Toby.

--
* To unsubscribe from the rrd-developers mailing list, send a message with the
  subject: unsubscribe to rrd-developers-request at list.ee.ethz.ch



More information about the rrd-developers mailing list