[rrd-developers] MRTG , Segmentation Fault , After re-installing perl .

Mr. James W. Laferriere babydr at baby-dragons.com
Thu Feb 19 01:13:18 CET 2009


 	Hello Kevin ,

On Wed, 18 Feb 2009, kevin brintnall wrote:
> On Wed, Feb 18, 2009 at 10:16:58AM -0900, Mr. James W. Laferriere wrote:
>>> A back-trace would be very helpful.  Is the crashing program generating a
>>> core file?
>>
>>  	No core file found on file system .  system may be configured not to
>> allow creation of one ,  Not sure ,  checking ,  the system IS configure to NOT
>> allow a core file to be produced ,  I'll try seeing if this will create one ,
>> Fyi ,  It does not produce a core file .
>
> If it's dying on SIGSEGV, it should produce a CORE file.. Make sure that
> it's not chdir() to somewhere it cannot write.

 	I am not finding anyplace a chdir like request is made in the configs or 
in the mrtg script .  Tho when I ran the gdb (see below) it was as root .  And 
all previous attempts at running it were as root .  There should have been no 
difficulties in writing a file when run as root .  The /proc entitiy that needed 
changing was mofidied ,  hopefully correctly .

>>  	Can you help with getting 'gdb' to allow ...
>>
>> # gdb /usr/local/bin/perl /usr/local/mrtg-2/bin/mrtg-ORIG /var/www/htdocs/router2cgi/cfg/to-rtr01.cfg
>> Excess command line arguments ignored.
>> (/var/www/htdocs/router2cgi/cfg/to-rtr01.cfg)
>> GNU gdb 6.6
>> ...snip...
>
> This ought to work...
>
>  % gdb /usr/local/bin/perl
>  (gdb) set args /usr/local/mrtg-2/bin/mrtg-ORIG /var/www/ht... blahblah
>  (gdb) run
>
> After it catches SIGSEGV:
>
>  (gdb) bt

 	Thank you ,  that did it .  JimL

# gdb /usr/local/bin/perl
GNU 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 -1210280256 (LWP 20444)]
Error while reading shared library symbols:
Cannot find new threads: generic error

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210280256 (LWP 20444)]
0xb7e3822b in strlen () from /lib/libc.so.6
(gdb) bt
#0  0xb7e3822b in strlen () from /lib/libc.so.6
#1  0xb7e0a281 in vfprintf () from /lib/libc.so.6
#2  0xb7e28d91 in vsnprintf () from /lib/libc.so.6
#3  0xb7d552ac in sprintf_alloc (fmt=0xb7d615c2 "[%lli]RRA[%s][%lu]DS[%s]") at rrd_info.c:34
#4  0xb7d5a193 in write_to_rras (rrd=0xbffd7a24, rrd_file=0x89c2c88, rra_step_cnt=<value optimized out>, rra_begin=2760,
     current_time=1234999805, skip_update=0x89ce7c8, pcdp_summary=0xbffd7a80) at rrd_update.c:1944
#5  0xb7d5ad1f in process_arg (step_start=0x89ccfa0 "1234999805", rrd=0xbffd7a24, rrd_file=0x89c2c88, rra_begin=81864,
     current_time=0xbffd7a58, current_time_usec=0xbffd7a54, pdp_temp=0x81520c0, pdp_new=0x89ce7f0, rra_step_cnt=0x89ce6f0,
     updvals=0x87fcce0, tmpl_idx=0x88748d8, tmpl_cnt=3, pcdp_summary=0xbffd7a80, version=3, skip_update=0x89ce7c8,
     schedule_smooth=0xbffd7a50) at rrd_update.c:819
#6  0xb7d5be8a in _rrd_update (filename=0x89ce730 "/var/www/htdocs/router2cgi/graphs/to-rtr01/to-rtr01_1.rrd", tmplt=0x0, argc=1,
     argv=0x8873d80, pcdp_summary=0x887c9d0) at rrd_update.c:497
#7  0xb7d5c4a1 in rrd_update_v (argc=2, argv=0x8873d78) at rrd_update.c:362
#8  0xb7d690cf 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)


-- 
+------------------------------------------------------------------+
| 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 |
+------------------------------------------------------------------+



More information about the rrd-developers mailing list