Problem with OpenSSL on Solaris x86 *

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with OpenSSL on Solaris x86 *

Ted Mittelstaedt
Hi All,

  OpenSSL builds but fails tests.  Here's the particulars:

Freshly installed and patched Solaris 8 x86 system

# gcc -v
Reading specs from /usr/local/lib/gcc/i386-pc-solaris2.8/3.4.2/specs
Configured with:
../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disabl
e-nls --disable-libgcj --enable-languages=c,c+ : (reconfigured)
../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disabl
e-nls --disable-libgcj --enable-languages=c,c++
Thread model: posix
gcc version 3.4.2
#

# uname -a
SunOS mail 5.8 Generic_117351-26 i86pc i386 i86pc
# pwd
/usr/home/downloads/openssl-0.9.8
# date
Tue Oct  4 04:48:33 PDT 2005


/dev/urandom and /dev/random are installed by Solaris patch

# ./config
Operating system: i86pc-whatever-solaris2
Configuring for solaris-x86-gcc
Configuring for solaris-x86-gcc
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)
    no-krb5         [krb5-flavor not specified] OPENSSL_NO_KRB5
    no-mdc2         [default]  OPENSSL_NO_MDC2 (skip dir)
    no-rc5          [default]  OPENSSL_NO_RC5 (skip dir)
    no-shared       [default]
    no-sse2         [option]
    no-zlib         [default]
    no-zlib-dynamic [default]
IsMK1MF=0
CC            =gcc
CFLAG








=-DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -fomit-fra
me-pointer -march=pentium -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM -DOPEN
SSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
EX_LIBS       =-lsocket -lnsl -ldl
CPUID_OBJ     =x86cpuid-elf.o
BN_ASM        =bn86-elf.o co86-elf.o
DES_ENC       =dx86-elf.o yx86-elf.o
AES_ASM_OBJ   =ax86-elf.o
BF_ENC        =bx86-elf.o
CAST_ENC      =cx86-elf.o
RC4_ENC       =rx86-elf.o
RC5_ENC       =r586-elf.o
MD5_OBJ_ASM   =mx86-elf.o
SHA1_OBJ_ASM  =sx86-elf.o
RMD160_OBJ_ASM=rm86-elf.o
PROCESSOR     =
RANLIB        =/usr/ccs/bin/ranlib
ARFLAGS       =
PERL          =/usr/bin/perl
THIRTY_TWO_BIT mode
DES_PTR used
DES_RISC1 used
DES_UNROLL used
BN_LLONG mode
RC4_INDEX mode
RC4_CHUNK is undefined
e_os2.h => include/openssl/e_os2.h
making links in crypto...
crypto.h => ../include/openssl/crypto.h
.
.
.
kssl.h => ../include/openssl/kssl.h
ssltest.c => ../test/ssltest.c
making links in engines...
making links in apps...
making links in test...
making links in tools...
generating dummy tests (if needed)...

Configured for solaris-x86-gcc.
#

make
.
.
.
make -f ../Makefile.shared -e \
        APPNAME=openssl OBJECTS="openssl.o verify.o asn1pars.o req.o
dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o  ca.o pkcs7.o
crl2p7.o crl.o  rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o  x509.o
genrsa.o gendsa.o s_server.o s_client.o speed.o  s_time.o apps.o s_cb.o
s_socket.o app_rand.o version.o sess_id.o  ciphers.o nseq.o pkcs12.o
pkcs8.o spkac.o smime.o rand.o engine.o  ocsp.o prime.o" \
        LIBDEPS=" $LIBRARIES -lsocket -lnsl -ldl" \
        link_app.${shlib_target}
( :;
   LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto -lsocket -lnsl -ldl}";
LDCMD="${LDCMD:-gcc}";
LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLF
CN_H -O3 -fomit-frame-pointer -march=pentium -Wall -DL_ENDIAN -DOPENSSL_N
O_INLINE_ASM -DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160_AS
M -DAES_ASM}";  LIBPATH=`for x in $LIBDEPS; do if echo $x | grep '^ *-L'
> /dev/null 2>&1; then echo $x | sed -e 's/^ *-L//'; fi; done | uniq`;
LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`;
LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH  ${LDCMD} ${LDFLAGS} -o
${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o
dhparam.o enc.o passwd.o gendh.o errstr.o  ca.o pkcs7.o crl2p7.o crl.o
rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o  x509.o genrsa.o gendsa.o
s_server.o s_client.o speed.o  s_time.o apps.o s_cb.o s_socket.o
app_rand.o version.o sess_id.o  ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o
smime.o rand.o engine.o  ocsp.o prime.o ${LIBDEPS} )
(cd ..; \
  OPENSSL="`pwd`/util/opensslwrap.sh"; export OPENSSL; \
  /usr/bin/perl tools/c_rehash certs)
Doing certs
Segmentation Fault - core dumped
argena.pem => .0
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate argeng.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate eng1.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate eng2.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate eng3.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate eng4.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate eng5.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate RegTP-5R.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate RegTP-6R.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate thawteCb.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate thawteCp.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate wellsfgo.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate vsign1.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate vsign3.pem
Segmentation Fault - core dumped
WARNING: Skipping duplicate certificate vsignss.pem
making all in test...
gcc -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_
DLFCN_H -O3 -fomit-frame-pointer -march=pentium -Wall -DL_ENDIAN -DOPENSS
L_NO_INLINE_ASM -DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160
_ASM -DAES_ASM  -c  bntest.c
( :;
   LIBDEPS="${LIBDEPS:--L.. -lssl -L.. -lcrypto -lsocket -lnsl -ldl}";
LDCMD="${LDCMD:-gcc}";
LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLF
CN_H -O3 -fomit-frame-pointer -march=pentium -Wall -DL_ENDIAN -DOPENSSL_N
O_INLINE_ASM -DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160_AS
M -DAES_ASM}";  LIBPATH=`for x in $LIBDEPS; do if echo $x | grep '^ *-L'
> /dev/null 2>&1; then echo $x | sed -e 's/^ *-L//'; fi; done | uniq`;
LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`;
LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH  ${LDCMD} ${LDFLAGS} -o
${APPNAME:=bntest} bntest.o ${LIBDEPS} )
gcc -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_
DLFCN_H -O3 -fomit-frame-pointer -march=pentium -Wall -DL_ENDIAN -DOPENSS
L_NO_INLINE_ASM -DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160
_ASM -DAES_ASM  -c  ectest.c



make test issues the same errors then:

DEPS; do if echo $x | grep '^ *-L' > /dev/null 2>&1; then echo $x |
sed -e 's/^ *-L//'; fi; done | uniq`;  LIBPATH=`echo $LIBPATH | sed -e
's/ /:/g'`;  LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH  ${LDCMD}
${LDFLAGS} -o ${APPNAME:=dummytest} dummytest.o ${LIBDEPS} )
making all in tools...
../util/shlib_wrap.sh ./destest
*** Signal 11 - core dumped
make: Fatal error: Command failed for target `test_des'
Current working directory /usr/home/downloads/openssl-0.9.8/test
*** Error code 1
make: Fatal error: Command failed for target `tests'
#


OpenSSL version 0.9.7g builds and runs perfectly, and utilities compiled
to
use it (like SSH) also work perfectly.

Any suggestions?

Ted


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Problem with OpenSSL on Solaris x86 *

Geoff Thorpe
On October 4, 2005 08:00 am, Ted Mittelstaedt wrote:
>   OpenSSL builds but fails tests.  Here's the particulars:

[snip]

> (cd ..; \
>   OPENSSL="`pwd`/util/opensslwrap.sh"; export OPENSSL; \
>   /usr/bin/perl tools/c_rehash certs)
> Doing certs
> Segmentation Fault - core dumped
> argena.pem => .0
> Segmentation Fault - core dumped
> WARNING: Skipping duplicate certificate argeng.pem
> Segmentation Fault - core dumped
> WARNING: Skipping duplicate certificate eng1.pem
> Segmentation Fault - core dumped
> WARNING: Skipping duplicate certificate eng2.pem

[snip]

As you're getting core-dumps, it would be instructive to use those to get
a bracktrace. However I'd also mention that it would be more useful to
rerun this with more debugging compiled-in. Eg. edit Makefile to remove
the -O3 and add "-g -ggdb3" or something like that, than "make clean &&
make". Then if you still get the problem, the core-dump will provide a
more useful backtrace.

Cheers,
Geoff

--
Geoff Thorpe
[hidden email]
http://www.geoffthorpe.net/

Même ceux qui se sentent pas des nôtres, ne nous voyant plus à genoux,
seront, plus que jamais, chez eux chez nous.
  -- Loco Locass
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: Problem with OpenSSL on Solaris x86 *

Ted Mittelstaedt

Completed.

Core file is located ftp://sunrise.ipinc.net/openssl/core

It was created in ~/openssl-0.9.8/certs

Compilation options used were -g and -ggdb

I don't have gdb on this system, if anyone could take a look at this
I'd appreciate it.

Ted

>-----Original Message-----
>From: [hidden email]
>[mailto:[hidden email]]On Behalf Of Geoff Thorpe
>Sent: Tuesday, October 04, 2005 9:17 AM
>To: [hidden email]
>Subject: Re: Problem with OpenSSL on Solaris x86 *
>
>
>On October 4, 2005 08:00 am, Ted Mittelstaedt wrote:
>>   OpenSSL builds but fails tests.  Here's the particulars:
>
>[snip]
>
>> (cd ..; \
>>   OPENSSL="`pwd`/util/opensslwrap.sh"; export OPENSSL; \
>>   /usr/bin/perl tools/c_rehash certs)
>> Doing certs
>> Segmentation Fault - core dumped
>> argena.pem => .0
>> Segmentation Fault - core dumped
>> WARNING: Skipping duplicate certificate argeng.pem
>> Segmentation Fault - core dumped
>> WARNING: Skipping duplicate certificate eng1.pem
>> Segmentation Fault - core dumped
>> WARNING: Skipping duplicate certificate eng2.pem
>
>[snip]
>
>As you're getting core-dumps, it would be instructive to use
>those to get
>a bracktrace. However I'd also mention that it would be more useful to
>rerun this with more debugging compiled-in. Eg. edit Makefile to remove
>the -O3 and add "-g -ggdb3" or something like that, than "make clean &&
>make". Then if you still get the problem, the core-dump will provide a
>more useful backtrace.
>
>Cheers,
>Geoff
>
>--
>Geoff Thorpe
>[hidden email]
>http://www.geoffthorpe.net/
>
>Même ceux qui se sentent pas des nôtres, ne nous voyant plus à genoux,
>seront, plus que jamais, chez eux chez nous.
>  -- Loco Locass
>______________________________________________________________________
>OpenSSL Project                                 http://www.openssl.org
>User Support Mailing List                    [hidden email]
>Automated List Manager                           [hidden email]
>
>--
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date:
>9/30/2005
>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Problem with OpenSSL on Solaris x86 *

Victor Duchovni
On Tue, Oct 04, 2005 at 10:02:07AM -0700, Ted Mittelstaedt wrote:

>
> Completed.
>
> Core file is located ftp://sunrise.ipinc.net/openssl/core
>
> It was created in ~/openssl-0.9.8/certs
>
> Compilation options used were -g and -ggdb
>
> I don't have gdb on this system, if anyone could take a look at this
> I'd appreciate it.
>

It is easy to install gdb.

--
        Viktor.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: Problem with OpenSSL on Solaris x86 *

Ted Mittelstaedt


>-----Original Message-----
>From: [hidden email]
>[mailto:[hidden email]]On Behalf Of Victor Duchovni
>Sent: Tuesday, October 04, 2005 10:06 AM
>To: [hidden email]
>Subject: Re: Problem with OpenSSL on Solaris x86 *
>
>
>On Tue, Oct 04, 2005 at 10:02:07AM -0700, Ted Mittelstaedt wrote:
>
>>
>> Completed.
>>
>> Core file is located ftp://sunrise.ipinc.net/openssl/core
>>
>> It was created in ~/openssl-0.9.8/certs
>>
>> Compilation options used were -g and -ggdb
>>
>> I don't have gdb on this system, if anyone could take a look at this
>> I'd appreciate it.
>>
>
>It is easy to install gdb.
>

I probably should have added that even if I had it installed I have no
experience using it.

If you do, please take a look at the file.

Ted
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Problem with OpenSSL on Solaris x86 *

Andy Polyakov
In reply to this post by Ted Mittelstaedt
> Freshly installed and patched Solaris 8 x86 system
>
> # gcc -v
> Reading specs from /usr/local/lib/gcc/i386-pc-solaris2.8/3.4.2/specs
> Configured with:
> ...
> Doing certs
> Segmentation Fault - core dumped
> argena.pem => .0
> Segmentation Fault - core dumped
>
> Any suggestions?

./PROBLEMS, "triggered gcc bugs." A.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]