Amanda-Users

Update/Resolved: chg-scsi reports buffer overflow during amcheck

2006-04-15 12:42:53
Subject: Update/Resolved: chg-scsi reports buffer overflow during amcheck
From: Fran Fabrizio <fran AT cis.uab DOT edu>
To: Fran Fabrizio <fran AT cis.uab DOT edu>
Date: Sat, 15 Apr 2006 11:40:25 -0500

In the meantime I went to see how hard it would be to get chg-zd-mtx up and running as the changer script instead, and thanks to the awesome commenting at the beginning of the script, it is completely painless. I should have done this sooner. Thanks Eric Doutreleau, Joe Rhett and Jason Holliden. :-)

So while the problem with chg-scsi is not resolved, my dependence on that issue is. :-)

Fran Fabrizio wrote:

I am migrating my Amanda server from RH9 to Fedora Core 5. Using the Amanda 2.4.5p1 RPMs available from the FC5 repository. Only thing I cannot get working under FC5 is chg-scsi. Here are my amcheck results...

bash-3.1$ amcheck -t CIS
Amanda Tape Server Host Check
-----------------------------
*** buffer overflow detected ***: /usr/lib/amanda/chg-scsi terminated
======= Backtrace: =========
/lib/libc.so.6(__chk_fail+0x41)[0xba1965]
/lib/libc.so.6(__vsprintf_chk+0x0)[0xba11e8]
/lib/libc.so.6(_IO_default_xsputn+0x9c)[0xb267e8]
/lib/libc.so.6(_IO_vfprintf+0xfb0)[0xb010a9]
/lib/libc.so.6(__vsprintf_chk+0xa1)[0xba1289]
/lib/libc.so.6(__sprintf_chk+0x30)[0xba11dc]
/usr/lib/amanda/chg-scsi[0x8057a4e]
/usr/lib/amanda/chg-scsi[0x804b81c]
/lib/libc.so.6(__libc_start_main+0xdc)[0xadb7e4]
/usr/lib/amanda/chg-scsi[0x80494a1]
======= Memory map: ========
00111000-0012d000 r-xp 00000000 fd:00 2228956 /usr/lib/libamanda-2.4.5p1.so 0012d000-0012e000 rwxp 0001b000 fd:00 2228956 /usr/lib/libamanda-2.4.5p1.so
0012e000-0012f000 rwxp 0012e000 00:00 0
0012f000-00138000 r-xp 00000000 fd:00 1797001    /lib/libnss_files-2.4.so
00138000-00139000 r-xp 00008000 fd:00 1797001    /lib/libnss_files-2.4.so
00139000-0013a000 rwxp 00009000 fd:00 1797001    /lib/libnss_files-2.4.so
0013a000-00145000 r-xp 00000000 fd:00 1796962 /lib/libgcc_s-4.1.0-20060304.so.1 00145000-00146000 rwxp 0000a000 fd:00 1796962 /lib/libgcc_s-4.1.0-20060304.so.1 001de000-001e8000 r-xp 00000000 fd:00 2230256 /usr/lib/libamtape-2.4.5p1.so 001e8000-001e9000 rwxp 00009000 fd:00 2230256 /usr/lib/libamtape-2.4.5p1.so
004c0000-004e3000 r-xp 00000000 fd:00 1796993    /lib/libm-2.4.so
004e3000-004e4000 r-xp 00022000 fd:00 1796993    /lib/libm-2.4.so
004e4000-004e5000 rwxp 00023000 fd:00 1796993    /lib/libm-2.4.so
008aa000-008bb000 r-xp 00000000 fd:00 1796995    /lib/libnsl-2.4.so
008bb000-008bc000 r-xp 00010000 fd:00 1796995    /lib/libnsl-2.4.so
008bc000-008bd000 rwxp 00011000 fd:00 1796995    /lib/libnsl-2.4.so
008bd000-008bf000 rwxp 008bd000 00:00 0
00a00000-00a01000 r-xp 00a00000 00:00 0          [vdso]
00ac6000-00bf2000 r-xp 00000000 fd:00 1796985    /lib/libc-2.4.so
00bf2000-00bf5000 r-xp 0012b000 fd:00 1796985    /lib/libc-2.4.so
00bf5000-00bf6000 rwxp 0012e000 fd:00 1796985    /lib/libc-2.4.so
00bf6000-00bf9000 rwxp 00bf6000 00:00 0
00c07000-00c0a000 r-xp 00000000 fd:00 1797034    /lib/libtermcap.so.2.0.8
00c0a000-00c0b000 rwxp 00002000 fd:00 1797034    /lib/libtermcap.so.2.0.8
00cbe000-00cd7000 r-xp 00000000 fd:00 1796978    /lib/ld-2.4.so
00cd7000-00cd8000 r-xp 00018000 fd:00 1796978    /lib/ld-2.4.so
00cd8000-00cd9000 rwxp 00019000 fd:00 1796978    /lib/ld-2.4.so
00ec8000-00ee3000 r-xp 00000000 fd:00 2234964 /usr/lib/libamserver-2.4.5p1.so 00ee3000-00ee4000 rwxp 0001b000 fd:00 2234964 /usr/lib/libamserver-2.4.5p1.so
00ee4000-00ee6000 rwxp 00ee4000 00:00 0
08048000-08063000 r-xp 00000000 fd:00 2647137    /usr/lib/amanda/chg-scsi
08063000-08070000 rw-p 0001a000 fd:00 2647137    /usr/lib/amanda/chg-scsi
0a035000-0a056000 rw-p 0a035000 00:00 0          [heap]
b7f2c000-b7f2e000 rw-p b7f2c000 00:00 0
b7f3a000-b7f3c000 rw-p b7f3a000 00:00 0
bf827000-bf83c000 rw-p bf827000 00:00 0          [stack]
amcheck-server: could not get changer info: <error> could not read result from "/usr/lib/amanda/chg-scsi" (got signal 6)

(brought to you by Amanda 2.4.5p1)
bash-3.1$

mtx can communicate with the changer just fine, so I may look to go over to chg-mtx but I would prefer to have it working as it was before with chg-scsi.
Attached is my chg-scsi.conf.  Any thoughts?
Thanks,
Fran

------------------------------------------------------------------------


number_configs  1
eject           1       # Tapedrives need an eject command
sleep           5       # Seconds to wait until the tape gets ready
cleanmax        10      # How many times could a cleaning tape get used
changerdev      /dev/sg0
#emubarcode     1
havebarcode     1
tapestatus      /var/log/amanda/CIS/tapestatus
labelfile       /etc/amanda/CIS/labelfile
scsitapedev     /dev/nst0

#
# Next comes the data for drive 0
#
config          0
drivenum        0
dev             /dev/nst0       # the device that is used for the tapedrive 0
startuse        0       # The slots associated with the drive 0
enduse 29 # statfile /etc/amanda/tape-slot # The file where the actual slot is stored
cleancart       32      # slot where the cleaning cart for drive 0 is located
cleanfile       /etc/amanda/tape-clean # The file where the cleanings are 
recorded
usagecount      /etc/amanda/backup/totaltime

# This is the end


--
Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/
205.934.0653


<Prev in Thread] Current Thread [Next in Thread>