[rrd-users] core dumps with the RRDs perl module

Ask Bjoern Hansen ask at valueclick.com
Sat May 20 12:59:45 MEST 2000


Hi,

this little script:

#!/usr/bin/perl -w 
use strict;
use RRDs;
use Data::Dumper;

for my $server (qw(d7.la d87.la)) {
    my $rrd = "rps_$server.rrd";
    print "getting info from $rrd ...\n";
    my $data = RRDs::info $rrd;
    print Data::Dumper->Dump([$data], [qw(data)]);
    print "got info from $rrd...\n";
    unless (defined $data) {
        RRDs::create $rrd,
            qw(
               --start now
             DS:requests:COUNTER:600:0:U
             RRA:AVERAGE:0.5:1:600
             RRA:AVERAGE:0.5:6:700
             RRA:AVERAGE:0.5:24:775
             RRA:AVERAGE:0.5:288:797
             RRA:MAX:0.5:1:600
             RRA:MAX:0.5:6:700
             RRA:MAX:0.5:24:775
             RRA:MAX:0.5:288:797
              );
        my $ERR = RRDs::error;
        die "Could not create RRD $rrd $ERR" if $ERR;
      }
}

core dumps when it reads the second file.

a backtrace gives me this:

Program received signal SIGSEGV, Segmentation fault.
0x401b90c9 in XS_RRDs_info () from
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux/auto/RRDs/RRDs.so
(gdb) bt
#0  0x401b90c9 in XS_RRDs_info () from
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux/auto/RRDs/RRDs.so
#1  0x8096385 in Perl_pp_entersub ()
#2  0x809141d in Perl_runops_standard ()
#3  0x805bc40 in S_run_body ()
#4  0x805b9eb in perl_run ()
#5  0x8059911 in main ()
#6  0x400a61eb in __libc_start_main (main=0x80598b0 <main>, argc=2,
argv=0xbffffb94, 
    init=0x8058b14 <_init>, fini=0x80d180c <_fini>, rtld_fini=0x4000a610
<_dl_fini>, stack_end=0xbffffb8c)
    at ../sysdeps/generic/libc-start.c:90


perl -V is:

[ask at impatience rps]$ perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.14, archname=i686-linux
    uname='linux impatience.valueclick.com 2.2.14 #4 smp mon mar 20
14:07:23 pst 2000 i686 unknown '
    config_args='-des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=/lib/libc-2.1.2.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Apr  1 2000 20:35:45
  @INC:
    /usr/local/lib/perl5/5.6.0/i686-linux
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/i686-linux
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl/5.5.670/i686-linux
    /usr/local/lib/perl5/site_perl/5.5.670
    /usr/local/lib/perl5/site_perl/5.005
    /usr/local/lib/perl5/site_perl
    .


 - ask

-- 
ask bjoern hansen - <http://www.netcetera.dk/~ask/>
more than 70M impressions per day, <http://valueclick.com>


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



More information about the rrd-users mailing list