OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005112 [libssl1_0_0] block always 2013-10-03 13:48 2013-10-28 23:52
Reporter pfelecan View Status public  
Assigned To yann
Priority high Resolution fixed  
Status closed  
Summary 0005112: hardware capability (CA_SUNW_HW_1) unsupported: 0x1000 [ SSE2 ]
Description On a pristine system, the first and subsequent invocation of svn checkout gives:

-bash-3.2$ mgar init
Initializing the package build tree at /export/home/peter/opencsw
ld.so.1: svn: fatal: /opt/csw/lib/i386/libcrypto.so.1.0.0: hardware capability (CA_SUNW_HW_1) unsupported: 0x1000 [ SSE2 ]
ld.so.1: svn: fatal: relocation error: file /opt/csw/lib/svn/libsvn_ra_neon-1.so.0: symbol ne_accept_2xx: referenced symbol not found
ld.so.1: svn: fatal: relocation error: file /opt/csw/lib/svn/libsvn_ra-1.so.0: symbol svn_ra_neon__init: referenced symbol not found
ld.so.1: svn: fatal: relocation error: file /opt/csw/bin/svn: symbol svn_ra_version: referenced symbol not found
/opt/csw/bin/mgar: line 286: 9614 Killed svn co $GAR_REPO "$__buildtree/.buildsys"
Additional Information -bash-3.2$ uname -a
SunOS vfarm 5.10 Generic_147148-26 i86pc i386 i86pc

excerpt from prtconf -v:

    cpus, instance #0
        cpu (driver not attached)
            Hardware properties:
                name='l2-cache-size' type=int items=1
                    value=00080000
                name='l2-cache-line-size' type=int items=1
                    value=00000040
                name='l2-cache-lines-per-tag' type=int items=1
                    value=00000001
                name='l2-cache-associativity' type=int items=1
                    value=00000010
                name='l1-icache-size' type=int items=1
                    value=00010000
                name='l1-icache-line-size' type=int items=1
                    value=00000040
                name='l1-icache-lines-per-tag' type=int items=1
                    value=00000001
                name='l1-icache-associativity' type=int items=1
                    value=00000002
                name='l1-dcache-size' type=int items=1
                    value=00010000
                name='l1-dcache-line-size' type=int items=1
                    value=00000040
                name='l1-dcache-lines-per-tag' type=int items=1
                    value=00000001
                name='l1-dcache-associativity' type=int items=1
                    value=00000002
                name='itlb-4K-fully-associative?' type=int items=1
                    value=00000001
                name='itlb-4K-size' type=int items=1
                    value=00000010
                name='dtlb-4K-fully-associative?' type=int items=1
                    value=00000001
                name='dtlb-4K-size' type=int items=1
                    value=00000020
                name='itlb-2M-fully-associative?' type=int items=1
                    value=00000001
                name='itlb-2M-size' type=int items=1
                    value=00000008
                name='dtlb-2M-associativity' type=int items=1
                    value=00000004
                name='dtlb-2M-size' type=int items=1
                    value=00000008
                name='brand-string' type=string items=1
                    value='AMD Athlon(tm) XP 3000+'
                name='ext-cpuid-features-ecx' type=int items=1
                    value=00000000
                name='ext-cpuid-features' type=int items=1
                    value=c1c3fbff
                name='cpuid-features' type=int items=1
                    value=0383fbff
                name='generation' type=int items=1
                    value=00000007
                name='stepping-id' type=int items=1
                    value=00000000
                name='cpu-model' type=int items=1
                    value=0000000a
                name='family' type=int items=1
                    value=00000006
                name='vendor-id' type=string items=1
                    value='AuthenticAMD'
                name='cpu-mhz' type=int items=1
                    value=0000086e
                name='reg' type=int items=1
                    value=00000000
                name='device_type' type=string items=1
                    value='cpu'
Tags No tags attached.
Attached Files ? file icon openssl-truss-out [^] (23,262 bytes) 2013-10-07 10:08

- Relationships

-  Notes
(0010588)
pfelecan (developer)
2013-10-04 10:21

adding no-sse2 to pentium_pro_OS_COMPILER in the recipe solves the issue on the AMD XP 3200+ platform
(0010595)
yann (developer)
2013-10-05 20:37

Hi Peter,

Can you test the package available in my experimental repository ?
http://buildfarm.opencsw.org/opencsw/experimental/yann/i386/5.10/libssl1_0_0-1.0.1e,REV=2013.10.05-SunOS5.10-i386-UNCOMMITTED.pkg.gz [^]

I am not yet sure it will solve the problem, I re-enabled the i386 isa and disabled sse2 support for that one.
I think that the linker might pick the i386 isa instead of the pentium_pro one if it detects that it can't load the pentium_pro because of sse2, but I can't test this myself.

This is not the best solution (Dago's one is) but it very easy to do.

Thanks in advance for your feedback,

Yann
(0010596)
pfelecan (developer)
2013-10-06 10:48

Works in the same context. Note that my modification in the recipe worked already.
(0010597)
yann (developer)
2013-10-06 10:58
edited on: 2013-10-06 11:07

I know your solution works but I prefer to keep sse2 enabled for most people for performance and as this is the first complaint about I ever had (which means that the vast majority of users aren't using hardware without sse2 support).

BTW, another thing I discovered, you can change this at runtime.
Can you try this with the original package ?

env OPENSSL_ia32cap=~0x1000000 apps/openssl

More information here:
http://wiki.openssl.org/index.php/Manual:OPENSSL_ia32cap(3) [^]

(0010598)
yann (developer)
2013-10-06 11:03

Reminder sent to: dam

Hi Dago,

Concerning the sse2 problem with openssl.
Rather that using the auxiliary filtering system, I simply re-enabled the i386 ISA build and disabled sse2 for this one.

Even if the server is a pentium_pro, the linker will automatically fallback to the i386 isa if can't load the pentium_pro optimized library because of sse2.

This is not the ideal solution but works very well in practice and is easier than using auxiliary filters.

Do you see any cons with this method ?

Yann

(0010599)
yann (developer)
2013-10-06 11:04

Peter, to be sure of how the linker works, can you do a:

  truss -f /opt/csw/bin/openssl

and send me the output ?
(0010601)
pfelecan (developer)
2013-10-06 14:33

with which package?

wit the environment variable set?
(0010602)
yann (developer)
2013-10-06 18:45

With the package located here: http://buildfarm.opencsw.org/opencsw/experimental/yann/i386/5.10/libssl1_0_0-1.0.1e,REV=2013.10.05-SunOS5.10-i386-UNCOMMITTED.pkg.gz [^]

 do a "truss -f /opt/csw/bin/openssl" and send me the output


With the package currently in unstable:
 try "env OPENSSL_ia32cap=~0x1000000 /opt/csw/bin/openssl" and tell me what it does.
(I think it will not work as the hardware capabilities check is done before any openssl code is ran).
(0010603)
pfelecan (developer)
2013-10-07 10:07

For the first part, the output is in the attached file "openssl-truss-out"

For the second part the output is:

$ env OPENSSL_ia32cap=~0x1000000 /opt/csw/bin/openssl
ld.so.1: openssl: fatal: /opt/csw/lib/i386/libcrypto.so.1.0.0: hardware capability (CA_SUNW_HW_1) unsupported: 0x1000 [ SSE2 ]
ld.so.1: openssl: fatal: relocation error: file /opt/csw/bin/pentium_pro/openssl: symbol CRYPTO_dbg_get_options: referenced symbol not found
Killed
(0010605)
yann (developer)
2013-10-20 11:24

I uploaded a new set of openssl packages fixing this problem on 13th of october, so I am closing this bug.
(0010620)
yann (developer)
2013-10-28 23:52

Eventually I fixed the problem by removing the elf hardware capability flag as openssl is able to select non sse2 codepath at runtime.

I am closing this bug.


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker