[rrd-developers] MRTG , Segmentation Fault , After re-installing perl .
Mr. James W. Laferriere
babydr at baby-dragons.com
Thu Mar 12 23:07:18 CET 2009
Hello Kevin ,
On Thu, 12 Mar 2009, kevin brintnall wrote:
> On Thu, Mar 12, 2009 at 10:43:16AM -0800, Mr. James W. Laferriere wrote:
>>
>> CFLAGS=-g ./configure ; CFLAGS=-g make ; CFLAGS=-g make install
>
>> The above shows that either I have not configured & made rrdtool with
>> debugging or there is no write_RRA_row() available . I suspect the
>> former .
>
> The call to write_RRA_row() is probably being optimized out. However, we
> may be able to get the info we need now that the symbols are available.
>
>> #3 0xb7d5f2ac in sprintf_alloc (fmt=0xb7d6b5c2 "[%lli]RRA[%s][%lu]DS[%s]") at rrd_info.c:34
>> #4 0xb7d64193 in write_to_rras (rrd=0xbfd57f94, rrd_file=0x89cd7d8, rra_step_cnt=<value optimized out>, rra_begin=2760,
>> current_time=1236882919, skip_update=0x89cd838, pcdp_summary=0xbfd57ff0) at rrd_update.c:1944
>
> Try this:
>
> (gdb) select 4
> (gdb) p *rrd
> (gdb) p rra_idx
> (gdb) p rrd->rra_def[rrd_idx]
> (gdb) p rrd->rra_def[rrd_idx].cf_nam
> (gdb) p rrd->rra_def[rra_idx].pdp_cnt
> (gdb) p ds_idx
> (gdb) p rrd->ds_def[ds_idx].ds_nam
>
> Also, I have a few other questions:
>
> - is it always the same RRD file that causes the crash?
No , All .cfg files caused SegFaults .
> - does that RRD cause the crash every time?
Yes , every time .
> - do you have any similar files (i.e. same RRA and DS definitions) that
> do not cause crash?
Not that I know of , as I said above any mrtg .cfg file causes a
Segfault .
Below is the output from above you requested .
Tnx , JimL
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 -1210005824 (LWP 7677)]
Error while reading shared library symbols:
Cannot find new threads: generic error
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210005824 (LWP 7677)]
0xb7e7b22b in strlen () from /lib/libc.so.6
(gdb) bt
#0 0xb7e7b22b in strlen () from /lib/libc.so.6
#1 0xb7e4d281 in vfprintf () from /lib/libc.so.6
#2 0xb7e6bd91 in vsnprintf () from /lib/libc.so.6
#3 0xb7d982ac in sprintf_alloc (fmt=0xb7da45c2 "[%lli]RRA[%s][%lu]DS[%s]") at rrd_info.c:34
#4 0xb7d9d193 in write_to_rras (rrd=0xbfa6fca4, rrd_file=0x8855f18, rra_step_cnt=<value optimized out>, rra_begin=2760,
current_time=1236895229, skip_update=0x89cdf08, pcdp_summary=0xbfa6fd00) at rrd_update.c:1944
#5 0xb7d9dd1f in process_arg (step_start=0x89c47b8 "1236895229", rrd=0xbfa6fca4, rrd_file=0x8855f18, rra_begin=81864,
current_time=0xbfa6fcd8, current_time_usec=0xbfa6fcd4, pdp_temp=0x897ad60, pdp_new=0x897ad78, rra_step_cnt=0x897b258,
updvals=0x88878f0, tmpl_idx=0x8888fc0, tmpl_cnt=3, pcdp_summary=0xbfa6fd00, version=3, skip_update=0x89cdf08,
schedule_smooth=0xbfa6fcd0) at rrd_update.c:819
#6 0xb7d9ee8a in _rrd_update (filename=0x89cdf70 "/var/www/htdocs/router2cgi/graphs/to-rtr01/to-rtr01_1.rrd", tmplt=0x0, argc=1,
argv=0x885f7c0, pcdp_summary=0x88795e0) at rrd_update.c:497
#7 0xb7d9f4a1 in rrd_update_v (argc=2, argv=0x885f7b8) at rrd_update.c:362
#8 0xb7dac0cf 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
$1 = {stat_head = 0xb7d61000, ds_def = 0xb7d61070, rra_def = 0xb7d61160, live_head = 0xb7d614c0, legacy_last_up = 0x0,
pdp_prep = 0xb7d614c8, cdp_prep = 0xb7d615a8, rra_ptr = 0xb7d61aa8, rrd_value = 0x0}
(gdb) p rra_idx
$2 = 0
(gdb) p rrd->rra_def[rrd_idx]
No symbol "rrd_idx" in current context.
(gdb) p rrd->rra_def[rrd_idx][1P[1 at a
$3 = {cf_nam = "AVERAGE", '\0' <repeats 12 times>, row_cnt = 599, pdp_cnt = 1, par = {{u_cnt = 0, u_val = 0.5}, {u_cnt = 0,
u_val = 0}, {u_cnt = 0, u_val = 0}, {u_cnt = 0, u_val = 0}, {u_cnt = 0, u_val = 0}, {u_cnt = 0, u_val = 0}, {u_cnt = 0,
u_val = 0}, {u_cnt = 0, u_val = 0}, {u_cnt = 0, u_val = 0}, {u_cnt = 0, u_val = 0}}}
(gdb) p rrd->rra_def[rra_idx].cf_nam
$4 = "AVERAGE", '\0' <repeats 12 times>
(gdb) p rrd->rra_def[rra_idx].cf_nam pdp_cnt
$5 = 1
(gdb) p ds_idx
No symbol "ds_idx" in current context.
(gdb) p ds_idxrrd->rra_def[rra_idx].pdp_cnt[1Pcf_nam[1P[1P[1 at d[1 at sra[1P[1P[1P[1 at d[1 at s
No symbol "ds_idx" in current context.
(gdb) p rrd->rra_def[ds_idx].ds_nam[1P[1P[1P[1 at d[1 at s
No symbol "ds_idx" in current context.
(gdb)
No symbol "ds_idx" in current context.
(gdb)
No symbol "ds_idx" in current context.
(gdb) quit
The program is running. Exit anyway? (y or n)
--
+------------------------------------------------------------------+
| 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