RE: amlabel segmentation fault

2014-01-10 Thread Kervin L. Pierre
Hi Jean-Louis,

Sorry for the delay.  I had to remove a binary install and get the source build 
back up again.

But it all works now with your patch.  Thanks!

Best regards,
Kervin



Web Services Design, Development and Maintenance
http://adevsoft.com/


-Original Message-
From: Jean-Louis Martineau [mailto:martin...@zmanda.com] 
Sent: Friday, January 10, 2014 8:35 AM
To: Kervin L. Pierre
Cc: amanda-users@amanda.org
Subject: Re: amlabel segmentation fault

Kervin,

Did you try the patch?

Jean-Louis

On 01/06/2014 09:13 AM, Jean-Louis Martineau wrote:
 Kervin,

 Looks like there is a bug if libcurl use GNUTLS.

 Can you try the attached patch?

 Jean-Louis

 On 01/05/2014 12:10 PM, Kervin L. Pierre wrote:
 Hi Jean-Louis,

 Thanks for the response.  Is there a way to rebuild with '-g' for 
 debugging support and to avoid stripping symbols? Would that help?

 Here is the gdb output...

 $ gdb --args perl /usr/local/sbin/amlabel --version GNU gdb (GDB) 
 7.6.1-ubuntu Copyright (C) 2013 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later 
 http://gnu.org/licenses/gpl.html
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type show 
 copying
 and show warranty for details.
 This GDB was configured as x86_64-linux-gnu.
 For bug reporting instructions, please see:
 http://www.gnu.org/software/gdb/bugs/...
 Reading symbols from /usr/bin/perl...(no debugging symbols 
 found)...done.
 (gdb) run
 Starting program: /usr/bin/perl /usr/local/sbin/amlabel --version 
 [Thread debugging using libthread_db enabled] Using host libthread_db 
 library /lib/x86_64-linux-gnu/libthread_db.so.1.

 Program received signal SIGSEGV, Segmentation fault.
 0x7489876d in ?? () from 
 /lib/x86_64-linux-gnu/libgcrypt.so.11
 (gdb) backtrace
 #0  0x7489876d in ?? () from
 /lib/x86_64-linux-gnu/libgcrypt.so.11
 #1  0x748925ae in ?? () from
 /lib/x86_64-linux-gnu/libgcrypt.so.11
 #2  0x7489004c in gcry_control () from
 /lib/x86_64-linux-gnu/libgcrypt.so.11
 #3  0x70c75259 in device_api_init () at device.c:64
 #4  0x70ebc1f2 in boot_Amanda__Device (my_perl=optimized
 out, cv=optimized out) at Amanda/Device.c:4676
 #5  0x77b10591 in Perl_pp_entersub () from
 /usr/lib/libperl.so.5.14
 #6  0x77b07d36 in Perl_runops_standard () from
 /usr/lib/libperl.so.5.14
 #7  0x77aa43c0 in Perl_call_sv () from 
 /usr/lib/libperl.so.5.14
 #8  0x77aa51cc in Perl_call_list () from
 /usr/lib/libperl.so.5.14
 #9  0x77a8faf1 in ?? () from /usr/lib/libperl.so.5.14
 #10 0x77a9b7b3 in Perl_newATTRSUB () from
 /usr/lib/libperl.so.5.14
 #11 0x77a9bfa2 in Perl_utilize () from 
 /usr/lib/libperl.so.5.14
 #12 0x77ac989e in Perl_yyparse () from 
 /usr/lib/libperl.so.5.14
 #13 0x77aa9b76 in perl_parse () from /usr/lib/libperl.so.5.14
 #14 0x00400dae in main ()
 (gdb) list
 1built-in: No such file or directory.

 Best regards,
 Kervin


 Web Services Design, Development and Maintenance http://adevsoft.com/


 -Original Message-
 From: Jean-Louis Martineau [mailto:martin...@zmanda.com]
 Sent: Sunday, January 5, 2014 9:19 AM
 To: Kervin L. Pierre
 Cc: amanda-users@amanda.org
 Subject: Re: amlabel segmentation fault

 Kevin,

 run amlabel under gdb:

 $  gdb perl
 (gdb) run /usr/local/sbin/amlabel --version
 (gdb) bt
 (gdb) list

 Jean-Louis

 On 01/04/2014 11:01 PM, Kervin L. Pierre wrote:
 Hi,

 This Segfault seems to occur occasionally and for different 
 reasons.  It's possible that amlabel do not handle unknown devices 
 gracefully.  But I'm still looking.  My tapedevice is S3.

 But I just built 3.3.5 on a Ubuntu desktop and now I get a segfault 
 whenever I run amlabel...

 $ perl -d /usr/local/sbin/amlabel --version

 Loading DB routines from perl5db.pl version 1.33 Editor support
 available.

 Enter h or `h h' for help, or `man perldebug' for more help.

 Signal SEGV at /usr/local/share/perl/5.14.2/Amanda/Device.pm line 12
 require Amanda/Device.pm called at /usr/local/sbin/amlabel line 29
 main::BEGIN() called at 
 /usr/local/share/perl/5.14.2/Amanda/Device.pm line 0
 eval {...} called at /usr/local/share/perl/5.14.2/Amanda/Device.pm
 line 0

 Device.pm looks like
 # This file was automatically generated by SWIG (http://www.swig.org).
 # Version 2.0.4
 #
 # Do not make changes to this file unless you know what you are
 doing--modify # the SWIG interface file instead.

 package Amanda::Device;
 use base qw(Exporter);
 use base qw(DynaLoader);
 require Amanda::Header;
 package Amanda::Devicec;
 bootstrap Amanda::Device;
 package Amanda::Device;
 @EXPORT = qw();

 With the bootstrap Amanda line being line 12.

 Should that line read package Amanda::Devicec;?

 Any idea what the issue could be?

 Best regards,
 Kervin

 Web Services Design, Development and Maintenance http://adevsoft.com/







amlabel segmentation fault

2014-01-04 Thread Kervin L. Pierre
Hi,

This Segfault seems to occur occasionally and for different reasons.  It's 
possible that amlabel do not handle unknown devices gracefully.  But I'm still 
looking.  My tapedevice is S3.

But I just built 3.3.5 on a Ubuntu desktop and now I get a segfault whenever I 
run amlabel...

$ perl -d /usr/local/sbin/amlabel --version

Loading DB routines from perl5db.pl version 1.33
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

Signal SEGV at /usr/local/share/perl/5.14.2/Amanda/Device.pm line 12
require Amanda/Device.pm called at /usr/local/sbin/amlabel line 29
main::BEGIN() called at /usr/local/share/perl/5.14.2/Amanda/Device.pm 
line 0
eval {...} called at /usr/local/share/perl/5.14.2/Amanda/Device.pm line 0

Device.pm looks like
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.4
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

package Amanda::Device;
use base qw(Exporter);
use base qw(DynaLoader);
require Amanda::Header;
package Amanda::Devicec;
bootstrap Amanda::Device;
package Amanda::Device;
@EXPORT = qw();

With the bootstrap Amanda line being line 12.

Should that line read package Amanda::Devicec;?

Any idea what the issue could be?

Best regards,
Kervin

Web Services Design, Development and Maintenance
http://adevsoft.com/




RE: aclocal fails since AMANDA_INIT_VERSION call in configure.in

2012-06-27 Thread Kervin L. Pierre
Hi Dan,

Thanks for looking into the issue.

I'm using a fully updated Amazon Linux installation and the Autoconf package 
that comes with it is 2.63.

Checking http://rpmfind.net/linux/rpm2html/search.php?query=autoconf It looks 
like most stable distributions haven't updated past 2.63 as yet either.

Is there any way to keep the minimum version = 2.63 ?  It would save a lot of 
platform maintainers from updating automake and autoconf from source before 
building Amanda.

Best regards,
Kervin


Adevsoft Inc
Business Software Development
http://adevsoft.com/


 -Original Message-
 From: owner-amanda-us...@amanda.org [mailto:owner-amanda-
 us...@amanda.org] On Behalf Of Dan Locks
 Sent: Wednesday, June 27, 2012 4:24 AM
 To: amanda-users@amanda.org
 Subject: Re: aclocal fails since AMANDA_INIT_VERSION call in
 configure.in
 
 I ran across this same error while updating amanda's packages.
 
 On 06/11/2012 09:16 AM, John Hein wrote:
  I see no reference to m4_divert_diversion in AMANDA_INIT_VERSION ...
 snip
  Ah... from the autoconf info pages...
 
  
.
.
  Unfortunately older versions of Automake (e.g., Automake 1.4) did
  not quote the names of these macros.  Therefore, when `m4' finds
  something like `AC_DEFUN(AM_TYPE_PTRDIFF_T, ...)' in `aclocal.m4',
  `AM_TYPE_PTRDIFF_T' is expanded, replaced with its Autoconf
 definition.
 
  Fortunately Autoconf catches pre-`AC_INIT' expansions, and
  complains, in its own words:
 
$ cat configure.ac
AC_INIT([Example], [1.0], [bug-exam...@example.org])
AM_TYPE_PTRDIFF_T
$ aclocal-1.4
$ autoconf
aclocal.m4:17: error: m4_defn: undefined macro:
 _m4_divert_diversion
aclocal.m4:17: the top level
autom4te: m4 failed with exit status: 1
$
 
  Modern versions of Automake no longer define most of these macros,
  and properly quote the names of the remaining macros.  If you must
 use
  an old Automake, do not depend upon macros from Automake as it is
  simply not its job to provide macros (but the one it requires itself):
.
.
  
 This gives a hint that I needed to...
 
  Investigate your automake installation.
 Specifically, it seems that with AMANDA_INIT_VERSION, we now require
 autoconf =2.64.  I actually tested 2.60, 2.61, 2.63, 2.64, and 2.68.
 The first 3 versions failed, the last two worked.
 
 I'll update configure.in to reflect the finding.  Hopefully we prevent
 some unnecessary pain for some other source builders.
 
 Dan Locks





RE: aclocal fails since AMANDA_INIT_VERSION call in configure.in

2012-06-11 Thread Kervin L. Pierre
Hello Jean-Louis,

The error is from autogen.  I believe the error is at least related to the new 
AMANDA_INIT_VERSION macro in configure.in.  If I remove that first line in 
configure.in the then the error goes away and Amanda builds.

# ./autogen 
See DEVELOPING for instructions on updating:
 * gettext macros
 * gnulib
 * libtool files
..creating file lists
..aclocal
configure.in:1: error: m4_defn: undefined macro: _m4_divert_diversion
configure.in:1: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: autom4te failed with exit status: 1
aclocal failed

# aclocal --version
aclocal (GNU automake) 1.11.1

Best regards,
Kervin


Adevsoft Inc
Business Software Development
http://adevsoft.com/


 -Original Message-
 From: Jean-Louis Martineau [mailto:martin...@zmanda.com]
 Sent: Monday, June 11, 2012 8:24 AM
 To: Kervin L. Pierre
 Cc: amanda-users@amanda.org
 Subject: Re: aclocal fails since AMANDA_INIT_VERSION call in
 configure.in
 
 On 06/09/2012 12:08 PM, Kervin L. Pierre wrote:
  I'm building on a stock Amazon Linux server with all available
 patches.
 
  But it seems that since the new AMANDA_INIT_VERSION macro call was
 added a few weeks ago to configure.in, I haven't been able to run
 autogen.sh without error.
 
  Removing the AMANDA_INIT_VERSION call before AC_INIT seems to be the
 only work around I've found.
 
  Best regards,
  Kervin
 
 
 Kevin,
 
 What error do you get?
 
 There is no autogen.sh in amanda, the program is autogen
 
 Jean-Louis





RE: what is the proper way to delete a particlur backup ( slot )

2012-05-01 Thread Kervin L. Pierre
Thanks a Jean,

amrmtape --erase --cleanup DailySet1 backup_data01

Did exactly what I needed.  Thanks!

Best regards,
Kervin

Adevsoft Inc
Business Software Development
http://adevsoft.com/


 -Original Message-
 From: Jean-Louis Martineau [mailto:martin...@zmanda.com]
 Sent: Tuesday, May 01, 2012 11:56 AM
 To: Kervin L. Pierre
 Cc: amanda-users@amanda.org
 Subject: Re: what is the proper way to delete a particlur backup
 ( slot )
 
 On 05/01/2012 11:41 AM, Kervin L. Pierre wrote:
  What is the proper way to delete a particular backup slot and free
 the space it's holding?
 amrmtape --erase
 
  I've tried 'amadmin DailySet1 delete ...' to remove 'slot1', but the
 files are still there in 'slot1'.
 
  Is it ok to 'rm -rf' in the slot folder?  Are these files referenced
 anywhere else?  I don't want to accidently corrupt the install.
 
 yes, but amanda might not know you removed them, you must also remove
 the label from the tapelist file.
 
  I was hoping there was a way to remove these files in a backup type
 independent way.  Eg.  I'd prefer not to have to log into AWS to delete
 S3 backups, etc.
 amrmtape --erase
 
 Jean-Louis
 





RE: amrecover fails with TypeError in method 'debug'...

2012-04-30 Thread Kervin L. Pierre
Hi Greg,

I did see your last thread, that did help thanks.

Building the Alpha from Trunk, then applying the patch from...
http://forums.zmanda.com/showthread.php?3691-amrecover-segmentation-fault
...fixed the 'extract' error for me.

I got a stacktrace using Carp::longmess() at the point where $line is tainted 
in amidxtaped.pl/readline() by checking with...
sub is_tainted { return ! eval { eval(# . substr(join(, @_), 0, 0)); 1 }; }

This is the stack when when the line is tainted...

[stacktrace]
Mon Apr 30 11:39:33 2012: thd-0x10765f0: amidxtaped: pid 1305 ruid 503 euid 503 
version 4.0.0alpha.svn.4682: start at Mon Apr 30 11:39:33 2012
Mon Apr 30 11:39:33 2012: thd-0x10765f0: amidxtaped: $line = '1'

Mon Apr 30 11:39:33 2012: thd-0x10765f0: amidxtaped:  at 
/usr/local/libexec/amanda/amidxtaped line 198
main::ClientService::read_command('main::ClientService=HASH(0xbf57c8)') 
called at /usr/local/libexec/amanda/amidxtaped line 186

main::ClientService::setup_streams('main::ClientService=HASH(0xbf57c8)') called 
at /usr/local/libexec/amanda/amidxtaped line 145
main::ClientService::run('main::ClientService=HASH(0xbf57c8)') called 
at /usr/local/libexec/amanda/amidxtaped line 1056
main::__ANON__() called at /usr/local/share/perl5/Amanda/MainLoop.pm 
line 819
Amanda::MainLoop::__ANON__('Amanda::MainLoop::Source=HASH(0x17e91b0)') 
called at /usr/local/share/perl5/Amanda/MainLoop.pm line 790
eval {...} called at /usr/local/share/perl5/Amanda/MainLoop.pm line 790
Amanda::MainLoop::run() called at /usr/local/libexec/amanda/amidxtaped 
line 1057
main::main() called at /usr/local/libexec/amanda/amidxtaped line 1063

Mon Apr 30 11:39:33 2012: thd-0x10765f0: amidxtaped: critical (fatal): 
TypeError in method 'debug', argument 1 of type 'char *'

amidxtaped: TypeError in method 'debug', argument 1 of type 'char *'
[/stacktrace]

Best regards,
Kervin

Adevsoft Inc
Business Software Development
http://adevsoft.com/

From: Greg Copeland [mailto:gtcopel...@gmail.com] 
Sent: Monday, April 30, 2012 12:03 AM
To: Kervin L. Pierre
Cc: amanda-users@amanda.org
Subject: Re: amrecover fails with TypeError in method 'debug'...

On Sun, 2012-04-29 at 18:20 +, Kervin L. Pierre wrote: 

Hi,


Look for an email from me in the archives, with subject, Re: Recovery Help 
Request [RESOLVED], from April 13th, 2012.

For good measure, you might also want to look in the archives for a message 
with subject, Re: amrecover failure [RESOLVED], on April 26th, 2012.

Both sets of emails, bugs, and fixes apply to 3.3.1 stable, which apparently 
isn't all that stable. I sincerely hope they'll push out a 3.3.2, with the 
patches applied for these known, show-stopper, bugs.

Best of luck.

Regards,




I'm following the simple recovery example from the wiki...
http://wiki.zmanda.com/index.php/GSWA/Recovering_Files

Worked though all the issues but now I'm at the 'extract' and I'm getting an 
error...

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

Further inspection of /var/log/messages gives...

amidxtaped[2784]: TypeError in method 'debug', argument 1 of type 'char *'
 
I've found someone had run into this issue before 'June 2011'...
http://archives.zmanda.com/amanda-archives/viewtopic.php?t=6929sid=f2141406dc79480edd30a1200443e9a6

They mentioned patching a Perl script but I haven't found the one they're 
referring to.

Does anyone have instructions on how to fix or workaround this issue?

I'm using 3.3.1 built from source on an update to date Amazon Linux install.

Best regards,
Kervin

Adevsoft Inc
Business Software Development
http://adevsoft.com/





-- 
Greg Copeland g...@copelandconsulting.net
Copeland Computer Consulting 




Device type s3 is not known

2012-04-30 Thread Kervin L. Pierre
After building from trunk to fix a few other issues, I started configuring 
Amazon S3 support.  

But amlabel reported...
Device type s3 is not known

Similar to this issue...
https://forums.zmanda.com/archive/index.php/t-2581.html

To fix this I did...

make distclean
yum install libcurl-devel perl-WWW-Curl
./configure --enable-s3-device
make

I believe part of the underlying issue is that the autoconf tests do not seem 
to warn about missing headers like libcurl, etc.

Best regards,
Kervin


Adevsoft Inc
Business Software Development
http://adevsoft.com/






amrecover fails with TypeError in method 'debug'...

2012-04-29 Thread Kervin L. Pierre
Hi,

I'm following the simple recovery example from the wiki...
http://wiki.zmanda.com/index.php/GSWA/Recovering_Files

Worked though all the issues but now I'm at the 'extract' and I'm getting an 
error...

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

Further inspection of /var/log/messages gives...

amidxtaped[2784]: TypeError in method 'debug', argument 1 of type 'char *'
 
I've found someone had run into this issue before 'June 2011'...
http://archives.zmanda.com/amanda-archives/viewtopic.php?t=6929sid=f2141406dc79480edd30a1200443e9a6

They mentioned patching a Perl script but I haven't found the one they're 
referring to.

Does anyone have instructions on how to fix or workaround this issue?

I'm using 3.3.1 built from source on an update to date Amazon Linux install.

Best regards,
Kervin

Adevsoft Inc
Business Software Development
http://adevsoft.com/