[rrd-users] Re: segmentation faults using perl & RRDs::update.
Tobias Oetiker
oetiker at ee.ethz.ch
Wed Mar 22 19:29:25 MET 2000
Today you sent me mail regarding [rrd-users] segmentation faults using perl...:
*> RRDtool 1.0.13
*> Perl 5.005_03 (standard RedHat RPM)
*> RedHat Linux 6.0
*>
*> I have a load of RRD files which each have a single value stored in
*> them. All the RRD files were created by the subroutine which updates
*> them. There are about 36-48 calls to write_rrdlog every 30 minutes, all
*> done within the same main script.
*>
*> sample values are:
*>
*> $mac = "00010209EE2F";
*> $data = 102884;
*>
*> The subroutine called with the above parameters is:
*>
*> sub write_rrdlog {
*> $mac = shift;
*> $data = shift;
*>
*> if (! -f "rrd/$mac.rrd") {
*> print "Creating RRD rrd/$mac.rrd\n";
*> RRDs::create("rrd/$mac.rrd",
*> "DS:used:COUNTER:7200:0:4294967295",
*> # Archive uses max value, archived for 336 x 30m (8d) (daily)
*> "RRA:MAX:0.5:1:336",
*> # Archive uses max value, archived for 384 x 2h (32d) (monthly)
*> "RRA:MAX:0.5:4:384",
*> # Archive uses max value, archived for 384 x 1d (384d) (yearly)
*> "RRA:MAX:0.5:48:384");
*> }
*> RRDs::update("rrd/$mac.rrd","N:$data");
*> print "RRD: $mac.rrd : $data\n";
*> my $ERR=RRDs::error;
*> warn "Error updating $mac.rrd : $ERR\n" if $ERR;
*> }
*>
*> More often than not (about 9 times out of 10) it'll crash at the first
*> RRD write and die with a segmentation fault. Running it manually often
*> produces a crash as well as running it from cron.
*> Does anyone have any ideas what could be causing this?
hmmm this is bad ...
could you try to write a small selve contained script along the
lines of what you find in the examples directory, which
demonstrates the segfault and then send this to me ... it must not
be possible to get perl to segfault even when you do not use
rrdtool properly (which I can not see evidence of from your script)
...
cheers
tobi
*>
*> Best Wishes,
*>
*> Simon Amor
*> Systems Administrator
*> simon.a at webfusion.co.uk
*>
*> ***************************************************************
*> WebFusion Internet Solutions Ltd.
*> The UK's Largest Independent Web Hosting Company
*> http://www.webfusion.co.uk
*> ***************************************************************
*>
*>
*> --
*> 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
*>
--
______ __ _
/_ __/_ / / (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
/ // _ \/ _ \/ / TEL: +41(0)1-6325286 FAX:...1517 ICQ: 10419518
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker
--
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