PDA

View Full Version : amrmtape Segmentation Fault


steves
August 1st, 2006, 08:33 AM
I installed from Core 4 disks, 2.4.5. Everytime I try to remove the labels from a tape, I get this error:

/usr/sbin/amrmtape: line 146: 5954 Segmentation fault amadmin${SUF} ${Config} export >${TmpSrc}

Any ideas?

Thanks in advance.
Steve

ktill
August 1st, 2006, 12:07 PM
please give more information. Is the Amanda configuration working?
What was the complete amrmtape command used?

--Kevin Till
Zmanda

steves
August 1st, 2006, 01:33 PM
Yes the configuration seems to be working and I am reusing tapes until I am comfortable with setup.
I am using: amrmtape DailySet1 DailySet101
It seems to be working, at least partly because, I can relabel tapes after it's run.
Just crashes.
System info: 2.6.17-1.2142_FC4 #1 Tue Jul 11 22:41:14 EDT 2006 i686 athlon i386 GNU/Linux
HP C5713A autoloader

I'll be happy to provide other information if you need it. Thanks for your quick response.

Steve

ktill
August 2nd, 2006, 09:29 AM
run "sh -x amrmtape DailySet1 DailySet101" and supply the output.

If it's ok, list the content amanda.conf.

Thanks!

Kevin Till
Zmanda

steves
August 2nd, 2006, 12:06 PM
$ sh -x amrmtape DailySet1 DailySet104
+ prefix=/usr
+ exec_prefix=/usr
+ sbindir=/usr/sbin
+ libexecdir=/usr/lib/amanda
+ ConfigDir=/etc/amanda
+ PATH=/usr/sbin:/usr/lib/amanda:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb
+ export PATH
+ USE_VERSION_SUFFIXES=no
+ test no = yes
+ SUF=
++ basename amrmtape
+ Program=amrmtape
+ Verbose='log '
+ DoNothing=no
+ DebugMode=no
+ set dummy DailySet1 DailySet104
+ shift
+ case "$1" in
+ '[' 2 = 2 ']'
+ Config=DailySet1
+ Tape=DailySet104
+ break
+ CleanTapelist
+ '[' xyes = xno ']'
+ '[' '!' -d /etc/amanda/DailySet1 ']'
+ cd /etc/amanda/DailySet1
+ cd /etc/amanda/DailySet1
+ '[' '!' -r amanda.conf ']'
++ amgetconf dumpuser
+ dumpuser=amanda
++ whoami
+ runuser=amanda
+ '[' amanda '!=' amanda ']'
++ amgetconf tapelist
+ TapeList=tapelist
+ '[' '!' tapelist ']'
+ '[' '!' -r tapelist ']'
++ amgetconf infofile
+ InfoFile=/var/lib/amanda/DailySet1/curinfo
+ '[' '!' /var/lib/amanda/DailySet1/curinfo ']'
++ echo /var/lib/amanda/DailySet1/curinfo
++ sed -e 's%^[^/]*$%.%' -e 's%/[^/]*$%%'
+ VarDir=/var/lib/amanda/DailySet1
+ '[' '!' -d /var/lib/amanda/DailySet1 ']'
+ for dbext in '""'
+ '[' '!' -r /var/lib/amanda/DailySet1/curinfo ']'
+ '[' '!' -d /var/log/amanda ']'
+ NewTapelist=/var/log/amanda/tapelist
+ rm -f /var/log/amanda/tapelist
+ awk '$2 == "DailySet104" { next; } { print; }'
+ '[' xno = xno ']'
++ wc -l
+ lines=5
++ wc -l
+ linesafter=4
+ '[' 5 -gt 4 ']'
+ cp -p tapelist tapelist~
+ test 5 -gt 1
+ '[' -s /var/log/amanda/tapelist ']'
+ cp /var/log/amanda/tapelist tapelist
+ rm -f /var/log/amanda/tapelist
+ log 'amrmtape: remove label DailySet104.'
+ echo 'amrmtape: remove label DailySet104.'
amrmtape: remove label DailySet104.
+ return 0
+ return 0
+ CleanCurinfo
+ '[' xyes = xno ']'
+ cd /var/lib/amanda/DailySet1
+ cd /var/lib/amanda/DailySet1
++ echo /var/lib/amanda/DailySet1/curinfo
++ sed -e 's%.*/%%g'
+ InfoFileBase=curinfo
+ TmpSrc=curinfo.orig.758
+ TmpDest=curinfo.new.758
+ rm -f curinfo.orig.758 curinfo.new.758
+ amadmin DailySet1 export
/usr/sbin/amrmtape: line 146: 784 Segmentation fault amadmin${SUF} ${Config} export >${TmpSrc}
+ return 139
+ exit 139
*****************************************
#
# amanda.conf - Amanda configuration file.
#

org "DailySet1" # your organization name for reports
mailto "root@localhost" # space separated list of operators at your site
dumpuser "amanda" # the user to run dumps under

inparallel 4 # maximum dumpers that will run in parallel
netusage 600 Kbps # maximum net bandwidth for Amanda, in KB per sec

dumpcycle 7 days # the number of days in the normal dump cycle
runspercycle 5 days # the number of amdump runs in dumpcycle days
tapecycle 25 tapes
bumpsize 20 Mb # minimum savings (threshold) to bump level 1 -> 2
bumpdays 1 # minimum days at each level
bumpmult 4 # threshold = bumpsize * bumpmult^(level-1)
etimeout 300 # number of seconds per filesystem for estimates.
# # total number of seconds for estimates.
#
runtapes 5 # number of tapes to be used in a single run of amdump
tpchanger "chg-zd-mtx" # the tape-changer glue script
tapedev "/dev/nst0" # the no-rewind tape device to be used
changerfile "/var/lib/amanda/DailySet1/changer"
changerdev "/dev/sg1"

tapetype HP-C5713A # what kind of tape it is (see tapetypes below)
labelstr "^DailySet1[0-9][0-9]*$" # label constraint regex: all tapes must match

# Specify holding disks. These are used as a temporary staging area for

holdingdisk hd1 {
comment "main holding disk"
directory "/d2/space/amandahold" # where the holding disk is
use 50 Gb
}
# Create an amanda directory under there. You need a separate infofile and
# logdir for each configuration, so create subdirectories for each conf and
# put the files there. Specify the locations below.

infofile "/var/lib/amanda/DailySet1/curinfo" # database filename
logdir "/var/lib/amanda/DailySet1" # log directory
indexdir "/var/lib/amanda/DailySet1/index" # index directory
#tapelist "/var/lib/amanda/DailySet1/tapelist" # list of used tapes
#
# tapelist is stored, by default, in the directory that contains amanda.conf

define tapetype HP-C5713A {
comment "just produced by tapetype program"
length 17021 mbytes
filemark 403 kbytes
speed 1587 kps
}

# dumptypes
#
define dumptype global {
comment "Global definitions"
index yes
}

define dumptype always-full {
global
comment "Full dump of this filesystem always"
compress none
priority high
dumpcycle 0
}

define dumptype root-tar {
global
program "GNUTAR"
comment "root partitions dumped with tar"
compress none
index yes
exclude list "/usr/local/lib/amanda/exclude.gtar"
priority low
}

define dumptype user-tar {
root-tar
comment "user partitions dumped with tar"
priority medium
}

define dumptype high-tar {
root-tar
comment "partitions dumped with tar"
priority high
}

define dumptype comp-root-tar {
root-tar
comment "Root partitions with compression"
compress client fast
}

define dumptype comp-user-tar {
user-tar
compress client fast
}

define dumptype holding-disk {
global
comment "The master-host holding disk itself"
holdingdisk no # do not use the holding disk
priority medium
}

define dumptype comp-user {
global
comment "Non-root partitions on reasonably fast machines"
compress client fast
priority medium
}

define dumptype nocomp-user {
comp-user
comment "Non-root partitions on slow machines"
compress none
}

define dumptype comp-root {
global
comment "Root partitions with compression"
compress client fast
priority low
}

define dumptype nocomp-root {
comp-root
comment "Root partitions without compression"
compress none
}

define dumptype comp-high {
global
comment "very important partitions on fast machines"
compress client best
priority high
}

define dumptype nocomp-high {
comp-high
comment "very important partitions on slow machines"
compress none
}

define dumptype nocomp-test {
global
comment "test dump without compression, no /etc/dumpdates recording"
compress none
record no
priority medium
}

define dumptype comp-test {
nocomp-test
comment "test dump with compression, no /etc/dumpdates recording"
compress client fast
}

define dumptype comp-tar {
program "GNUTAR"
compress fast
index yes
record no # Important! avoid interfering with production runs
}

define dumptype nocomp-user-gnutar {
program "GNUTAR"
comment "user partitions dumped with tar and no compression"
options no-compress
priority medium
}

# network interfaces
#

define interface local {
comment "a local disk"
use 1000 kbps
}

define interface eth0 {
comment "10 Mbps ethernet"
use 400 kbps
}

# You may include other amanda configuration files, so you can share
# dumptypes, tapetypes and interface definitions among several
# configurations.

#includefile "/usr/local/amanda.conf.main"

paddy
August 2nd, 2006, 12:42 PM
Hi Steves,

Are you using 2.4.5p1? Is it possible to upgrade to 2.5.0p2? It is difficult
to debug the problem without knowing which source base you are using.

If you have gdb, can you get the stack trace from the core file? If there
is no core file, please set the following ulimits and re-run the amrmtape
command.

ulimit -c unlimited
ulimit -n unlimited
ulimit -u unlimited

Thanks,
Paddy

steves
August 2nd, 2006, 03:12 PM
Hi Paddy,

We tried setting ulimit, -c unlimited worked but the other two -n & -u did not. We also were not able to get core files enabled. I don't want to spend too much time on an older code base. It's probably best to upgrade.
So..we are working on an upgrade to 2.5.0p2. It's built and I'll be working on migrating the configuration again tomorrow. Thank you for your support.

Steve

steves
August 3rd, 2006, 11:14 AM
I have upgraded to 2.5.0p2 and the amrmtape problem has cleared.

I have a new configuration issue for the client on the tape server. I'll start a new thread for this. Thank you.

Steve