PDA

View Full Version : amreport Segmentation Fault (Ver. 3.1.0)



andy
March 25th, 2011, 03:14 PM
Using Amanda 3.1.0 installed on an Ubuntu 10.10 system, I was debugging the following failure of amdump:

---------
localhost:/ 0 12373970k failed: killed while writing to tape (17:03:42), waiting for a new tape
---------

I ran "amreport elijah." It immediately fails with "Segmentation fault." I then ran amreport using the Perl debugger ("perl -d /usr/sbin/amreport elijah"):

---------
DB<1> c
Signal SEGV at /usr/sbin/amreport line 547
Aborted
---------

Finally, I set a breakpoint at line 546 and stepped into the failing code:

---------
$ perl -d /usr/sbin/amreport elijah

Loading DB routines from perl5db.pl version 1.32
Editor support available.
DB<1> c
Signal SEGV at /usr/sbin/amreport line 547
Aborted
Enter h or `h h' for help, or `man perldebug' for more help.

main::(/usr/sbin/amreport:57): my $opt_nomail = 0;
DB<1> b 540
Line 540 not breakable.
DB<2> b 546
DB<3> c
main::(/usr/sbin/amreport:546): my $diskfile = config_dir_relative(getconf($CNF_DISKFILE));
DB<3> p $CNF_DISKFILE
26
DB<4> p getconf($CNF_DISKFILE)
disklist
DB<5> n
main::(/usr/sbin/amreport:547): $cfgerr_level += Amanda::Disklist::read_disklist('filename' => $diskfile);
DB<5> p $diskfile
/etc/amanda/elijah/disklist
DB<6> s
Amanda::Disklist::read_disklist(/usr/lib/amanda/perl/Amanda/Disklist.pm:255):
255: my %params = @_;
DB<6> n
Amanda::Disklist::read_disklist(/usr/lib/amanda/perl/Amanda/Disklist.pm:257):
257: return read_disklist_internal(
258: ($params{filename} or config_dir_relative(getconf($CNF_DISKFILE))),
259: \%disks, ($params{disk_class} or "Amanda::Disklist::Disk"),
260: \%hosts, ($params{host_class} or "Amanda::Disklist::Host"),
261: \%interfaces, ($params{interface_class} or "Amanda::Disklist::Interface"),
262: );
DB<6>
Signal SEGV at /usr/sbin/amreport line 547
Aborted

$
---------

Clearly the disklist file is implicated but I found nothing unusual with it:

---------
$ cat /etc/amanda/elijah/disklist
localhost / spanning-gnutar-local
---------

The hex appearance seems fine also:

---------
$ od -cx /etc/amanda/elijah/disklist
0000000 l o c a l h o s t / s p a n
6f6c 6163 686c 736f 2074 202f 7073 6e61
0000020 n i n g - g n u t a r - l o c a
696e 676e 672d 756e 6174 2d72 6f6c 6163
0000040 l \n
0a6c
0000042

$
---------

So, the question is: Why is amreport failing?

andy
April 3rd, 2011, 04:26 AM
Since I've received no response on these two Amanda failures I will debug both the taper and amreport crashes further.

martineau
April 4th, 2011, 05:24 AM
We already fix a lot of bug in the 3.1 branch, can you try 3.1.3?

Can you try using gdb:
$gdb /usr/bin/perl
(gdb) run /usr/sbin/amreport elijah
...
(gdb)bt
(gdb)list
(gdb)quit

Post the complete output