Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: amrecover segmentation fault

  1. #11
    Join Date
    Jun 2011
    Posts
    7

    Default

    Not exactly, because it produces this in the amidxtaped debug's file :
    Wed Jun 8 16:11:44 2011: amidxtaped: CTL << 1
    Wed Jun 8 16:11:44 2011: amidxtaped: CTL << 1
    Wed Jun 8 16:11:44 2011: amidxtaped: CTL << 1
    Wed Jun 8 16:11:44 2011: amidxtaped: CTL << 1

    I don't succeed to do it in one line. I tried :
    (my $chopped = $line) =~ s/^(.*)$/$1/g;
    or other things like that but I always got the segmentation fault.

    The only way that works for me is :
    $line =~ /^(.*)$/;
    my $chopped = $1;
    I obtain, the following in the debug's file:
    Wed Jun 8 16:27:10 2011: amidxtaped: CTL << FEATURES=ffffffff9efefbffffffffff01
    Wed Jun 8 16:27:10 2011: amidxtaped: CTL << CONFIG=vamos
    Wed Jun 8 16:27:10 2011: amidxtaped: CTL << LABEL=000001L5:2
    Wed Jun 8 16:27:10 2011: amidxtaped: CTL << FSF=2
    Wed Jun 8 16:27:10 2011: amidxtaped: CTL << HEADER

    Anyway, thanks a lot for your help.
    Greetings

  2. #12
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    1,016

    Default

    Thanks for your help in debugging.

    I will commit your recommanded fix:
    $line =~ /^(.*)$/;
    my $chopped = $1;

  3. #13
    Join Date
    Oct 2011
    Posts
    3

    Default

    I also got this segfault when running amrecover (amanda 3.3.0 on RHEL 5.7, perl 5.8.8). Thanks for this patch to getline -- it worked fine. However, there is another place where the same (or similar) code appears in getline_async. With the first $chopped fixed as above, amrecover works as long as I don't need to change tapes. However, when a new tape is requested, I get the dreaded segfault again. I made the same change to getline_async and now everything is working great.
    Last edited by MikeMc; October 24th, 2011 at 06:27 PM.

  4. #14

    Default

    Thank you _very_ much, @martineau ! (and @Hotelier, too). Applying your patch now I am able to extract with amrecover.
    I have installed amanda several months ago, and I was very disappointed when I could't extract from backups; however, I kept the backup procedure alive, in hope that sometime the bug will be fixed and I will be able to restore if it will be necessary but all this time I was worried about this issue.
    I've searched for a patch, found severals, but this one was the one that solved my issue, so
    I will give the resolution in my case, maybe will help someone else, too.

    I'm using amanda-3.3.2 installed from sources, on CentOS release 5.8 (Final) for x86_64 platform,
    perl v5.8.8 built for x86_64-linux-thread-multi.

    The backups are made from linux and windows hosts, some compressed (comp-gnutar-local, zwc-compress) some uncompressed (zwc-normal)
    Using AMRECOVER Version 3.3.2 when trying to extract something, I've got the error messages:


    amrecover - amidxtaped closed the connection
    amrecover - can't talk to tape server: (null)


    Looking in the debug file /tmp/amanda/server/amidxtaped.debug I've found:


    amidxtaped: critical (fatal): TypeError in method 'debug', argument 1 of type 'char *'

    So, beeing a perl agnostic, I've patched /usr/local/libexec/amanda/amidxtaped as you described:

    1. In function 'sub getline' at current line 911


    #
    # my $chopped = $line;
    # $chopped =~ s/[\r\n]*$//g;
    #

    $line =~ /^(.*)$/;
    my $chopped = $1;


    2. In function 'sub getline_async' at current line 959


    #
    # my $chopped = $buf;
    # $chopped =~ s/[\r\n]*$//g;
    #

    $buf =~ /^(.*)$/;
    my $chopped = $1;


    3. In function 'sub sendctlline' at current line 1004


    #
    # my $chopped = $msg;
    # $chopped =~ s/[\r\n]*$//g;
    #

    $msg =~ /^(.*)$/;
    my $chopped = $1;



    For convenience, the "amidxtaped" patched file can be found at [url]http://www.cazacus.ro/download/amidxtaped-MC[/url] (at first sight I didn't find a place on the forum to upload the file, and I hope this link is not forbidden by forum's policy), so one can download it, save the original and rename this one to amidxtaped.

    Again, thanks a lot for your help.
    Greetings.

  5. #15

    Default Confirmed that this works

    I wanted to confirm that I had this same issue on 3.3.3, installed from source, running Ubuntu 12.04, and this fix worked. Looks like the move to Perl 5.14 broke the script.



    Drew




    QUOTE=Mihai Cazac;15431]Thank you _very_ much, @martineau ! (and @Hotelier, too). Applying your patch now I am able to extract with amrecover.
    I have installed amanda several months ago, and I was very disappointed when I could't extract from backups; however, I kept the backup procedure alive, in hope that sometime the bug will be fixed and I will be able to restore if it will be necessary but all this time I was worried about this issue.
    I've searched for a patch, found severals, but this one was the one that solved my issue, so...
    ...Again, thanks a lot for your help.
    Greetings.[/QUOTE]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •