Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Amrecover 'Always' segfaults - how to debug this ?? Is it related toamanda-client ??

  1. #1

    Default Amrecover 'Always' segfaults - how to debug this ?? Is it related toamanda-client ??

    Hi.

    Its a bit disconcerting that my test seemed to work but now crashes when I try to recover

    Is it likely to be a config option ? Or is the tape / software possibly broken?

    Any help would be very welcomed.

    - is it config, compression related ?

    Everytime I go to 'extract' a file it segfaults - i.e :-

    ---------------------
    amrecover> sethost localhost
    200 Dump host set to localhost.
    amrecover> setdisk /data
    200 Disk set to /data.
    amrecover> ls
    2011-09-22-15-00-01 r1soft/
    2011-09-22-15-00-01 gdb.txt
    2011-09-22-15-00-01 backup/
    2011-09-22-15-00-01 .
    amrecover> add gdb.txt
    Added file /gdb.txt
    amrecover> extact
    Invalid command: extact
    amrecover> extract

    Extracting files using tape drive changer on host localhost.
    The following tapes are needed: BackupSet1-10 BackupSet1-1 BackupSet1-2 BackupSet1-3 BackupSet1-4

    Extracting files using tape drive changer on host localhost.
    Load tape BackupSet1-10 now
    Continue [?/Y/n/s/d]? y
    Segmentation fault
    ---------------------
    dmesg also shows

    amrecover[6385]: segfault at 0000000000000000 rip 000000000040a73f rsp 00007fffc79a0170 error 4
    I have (let me know if you need more info) in my amanda.conf file

    -------------
    tpchanger "chg-zd-mtx"
    tapedev "tape:/dev/nst0"
    changerfile "/etc/amanda/BackupSet1/changer.conf"
    device-property "LEOM" "TRUE"

    define tapetype HP-LTO4 {
    comment "Created by amtapetype; compression enabled"
    length 794402336 kbytes
    filemark 1415 kbytes
    speed 77404 kps
    blocksize 32 kbytes
    }
    ------------
    In my amanda.conf

    My /etc/amanda/amanda-client.conf reads

    --------------------
    conf "BackupSet1" # your config name

    index_server "localhost" # your amindexd server
    tape_server "localhost" # your amidxtaped server
    tapedev "tape:/dev/nst0"
    auth "local"
    ssh_keys "" # your ssh keys file if you use ssh auth

    --------------------
    Here is the amreport for the backup

    -----------------
    -sh-3.2$ amreport BackupSet1
    Hostname: backup.cwcs.co.uk
    Org : MyGroup
    Config : BackupSet1
    Date : September 22, 2011

    These dumps were to tapes BackupSet1-10, BackupSet1-1, BackupSet1-2, BackupSet1-3, BackupSet1-4.
    The next 5 tapes Amanda expects to use are: 5 new tapes.
    The next 5 new tapes already labelled are: BackupSet1-5, BackupSet1-6, BackupSet1-7, BackupSet1-8, BackupSet1-9
    STRANGE DUMP SUMMARY:
    localhost /data lev 0 STRANGE (see below)



    STATISTICS:
    Total Full Incr. Level:#
    -------- -------- -------- --------
    Estimate Time (hrs:min) 0:01
    Run Time (hrs:min) 23:20
    Dump Time (hrs:min) 23:18 23:18 0:00
    Output Size (meg) 3655034.4 3655034.4 0.0
    Original Size (meg) 3655034.4 3655034.4 0.0
    Avg Compressed Size (%) 100.0 100.0 --
    DLEs Dumped 1 1 0
    Avg Dump Rate (k/s) 44605.9 44605.9 --

    Tape Time (hrs:min) 23:18 23:18 0:00
    Tape Size (meg) 3655034.4 3655034.4 0.0
    Tape Used (%) 471.1 471.1 0.0
    DLEs Taped 1 1 0
    Parts Taped 5 5 0
    Avg Tp Write Rate (k/s) 44604.9 44604.9 --

    USAGE BY TAPE:
    Label Time Size % DLEs Parts
    BackupSet1-10 4:31 887898400K 111.8 1 1
    BackupSet1-1 4:35 855395744K 107.7 0 1
    BackupSet1-2 7:10 869286656K 109.4 0 1
    BackupSet1-3 5:14 869218784K 109.4 0 1
    BackupSet1-4 1:37 260955596K 32.8 0 1

    STRANGE DUMP DETAILS:
    /-- localhost /data lev 0 STRANGE
    sendbackup: start [localhost:/data level 0]
    sendbackup: info BACKUP=/bin/tar
    sendbackup: info RECOVER_CMD=/bin/tar -xpGf - ...
    sendbackup: info end
    ? /bin/tar: ./backup/81f311c3-9f8e-4111-a17f-582a21483cc3/metadata/log/log716.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./backup/8d29d2b7-a7fd-40b5-b406-f095b4014140/metadata/log/log659.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./backup/b91806cd-3d68-4a08-a025-cb617269414b/metadata/log/log322.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./backup/f4a423ec-dcf9-423a-b306-e16ec100f5fb/metadata/log/log52.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./r1soft/data/r1backup/log/log879.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./r1soft/data/r1backup/log/log880.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./r1soft/data/r1backup/log/log881.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./r1soft/data/r1backup/log/log882.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./r1soft/data/r1backup/log/log883.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./r1soft/data/r1backup/log/log884.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./r1soft/data/r1backup/log/log885.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./r1soft/data/r1backup/log/log886.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./r1soft/data/r1backup/log/log887.dat: Warning: Cannot stat: No such file or directory
    ? /bin/tar: ./r1soft/data/r1backup/log/log888.dat: Warning: Cannot stat: No such file or directory
    | Total bytes written: 3832581304320 (3.5TiB, 44MiB/s)
    sendbackup: size 3742755180
    sendbackup: end
    \--------

    NOTES:
    taper: Slot 10 with label BackupSet1-10 is usable
    taper: tape BackupSet1-10 kb 887898400 fm 1 [OK]
    taper: Slot 1 with label BackupSet1-1 is usable
    taper: tape BackupSet1-1 kb 855395744 fm 1 [OK]
    taper: Slot 2 with label BackupSet1-2 is usable
    taper: tape BackupSet1-2 kb 869286656 fm 1 [OK]
    taper: Slot 3 with label BackupSet1-3 is usable
    taper: tape BackupSet1-3 kb 869218784 fm 1 [OK]
    taper: Slot 4 with label BackupSet1-4 is usable
    taper: tape BackupSet1-4 kb 260955596 fm 1 [OK]


    DUMP SUMMARY:
    DUMPER STATS TAPER STATS
    HOSTNAME DISK L ORIG-KB OUT-KB COMP% MMM:SS KB/s MMM:SS KB/s
    -------------------------- -------------------------------------------- --------------
    localhost /data 0 3742755180 3742755180 -- 1398:27 44605.9 1398:2 44604.9

    (brought to you by Amanda version 3.3.0)
    -sh-3.2$

    -----------------
    Does anyone know how to debug this?
    Last edited by Morgan Cox; September 26th, 2011 at 02:25 AM.

  2. #2

    Unhappy Same problem

    I have the same "segmentation fault" message when I attempt to extract using amrecover.

    I have basic knowledge in linux. Is there any easy solution for this?

    I am using Amanda-3.3.0 on ubuntu 10.04.

    Thanks
    Sahar

  3. #3

    Default

    Hi

    I posted on the amanda-users mailing list

    A developer (or random person..) posted a patch - not tried yet..

    You can see the thread here

    [url]http://old.nabble.com/amanda-3.3---Amrecover-%27Always%27-segfaults---how-to-debug-this----Is-it-related-to-amanda-client.conf----to32539537.html[/url]

  4. #4

    Default

    Thanks for your reply. I couldn't find the patch you mentioned in that thread!
    Have you tried it yet?
    I also found another thread with the same problem in the forum (amrecover segmentation fault). Somebody suggested to use strace to run amrecover, and it worked:
    strace -ff -tt -o amrecover-strace9.txt amrecover MyConfig

    For now, I am using that to recover the backup and it works.
    I have also downgraded to 3.2.3 and it had the same problem

    Sahar

  5. #5
    Join Date
    Oct 2011
    Posts
    2

    Default Same here Ubuntu 10.10 and CentOS 5

    Segmentation error as a result of a amrecover. I installed binaries on Ubuntu and CentOS with the same result.

    Trying this as an evaluation of backup software. Anybody experience with these kind of problems? Would it help to build Amanda from the sources?

    Thanks for your time, Sponiza

    PS. I read all the positive stories about Amanda, but now I am getting concerned. A problem that is noted and no answer seems to be available... Or am I mistaken?

  6. #6
    Join Date
    Oct 2005
    Posts
    1,559

    Default

    Which version of Amanda are you using?

  7. #7
    Join Date
    Oct 2011
    Posts
    2

    Default Version 3.3.0

    Hi Paddy, version 3.3.0

    btw, the amdump runs correctly, including the 0 exit status
    Last edited by sponiza; October 3rd, 2011 at 11:03 AM.

  8. #8
    Join Date
    Oct 2011
    Posts
    3

    Default

    There is a thread in the 3.2.x section that has a fix for this problem. It's not exactly clear to me what's going on (I'm no perl expert) but two small patches to /usr/libexec/amanda/amidxtaped fix the segfaults for me. For Amanda 3.3.0, the patches are in the getline and getline_async subroutines at lines 887 and 912 respectively (see below).


    *** 884,890 ****
    last if $c eq "\n";
    }

    ! my $chopped = $line;
    $chopped =~ s/[\r\n]*$//g;
    debug("CTL << $chopped");

    --- 884,891 ----
    last if $c eq "\n";
    }

    ! $line =~ /^(.*)$/;
    ! my $chopped = $1;
    $chopped =~ s/[\r\n]*$//g;
    debug("CTL << $chopped");


    and



    *** 909,915 ****

    $buf .= $data;
    if ($buf =~ /\r\n$/) {
    ! my $chopped = $buf;
    $chopped =~ s/[\r\n]*$//g;
    debug("CTL << $chopped");

    --- 910,917 ----

    $buf .= $data;
    if ($buf =~ /\r\n$/) {
    ! $buf =~ /^(.*)$/;
    ! my $chopped = $1;
    $chopped =~ s/[\r\n]*$//g;
    debug("CTL << $chopped");

  9. #9

    Default quick note for newbies

    If you are like me you enter the lines exactly as presented. That doesn't work. Don't type the ! at the start of the lines. It took me a few minutes to figure that out.

  10. #10
    Join Date
    Oct 2011
    Posts
    3

    Default

    Right -- sorry for the confusion. What I posted was the output of "diff -c" which marks the changed lines with a bang (!). The first section is the original code, the second section is the new code.

Posting Permissions

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