[rrd-developers] MRTG , Segmentation Fault , After re-installing perl .
Mr. James W. Laferriere
babydr at baby-dragons.com
Tue Apr 7 21:48:26 CEST 2009
Hello Tobias & Kevin , See inline .
On Tue, 7 Apr 2009, Tobias Oetiker wrote:
> Hi James,
>
> the *.cfg_l file is normal after the second run it is used for
> makeing sure that only one copy of mrtg is running.
>
> whyy do you think there is a segfault occuring ?
Because it pipes out 'Segmentation fault' out on the console and
only on the console . At least I take that as a good hint :-) .
> try
>
> # rm core
> # ulimit -c unlimited
> # ./mrtg mrtg.cfg
>
> when there is a segfault you should now have a core file
Some where else core files are being disabled . So no core file(s) .
But Kevin has shown me how to get around that .
> # gdb --core=core perl
>
> inside gdb type
>
>> bt
>
> cheers
> tobi
Please see attached file for the bt & some more for Kevin he had asked for .
Versions information below ...
Tia , JimL
ps: I am not sure this is a rrdtool problem , It may be mrtg or perl
related .
# /usr/local/bin/perl --version
This is perl, v5.10.0 built for i686-linux
Copyright 1987-2007, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
# cat /usr/local/bin/perl | head -5
#! /usr/local/bin/perl -w
# -*- mode: cperl -*-
###################################################################
# MRTG 2.16.2 Multi Router Traffic Grapher
# rrdtool --version
RRDtool 1.3.6 Copyright 1997-2008 by Tobias Oetiker <tobi at oetiker.ch>
Compiled Feb 6 2009 09:28:18
...snip...
> Today Mr. James W. Laferriere wrote:
>
>> Hello Kevin ,
>> Ok , I grabbed 1.3.7 & compiled it & installed .
>> I still have the mrtg-2.16.2 executable in place as mrtg-ORIG & tried
>> that .
>> I had a successful manual run using the test to-rtr01.cfg , no
>> lingering *.cfg_l* file(s) .
>> But on running it a second manual run I get those lingering *.cfg_l*
>> file(s) , Output below of a mrtg --debug ...
>>
>> There still is the 'SegFault' which isn't very good , which
>> cause the lingering files .
>>
>> I'll try getting you the rest of the data you requested .
>>
>> Tia , JimL
>>
>>
>> # rm /var/www/htdocs/router2cgi/cfg/*_l_* ; /usr/local/mrtg-2/bin/mrtg-ORIG --debug="base,snpo,snpo2,coca,repo,fork,time,log,eval,prof" /var/www/htdocs/router2cgi/cfg/to-rtr01.cfg
>> rm: cannot remove `/var/www/htdocs/router2cgi/cfg/*_l_*': No such file or directory
>> --time: prog start Tue Apr 7 09:56:42 2009
>> --base: Creating Lockfiles /var/www/htdocs/router2cgi/cfg/to-rtr01.cfg_l,/var/www/htdocs/router2cgi/cfg/to-rtr01.cfg_l_21578
>> --base: Reading Config File: /var/www/htdocs/router2cgi/cfg/to-rtr01.cfg
>> --base: Reading Interface Config cache
>> --base: Checking Config File
>> --base: Loading RRD support
>> --base: Loading default Locale
>> --base: Starting main Loop
>> --time: loop start Tue Apr 7 09:56:42 2009
>> --base: Populate Target object by polling SNMP and external Datasources
>> --time: snmp read start Tue Apr 7 09:56:42 2009
>> --snpo: run snmpget from ifInOctets&ifOutOctets:6f4 at I#NB$@to-rtr01
>> --snpo: simple If: .1
>> --snpo: simple If: .1
>> --snpo: SNMPGet from 6f4 at I#NB$@to-rtr01: -- ifInOctets.1,ifOutOctets.1
>> --snpo: SNMPfound -- '316328040', '1294124291'
>> --snpo: run snmpget from ifInOctets&ifOutOctets:6f4 at I#NB$@to-rtr01
>> --snpo: simple If: .2
>> --snpo: simple If: .2
>> --snpo: SNMPGet from 6f4 at I#NB$@to-rtr01: -- ifInOctets.2,ifOutOctets.2
>> --snpo: SNMPfound -- '904537115', '4203066052'
>> --snpo: run snmpget from ifInOctets&ifOutOctets:6f4 at I#NB$@to-rtr01
>> --snpo: simple If: .3
>> --snpo: simple If: .3
>> --snpo: SNMPGet from 6f4 at I#NB$@to-rtr01: -- ifInOctets.3,ifOutOctets.3
>> --snpo: SNMPfound -- 'undef', 'undef'
>> --snpo: run snmpget from .1.3.6.1.2.1.2.2.1.14&.1.3.6.1.2.1.2.2.1.20:6f4 at I#NB$@to-rtr01
>> --snpo: simple If: .1
>> --snpo: simple If: .1
>> --snpo: SNMPGet from 6f4 at I#NB$@to-rtr01: -- .1.3.6.1.2.1.2.2.1.14.1,.1.3.6.1.2.1.2.2.1.20.1
>> --snpo: SNMPfound -- '18013', 'undef'
>> --snpo: run snmpget from .1.3.6.1.2.1.2.2.1.14&.1.3.6.1.2.1.2.2.1.20:6f4 at I#NB$@to-rtr01
>> --snpo: simple If: .2
>> --snpo: simple If: .2
>> --snpo: SNMPGet from 6f4 at I#NB$@to-rtr01: -- .1.3.6.1.2.1.2.2.1.14.2,.1.3.6.1.2.1.2.2.1.20.2
>> --snpo: SNMPfound -- 'undef', 'undef'
>> --snpo: run snmpget from .1.3.6.1.2.1.2.2.1.14&.1.3.6.1.2.1.2.2.1.20:6f4 at I#NB$@to-rtr01
>> --snpo: simple If: .3
>> --snpo: simple If: .3
>> --snpo: SNMPGet from 6f4 at I#NB$@to-rtr01: -- .1.3.6.1.2.1.2.2.1.14.3,.1.3.6.1.2.1.2.2.1.20.3
>> --snpo: SNMPfound -- 'undef', 'undef'
>> --time: target loop start Tue Apr 7 09:56:42 2009
>> --base: Act on Router/Target to-rtr01_1
>> --base: Get Current values: in:316328040, out:1294124291, up:undef, name:undef, time:1239127002
>> --base: Create Graphics
>> --base: start RRDtool section
>> --base: maxi:48000, maxo:48000
>> --log: RRDs::tune(/var/www/htdocs/router2cgi/graphs/to-rtr01/to-rtr01_1.rrd -a ds0:48000 -a ds1:48000 -d ds0:COUNTER -d ds1:COUNTER)
>> --prof: RRDs::tune /var/www/htdocs/router2cgi/graphs/to-rtr01/to-rtr01_1.rrd - 0.000s
>> --log: RRDs::update(/var/www/htdocs/router2cgi/graphs/to-rtr01/to-rtr01_1.rrd, '1239127002:316328040:1294124291')
>> Segmentation fault
>>
>> root at dsb-mntr01:~/bin# dir /var/www/htdocs/router2cgi/cfg/*to*rtr01*
>> 12 -rw-r--r-- 1 root apache 11813 2009-04-02 12:15 /var/www/htdocs/router2cgi/cfg/to-rtr01.cfg
>> 0 -rw-r--r-- 2 root root 0 2009-04-07 09:56 /var/www/htdocs/router2cgi/cfg/to-rtr01.cfg_l
>> 0 -rw-r--r-- 2 root root 0 2009-04-07 09:56 /var/www/htdocs/router2cgi/cfg/to-rtr01.cfg_l_21578
>> 0 -rw-r--r-- 1 root root 0 2009-04-07 09:52 /var/www/htdocs/router2cgi/cfg/to-rtr01.ok
>>
>>
>
>
--
+------------------------------------------------------------------+
| James W. Laferriere | System Techniques | Give me VMS |
| Network&System Engineer | 2133 McCullam Ave | Give me Linux |
| babydr at baby-dragons.com | Fairbanks, AK. 99701 | only on AXP |
+------------------------------------------------------------------+
-------------- next part --------------
[?1034hGNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-slackware-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) set args /usr/local/mrtg-2/bin/mrtg-ORIG /var/www/htdocs/router2cgi/cfg/to-rtr01.cfg
(gdb) run
Starting program: /usr/local/bin/perl /usr/local/mrtg-2/bin/mrtg-ORIG /var/www/htdocs/router2cgi/cfg/to-rtr01.cfg
[Thread debugging using libthread_db enabled]
[New Thread -1210308928 (LWP 24711)]
Error while reading shared library symbols:
Cannot find new threads: generic error
2009-04-07 11:27:45: ERROR: I guess another mrtg is running. A lockfile (/var/www/htdocs/router2cgi/cfg/to-rtr01.cfg_l) aged
794 seconds is hanging around. If you are sure that no other mrtg
is running you can remove the lockfile
Program exited with code 021.
(gdb) bt
No stack.
(gdb) run
Starting program: /usr/local/bin/perl /usr/local/mrtg-2/bin/mrtg-ORIG /var/www/htdocs/router2cgi/cfg/to-rtr01.cfg
[Thread debugging using libthread_db enabled]
[New Thread -1210476864 (LWP 24777)]
Error while reading shared library symbols:
Cannot find new threads: generic error
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210476864 (LWP 24777)]
0xb7e0822b in strlen () from /lib/libc.so.6
(gdb) bt
#0 0xb7e0822b in strlen () from /lib/libc.so.6
#1 0xb7dda281 in vfprintf () from /lib/libc.so.6
#2 0xb7df8d91 in vsnprintf () from /lib/libc.so.6
#3 0xb7d252ac in sprintf_alloc (fmt=0xb7d315c2 "[%lli]RRA[%s][%lu]DS[%s]") at rrd_info.c:34
#4 0xb7d2a193 in write_to_rras (rrd=0xbfb89dc4, rrd_file=0x8152120, rra_step_cnt=<value optimized out>, rra_begin=2760,
current_time=1239132519, skip_update=0x89cf850, pcdp_summary=0xbfb89e20) at rrd_update.c:1944
#5 0xb7d2ad1f in process_arg (step_start=0x89cee48 "1239132519", rrd=0xbfb89dc4, rrd_file=0x8152120, rra_begin=3085799768,
current_time=0xbfb89df8, current_time_usec=0xbfb89df4, pdp_temp=0x89cf770, pdp_new=0x89cf788, rra_step_cnt=0x89cf668,
updvals=0x88de450, tmpl_idx=0x8817c20, tmpl_cnt=3, pcdp_summary=0xbfb89e20, version=3, skip_update=0x89cf850,
schedule_smooth=0xbfb89df0) at rrd_update.c:819
#6 0xb7d2be8a in _rrd_update (filename=0x89cf6d0 "/var/www/htdocs/router2cgi/graphs/to-rtr01/to-rtr01_1.rrd", tmplt=0x0, argc=1,
argv=0x8817d88, pcdp_summary=0x887ca20) at rrd_update.c:497
#7 0xb7d2c4a1 in rrd_update_v (argc=2, argv=0x8817d80) at rrd_update.c:362
#8 0xb7d390cf in XS_RRDs_updatev () from /usr/local/lib/perl5/site_perl/5.10.0/i686-linux//auto/RRDs/RRDs.so
#9 0x0809ed60 in Perl_pp_entersub ()
#10 0x0809d638 in Perl_runops_standard ()
#11 0x08099fa4 in perl_run ()
#12 0x0805ed7f in main ()
(gdb) select 4
(gdb) p rrd->stat_head->ds_cnt
$1 = 2
(gdb) p rrd->stat_head
$2 = (stat_head_t *) 0xb7cee000
(gdb) p rrd->ds_def[ds_idx].ds_nam
No symbol "ds_idx" in current context.
(gdb)
No symbol "ds_idx" in current context.
(gdb) p *rrd
$3 = {stat_head = 0xb7cee000, ds_def = 0xb7cee070, rra_def = 0xb7cee160, live_head = 0xb7cee4c0, legacy_last_up = 0x0,
pdp_prep = 0xb7cee4c8, cdp_prep = 0xb7cee5a8, rra_ptr = 0xb7ceeaa8, rrd_value = 0x0}
(gdb)
$4 = {stat_head = 0xb7cee000, ds_def = 0xb7cee070, rra_def = 0xb7cee160, live_head = 0xb7cee4c0, legacy_last_up = 0x0,
pdp_prep = 0xb7cee4c8, cdp_prep = 0xb7cee5a8, rra_ptr = 0xb7ceeaa8, rrd_value = 0x0}
(gdb) p rra_idx
$5 = 0
(gdb) p rrd->rra_def[rrd_idx]
No symbol "rrd_idx" in current context.
(gdb) p rrd->rra_def[rrd_idx].cf_nam
No symbol "rrd_idx" in current context.
(gdb) p rrd->rra_def[rra_idx].pdp_cnt
$6 = 1
(gdb) p ds_idx
No symbol "ds_idx" in current context.
(gdb) p rrd->ds_def[ds_idx].ds_nam
No symbol "ds_idx" in current context.
(gdb) quit
The program is running. Exit anyway? (y or n)
More information about the rrd-developers
mailing list