Ask a Question related to PERL Modules, Design and Development.
-
Jussi Mononen #1
Crypt::RSA tests fail with a segfault
Hi,
I'm trying to compile Net::SFTP for HP-UX.11 and everything else is a
success but Crypt::RSA. All required modules compile without problems,
but RSA tests fail with a segmentation fault.
I am able to compile Net::SFTP without the support for RSA Public Key
Authentication but unfortunately I would need RSA pub key auth.
Here is a printout from the failing test '11-wrapper.t'
cpt2jmo_test@hp11dev1> perl -Mblib t/11-wrapper.t
1..12
..+(28)..................+............+.+(52)...+. ..........+..+......+..+.+.+...+.....+....+..+(71) ...........+..+....+......+(106).........+...+.... .....+...+........+.+.....+...+..........+........ ....+...+..............+..................+.....+. ..........+....+......+...+.+..+.........+........ ....+..........+(192)
.......+.+.+(22)..+.+(40)..+................+..... .........+..+.+.......+..+....+..........+(70).... ............+.........+.................+......... .+(90)............................+..+(122)....+.+ .........+..............+.....+.....+...+......... ....+...........+(192)
.......+.+(33).+..........+(56)..+(88)...........+ .+.....+..........+.....+......+.+.....+.......... ...+..+..+...+.....+..+.....+...........+.+....+.. ...+.....+(114)....+.........+..................+. ....+.+...+.......+...........+(168)............+. ...............+................+........+.....+.. ........+................+....+...+.........+..+.+ ............................+............+(192)
.....+.+.....+...+.....+(22).+.+........+(41)....+ .....+(65).+........+.+.+(108).................+(1 92)
...+(33)..+(60)...................+....+(83)...+.. .....+........+...............+.......+.......+..+ ......+.....+....+.............+.+...+.........+.. +.+(124)...+(148).+.....+.+.........+..+....+..+.. ..+..+....+.....................+(192)
..+..+......+(28)..+..+(49)............+(87)..+... +.......+..+.....+.+(113)...+..+.........+........ ...+........+...............+.+......+............ .+.....+..........+.....+..............+.......... ...........+..................+....+(192)
Segmentation fault
--
In addition the test process seems to reserve every bit of CPU time it
can according to 'top' and it will freeze the perl debugger if used.
I've managed to find out that the problem is in '$rsa->encrypt'
function call. With the debugger I can get really deep by
step-by-stepping into it without any success of finding out where the
problem might be. I had no problems with Crypt::RSA on Solaris.
Sometimes instead of sigfault I get bus error. Am I running out of
system resources?
---
my perl looks like this:
Summary of my perl5 (revision 5.0 version 8 subversion 0)
configuration:
Platform:
osname=hpux, osvers=11.00, archname=PA-RISC2.0-thread-multi
uname='hp-ux hp11dev2 b.11.00 u 9000800 601389372 unlimited-user
license '
config_args=''
hint=previous, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_POSIX_C_SOURCE=199506L -D_REENTRANT
-D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-g -O',
cppflags='-D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D_REENTRANT
-D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing
-I/usr/local/include -D_POSIX_C_SOURCE=199506L -D_REENTRANT
-D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_POSIX_C_SOURCE=199506L -D_REENTRANT -D_HPUX_SOURCE -mpa-risc-2-0
-DDEBUGGING -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccversion='', gccversion='3.1.1', gccosandvers='hpux11.00'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='/usr/bin/ld', ldflags =' -L/usr/local/lib'
libpth=/vobs/prod/tools/gnu/gcc/HP-UX.11/lib /usr/local/lib /lib
/usr/lib /usr/ccs/lib
libs=-lcl -lpthread -lnsl -lnm -lndbm -lgdbm -lmalloc -ldld -lm
-lc -lndir -lcrypt -lsec
perllibs=-lcl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir
-lcrypt -lsec
libc=/lib/libc.sl, so=sl, useshrplib=true, libperl=libperl.sl
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,+s
-Wl,-E -Wl,-B,deferred'
cccdlflags='-fPIC', lddlflags='-b -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Built under hpux
Compiled at Dec 16 2002 17:35:33
%ENV:
PERL5LIB="/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib:/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl:/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl/5.8.0/HP-UX.11"
@INC:
/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/5.8.0/PA-RISC2.0-thread-multi
/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/5.8.0
/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib
/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl/5.8.0/PA-RISC2.0-thread-multi
/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl/5.8.0
/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl
/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl/5.8.0/HP-UX.11
/vobs/prod/tools/perl/HP-UX.NG/lib/5.8.0/PA-RISC2.0-thread-multi
/vobs/prod/tools/perl/HP-UX.NG/lib/5.8.0
/vobs/prod/tools/perl/HP-UX.NG/lib/site_perl/5.8.0/PA-RISC2.0-thread-multi
/vobs/prod/tools/perl/HP-UX.NG/lib/site_perl/5.8.0
/vobs/prod/tools/perl/HP-UX.NG/lib/site_perl
and I am using:
HP-UX hp11dev1 B.11.00 U 9000/800 605389372 unlimited-user license
best regards,
/jUSSi
Jussi Mononen Guest
-
blessing (?) ends up in bus error in Crypt::Random tests on a 64-bit HP-UX.11.11
Hi, I've tried to compile Crypt::Random on 64-bit HP-UX.11.11 and the tests fail in 'pari_misfeature.t' test script. I don't have any random... -
Math::GMP tests and Crypt::Random fail on Compaq (Math::Pari related ??)
Hi, I've been compiling Math::GMP for different OS's in order to use Net::SFTP and I have successfully compiled and used it for Solaris,... -
Math::PARI tests fail on HP-UX.11 and Linux RH7.3
> Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote in message news: <bnjup4$29va$1@agate.berkeley.edu>... This is what I found from my... -
Mail::IMAPClient::BodyStructure tests fail
Hi. I'm using the module Mail::IMAPClient. It works nice but I'm having some problems installing it in another server. It has an optional module... -
Cript::Primes tests fail while trying to implement Crypt::RSA from CPAN
Anyone tried installing Crypt::RSA successfully onto linux recently from CPAN, Crypt::Primes seems to be my prob......... I'm having a lotta... -
Sebastien Masson #2
Re: Crypt::RSA tests fail with a segfault
Hi Jussi,
Got the same problem this morning, here the output of my gmake test:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-errorhandler....ok
t/01-i2osp...........ok
t/02-os2ip...........ok
t/03-random_octet....ok
t/04-octet_xor.......ok
t/05-primitives......ok
t/06-oaep............ok
t/07-pss.............ok
t/08-secretkey.......ok
t/09-publickey.......ok
t/10-keygen..........ok
t/11-wrapper.........dubious
Test returned status 0 (wstat 138, 0x8a)
test program seems to have generated a core
DIED. FAILED tests 1-12
Failed 12/12 tests, 0.00% okay
t/12-versioning......ok
t/13-es-pkcs1v15.....ok
t/14-ss-pkcs1v15.....ok
t/15-benchmark.......Useless use of a variable in void context at
t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
t/15-benchmark.......ok
Failed Test Stat Wstat Total Fail Failed List of Failed
---------------------------------------------------------------------------------------------------------------------------------------------
t/11-wrapper.t 0 138 12 24 200.00% 1-12
Failed 1/16 test scripts, 93.75% okay. 12/94 subtests failed, 87.23%
okay.
gmake: *** [test_dynamic] Error 2
My perl is compile using the HP C compiler. DO you find anything new
what may cause the problem. I already build this module before with
an old version of perl but try to compile a new perl bundle and got
that... This module has too many dependency maybe some of then cause
the problem (?! suspect Math::Pari which is a weird module).
Ciao
[email]jussi_mononen_ctl@yahoo.com[/email] (Jussi Mononen) wrote in message news:<4df5f522.0312180517.57a11219@posting.google. com>...> Hi,
>
> I'm trying to compile Net::SFTP for HP-UX.11 and everything else is a
> success but Crypt::RSA. All required modules compile without problems,
> but RSA tests fail with a segmentation fault.
>
> I am able to compile Net::SFTP without the support for RSA Public Key
> Authentication but unfortunately I would need RSA pub key auth.
>
> Here is a printout from the failing test '11-wrapper.t'
>
> cpt2jmo_test@hp11dev1> perl -Mblib t/11-wrapper.t
> 1..12
> .+(28)..................+............+.+(52)...+.. .........+..+......+..+.+.+...+.....+....+..+(71). ..........+..+....+......+(106).........+...+..... ....+...+........+.+.....+...+..........+......... ...+...+..............+..................+.....+.. .........+....+......+...+.+..+.........+......... ...+..........+(192)
> ......+.+.+(22)..+.+(40)..+................+...... ........+..+.+.......+..+....+..........+(70)..... ...........+.........+.................+.......... +(90)............................+..+(122)....+.+. ........+..............+.....+.....+...+.......... ...+...........+(192)
> ......+.+(33).+..........+(56)..+(88)...........+. +.....+..........+.....+......+.+.....+........... ..+..+..+...+.....+..+.....+...........+.+....+... ..+.....+(114)....+.........+..................+.. ...+.+...+.......+...........+(168)............+.. ..............+................+........+.....+... .......+................+....+...+.........+..+.+. ...........................+............+(192)
> ....+.+.....+...+.....+(22).+.+........+(41)....+. ....+(65).+........+.+.+(108).................+(19 2)
> ..+(33)..+(60)...................+....+(83)...+... ....+........+...............+.......+.......+..+. .....+.....+....+.............+.+...+.........+..+ .+(124)...+(148).+.....+.+.........+..+....+..+... .+..+....+.....................+(192)
> .+..+......+(28)..+..+(49)............+(87)..+...+ .......+..+.....+.+(113)...+..+.........+......... ..+........+...............+.+......+............. +.....+..........+.....+..............+........... ..........+..................+....+(192)
> Segmentation fault
>
> --
>
> In addition the test process seems to reserve every bit of CPU time it
> can according to 'top' and it will freeze the perl debugger if used.
> I've managed to find out that the problem is in '$rsa->encrypt'
> function call. With the debugger I can get really deep by
> step-by-stepping into it without any success of finding out where the
> problem might be. I had no problems with Crypt::RSA on Solaris.
>
> Sometimes instead of sigfault I get bus error. Am I running out of
> system resources?
>
> ---
>
> my perl looks like this:
>
> Summary of my perl5 (revision 5.0 version 8 subversion 0)
> configuration:
> Platform:
> osname=hpux, osvers=11.00, archname=PA-RISC2.0-thread-multi
> uname='hp-ux hp11dev2 b.11.00 u 9000800 601389372 unlimited-user
> license '
> config_args=''
> hint=previous, useposix=true, d_sigaction=define
> usethreads=define use5005threads=undef useithreads=define
> usemultiplicity=define
> useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
> use64bitint=undef use64bitall=undef uselongdouble=undef
> usemymalloc=n, bincompat5005=undef
> Compiler:
> cc='gcc', ccflags ='-D_POSIX_C_SOURCE=199506L -D_REENTRANT
> -D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
> optimize='-g -O',
> cppflags='-D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D_REENTRANT
> -D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing
> -I/usr/local/include -D_POSIX_C_SOURCE=199506L -D_REENTRANT
> -D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -D_POSIX_C_SOURCE=199506L -D_REENTRANT -D_HPUX_SOURCE -mpa-risc-2-0
> -DDEBUGGING -fno-strict-aliasing -I/usr/local/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
> ccversion='', gccversion='3.1.1', gccosandvers='hpux11.00'
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
> d_longlong=define, longlongsize=8, d_longdbl=define,
> longdblsize=16
> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> lseeksize=8
> alignbytes=8, prototype=define
> Linker and Libraries:
> ld='/usr/bin/ld', ldflags =' -L/usr/local/lib'
> libpth=/vobs/prod/tools/gnu/gcc/HP-UX.11/lib /usr/local/lib /lib
> /usr/lib /usr/ccs/lib
> libs=-lcl -lpthread -lnsl -lnm -lndbm -lgdbm -lmalloc -ldld -lm
> -lc -lndir -lcrypt -lsec
> perllibs=-lcl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir
> -lcrypt -lsec
> libc=/lib/libc.sl, so=sl, useshrplib=true, libperl=libperl.sl
> gnulibc_version=''
> Dynamic Linking:
> dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,+s
> -Wl,-E -Wl,-B,deferred'
> cccdlflags='-fPIC', lddlflags='-b -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
> Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS
> USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
> Built under hpux
> Compiled at Dec 16 2002 17:35:33
> %ENV:
> PERL5LIB="/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib:/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl:/vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl/5.8.0/HP-UX.11"
> @INC:
> /vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/5.8.0/PA-RISC2.0-thread-multi
> /vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/5.8.0
> /vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib
> /vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl/5.8.0/PA-RISC2.0-thread-multi
> /vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl/5.8.0
> /vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl
> /vobs/prod/AMD/ftpcopy/lib/HP-UX.11/lib/site_perl/5.8.0/HP-UX.11
> /vobs/prod/tools/perl/HP-UX.NG/lib/5.8.0/PA-RISC2.0-thread-multi
> /vobs/prod/tools/perl/HP-UX.NG/lib/5.8.0
> /vobs/prod/tools/perl/HP-UX.NG/lib/site_perl/5.8.0/PA-RISC2.0-thread-multi
> /vobs/prod/tools/perl/HP-UX.NG/lib/site_perl/5.8.0
> /vobs/prod/tools/perl/HP-UX.NG/lib/site_perl
>
>
> and I am using:
>
> HP-UX hp11dev1 B.11.00 U 9000/800 605389372 unlimited-user license
>
>
> best regards,
>
> /jUSSiSebastien Masson Guest
-
Jussi Mononen #3
Re: Crypt::RSA tests fail with a segfault
> [email]sabey2000@hotmail.com[/email] (Sebastien Masson) wrote in message news:<5360671d.
I've found something, though I haven't solved this yet. It seems that> [email]0401050734.2963cb5c@posting.google.com[/email]>...
>
> My perl is compile using the HP C compiler. DO you find anything new
> what may cause the problem. I already build this module before with
> an old version of perl but try to compile a new perl bundle and got
> that... This module has too many dependency maybe some of then cause
> the problem (?! suspect Math::Pari which is a weird module).
the process dies with segmentation fault when invoking
'$self->{pp}->armour()' -function in 'RSA.pm' line 109 (from
Convert::ASCII::Armour module)
If you change the armour flag to zero (eg. Armour => 0) in the
function call to '$rsa->encrypt' in '11-wrapper.t' -file the test will
go smoothly. But it still leaves us with the problem that cyphertext
can not be armoured...
best regards,
/jUSSi
Jussi Mononen Guest
-
Jussi Mononen #4
Re: Crypt::RSA tests fail with a segfault
> [email]jussi_mononen_ctl@yahoo.com[/email] (Jussi Mononen) wrote in message news:<4df5f522.
Still quoting myself ;-)> [email]0401072341.2df13e17@posting.google.com[/email]>...
>
> I've found something, though I haven't solved this yet. It seems that
> the process dies with segmentation fault when invoking
> '$self->{pp}->armour()' -function in 'RSA.pm' line 109 (from
> Convert::ASCII::Armour module)
>
> If you change the armour flag to zero (eg. Armour => 0) in the
> function call to '$rsa->encrypt' in '11-wrapper.t' -file the test will
> go smoothly. But it still leaves us with the problem that cyphertext
> can not be armoured...
with the help of perl debugger I made a surprising discovery. It seems
that the expression '$self->{pp}->armour()' evaluates into an
undefined value, thus causing a segmentation fault. You can not call
an undefined function can you? Perl debugger claims that '$self->{pp}'
is an empty hash...
br,
/jUSSi
Jussi Mononen Guest



Reply With Quote

