Hello,
I have the following problem on a few Solaris systems in my lab: OpenSSL 0.9.8x 
crashes and OpenSSL 1.0.1c gets stuck (or also crashes in a few cases) in 
SSL_load_error_strings()  function. My code realization is presented below. I 
am not sure that is a code implementation issue, as problem happens only a few 
Solaris systems in my lab, on all other Solaris nodes - everything is OK (SSL 
initializes and works properly).
1) System:
root@solaris_host {7} uname -a
SunOS solaris_host 5.10 Generic_147440-17 sun4v sparc 
SUNW,SPARC-Enterprise-T5120
2) OpenSSL versions:
OpenSSL 0.9.8x - ssl crashes in SSL_load_error_strings()
OpenSSL 1.0.1c - get stuck (or crashes) in SSL_load_error_strings()
3) Call stack (openssl was statically linked with libmmdpsvc.so and 
libperifw.so libraries):
Note that also openssl was dynamically linked with libmmdpsvc.so and 
libperifw.so libraries and crash also happened
a) Crash#1
root@solaris_host {22} adb core.25
...
SIGSEGV: Segmentation Fault
$c
libperifw.so.1`getrn+0xc4(72d58, ff232d70, 46, 20000c6, cc820, feedebb4)
libperifw.so.1`lh_insert+0x4c(d200, ff232d70, 72d58, 69, d2, fef96b80)
libperifw.so.1`int_err_set_item+0x6c(ff232d70, fefa7478, fefa59f8, fef96b80, 
ee78, ec00)
libperifw.so.1`ERR_load_strings+0x80(2, ee78, ec00, fef96b80, 1, ff232d70)
libmmdpsvc.so`ERR_load_crypto_strings+4(ff0f6ee0, 0, fef96b80, 59cc, 5800, 0)
libmmdpsvc.so`SSL_load_error_strings+4(1, 8001, fef7c9f0, c9138, fefabf00, 
fef96b80)
libmmdpsvc.so`__1cRConnectionManagerRSSLInitialization6M_nMt_MMDPStatus__+0x88(59028,
 ff1d4434, 2bae8, 9, 567c0, 0)
libmmdpsvc.so`__1cRConnectionManagerWHandleSSLOptionsChange6MpnTConfigItemChangeMsg_h_nMt_MMDPStatus__+0x500(59028,
 6ce18, 3, 0, 80808080, 1010101)
libmmdpsvc.so`__1cbBReplicatorConnectionManagerbAProcessConfigItemChangeMsg6MpnTConfigItemChangeMsg__nMt_MMDPStatus__+0x3f0(59028,
 6ce18, 8, 2, 2, 567c0)
libmmdpsvc.so`__1cRConnectionManagerRHandleMMDPCommMsg6MpnSMMDPInterThreadMsg__v_+0x1fc(59028,
 6ce18, ff000000, 15d74, fe96cd10, 568f8)
libmmdpcommon.so`__1cOMMDPCommThreadWInternalMsgHandlerLoop6Mp0_v_+0xd8(59028, 
59028, 0, fe89b370, 1, fe895a60)
libmmdpcommon.so`__1cOMMDPCommThreadPThreadEntryProc6Fpv_v_+0x60(59028, 0, 
fe897940, 0, fe4b5200, 1)
libperifw.so.1`pfw_posix_wrapper+0x14(55d48, fda6c000, 0, 0, ff312d38, 59028)
libc.so.1`_lwp_start(0, 0, 0, 0, 0, 0)

b) Crash#2
root@solaris_host {23} adb core.24
...
SIGSEGV: Segmentation Fault
$c
libc.so.1`_malloc_unlocked+0x164(600, 0, 6dff0, fe812ab8, 11, fe8923ec)
libc.so.1`_smalloc+0x4c(10, 0, ea7dc, fe7a7e2c, fffffffc, fe89b2e0)
libc.so.1`malloc+0x4c(c, 1, ea728, fe7a7d14, fe8923ec, fe89c5e0)
libperifw.so.1`CRYPTO_malloc+0x78(fef7e180, fef7e180, c1, c, fef9c544, feedebb4)
libperifw.so.1`lh_insert+0x74(4a00, ff22ea6c, 87500, 877fc, 4a, fef96b80)
libperifw.so.1`int_err_set_item+0x6c(ff22ea6c, fefa7478, fefa59f8, fef96b80, 
ee78, ec00)
libperifw.so.1`ERR_load_strings+0x80(2, ee78, ec00, fef96b80, 1000, ff22ea6c)
libmmdpsvc.so`ERR_load_ERR_strings+0x64(1aafc, ff0cf8ac, ff213e60, ff22ea3c, 
1abdc, 1a800)
libmmdpsvc.so`ERR_load_crypto_strings+4(ff0f6ee0, 0, fef96b80, 59cc, 5800, 0)
libmmdpsvc.so`SSL_load_error_strings+4(1, 8001, fef7c9f0, 87060, fefabf00, 
fef96b80)
libmmdpsvc.so`__1cRConnectionManagerRSSLInitialization6M_nMt_MMDPStatus__+0x88(581b8,
 ff1d4434, 589c0, 9, 56718, 0)
libmmdpsvc.so`__1cRConnectionManagerWHandleSSLOptionsChange6MpnTConfigItemChangeMsg_h_nMt_MMDPStatus__+0x500(581b8,
 608f8, 3, 0, 80808080, 1010101)
libmmdpsvc.so`__1cbBReplicatorConnectionManagerbAProcessConfigItemChangeMsg6MpnTConfigItemChangeMsg__nMt_MMDPStatus__+0x3f0(581b8,
 608f8, 8, 2, 2, 56718)
libmmdpsvc.so`__1cRConnectionManagerRHandleMMDPCommMsg6MpnSMMDPInterThreadMsg__v_+0x1fc(581b8,
 608f8, ff000000, 15d74, fe96cd10, 568c8)
libmmdpcommon.so`__1cOMMDPCommThreadWInternalMsgHandlerLoop6Mp0_v_+0xd8(581b8, 
581b8, 0, fe89b370, 0, fe895a60)
libmmdpcommon.so`__1cOMMDPCommThreadPThreadEntryProc6Fpv_v_+0x60(581b8, 0, 
fe897940, 0, fe4b5200, 1)
libperifw.so.1`pfw_posix_wrapper+0x14(55c78, fda6c000, 0, 0, ff312d38, 581b8)
libc.so.1`_lwp_start(0, 0, 0, 0, 0, 0)

c) Crash#3
root@solaris_host {24} adb core.23
...
SIGSEGV: Segmentation Fault
$c
libc.so.1`t_splay+0xf4(d1d70, 200, d0f98, fe8139b0, fe8923ec, d13d0)
libc.so.1`realloc+0x158(d1b68, 400, d1b70, 59ac, cfdc0, d1d70)
libperifw.so.1`CRYPTO_realloc+0x13c(d1b70, 400, fef7e180, 13f, 0, fef9c548)
libperifw.so.1`expand+0x50(cfa80, d1b70, 7f, 110, cebfc, ba570)
libperifw.so.1`lh_insert+0x3c(18000, ff230eb0, cfa80, c0, 180, fef96b80)
libperifw.so.1`int_err_set_item+0x6c(ff230eb0, fefa7478, fefa59f8, fef96b80, 
ee78, ec00)
libperifw.so.1`ERR_load_strings+0x44(0, ee78, ec00, fef96b80, 408c000, ff230eb0)
libmmdpsvc.so`ERR_load_RSA_strings+0x34(2, ee78, ff230d90, ff213e60, 1cf30, 
1cc00)
libmmdpsvc.so`ERR_load_crypto_strings+0x14(ff0f6ee0, 0, fef96b80, 59cc, 5800, 0)
libmmdpsvc.so`SSL_load_error_strings+4(1, 8001, fef7c9f0, 9f000, fefabf00, 
fef96b80)
libmmdpsvc.so`__1cRConnectionManagerRSSLInitialization6M_nMt_MMDPStatus__+0x88(56c20,
 ff1d4434, 58958, 5, 56508, 0)
libmmdpsvc.so`__1cRConnectionManagerWHandleSSLOptionsChange6MpnTConfigItemChangeMsg_h_nMt_MMDPStatus__+0x500(56c20,
 82e10, 3, 66530, 80808080, 1010101)
libmmdpsvc.so`__1cVMMDPConnectionManagerbAProcessConfigItemChangeMsg6MpnTConfigItemChangeMsg__nMt_MMDPStatus__+0x588(56c20,
 82e10, 8, 2, 2, 56508)
libmmdpsvc.so`__1cRConnectionManagerRHandleMMDPCommMsg6MpnSMMDPInterThreadMsg__v_+0x1fc(56c20,
 82e10, ff000000, 15d74, fe96cd10, 56580)
libmmdpcommon.so`__1cOMMDPCommThreadWInternalMsgHandlerLoop6Mp0_v_+0xd8(56c20, 
56c20, 0, fe89b370, 1, fe895a60)
libmmdpcommon.so`__1cOMMDPCommThreadPThreadEntryProc6Fpv_v_+0x60(56c20, 0, 
fe897940, 0, fe4b3200, 1)
libperifw.so.1`pfw_posix_wrapper+0x14(55c48, fde6c000, 0, 0, ff312d38, 56c20)
libc.so.1`_lwp_start(0, 0, 0, 0, 0, 0)

4) Source code (sorry, but it is simplified code. I cannot provide you the 
source code, as it is proprietary software:( of our company):
#include <iostream>
#include <openssl/ssl.h>

using namespace std;

class B;
class C;

class A {
public:
void SSLInitialization();
};

class B: public A {
public:
       B();
};


class C: public A {
public:
       C();
};

B::B() {
       SSLInitialization();
}

C::C() {
       SSLInitialization();
}

void A::SSLInitialization() {
if (SSL_library_init()!=1) {
        cout << "Error initializing SSL Libraries" << endl;

}

 OpenSSL_add_all_algorithms();
SSL_load_error_strings();
 /*
Some logic...
*/
}

int main() {
  B    *b = new B();
  C    *c = new C();
  return 0;
}

Please investigate this issue and create a ticket (if it possible). I can 
provide you additional information from my side, if it's needed.
Thank you,
Russia, N.Novgorod,
--Mikhail

Hello,

I have the following problem on a few Solaris systems in my lab: OpenSSL 0.9.8x crashes and OpenSSL 1.0.1c gets stuck (or also crashes in a few cases) in SSL_load_error_strings()  function. My code realization is presented below. I am not sure that is a code implementation issue, as problem happens only a few Solaris systems in my lab, on all other Solaris nodes – everything is OK (SSL initializes and works properly).

1) System:

root@solaris_host {7} uname -a

SunOS solaris_host 5.10 Generic_147440-17 sun4v sparc SUNW,SPARC-Enterprise-T5120

2) OpenSSL versions:

OpenSSL 0.9.8x - ssl crashes in SSL_load_error_strings() 

OpenSSL 1.0.1c - get stuck (or crashes) in SSL_load_error_strings() 

3) Call stack (openssl was statically linked with libmmdpsvc.so and libperifw.so libraries):

Note that also openssl was dynamically linked with libmmdpsvc.so and libperifw.so libraries and crash also happened

a) Crash#1

root@solaris_host {22} adb core.25

SIGSEGV: Segmentation Fault

$c

libperifw.so.1`getrn+0xc4(72d58, ff232d70, 46, 20000c6, cc820, feedebb4)

libperifw.so.1`lh_insert+0x4c(d200, ff232d70, 72d58, 69, d2, fef96b80)

libperifw.so.1`int_err_set_item+0x6c(ff232d70, fefa7478, fefa59f8, fef96b80, ee78, ec00)

libperifw.so.1`ERR_load_strings+0x80(2, ee78, ec00, fef96b80, 1, ff232d70)

libmmdpsvc.so`ERR_load_crypto_strings+4(ff0f6ee0, 0, fef96b80, 59cc, 5800, 0)

libmmdpsvc.so`SSL_load_error_strings+4(1, 8001, fef7c9f0, c9138, fefabf00, fef96b80)

libmmdpsvc.so`__1cRConnectionManagerRSSLInitialization6M_nMt_MMDPStatus__+0x88(59028, ff1d4434, 2bae8, 9, 567c0, 0)

libmmdpsvc.so`__1cRConnectionManagerWHandleSSLOptionsChange6MpnTConfigItemChangeMsg_h_nMt_MMDPStatus__+0x500(59028, 6ce18, 3, 0, 80808080, 1010101)

libmmdpsvc.so`__1cbBReplicatorConnectionManagerbAProcessConfigItemChangeMsg6MpnTConfigItemChangeMsg__nMt_MMDPStatus__+0x3f0(59028, 6ce18, 8, 2, 2, 567c0)

libmmdpsvc.so`__1cRConnectionManagerRHandleMMDPCommMsg6MpnSMMDPInterThreadMsg__v_+0x1fc(59028, 6ce18, ff000000, 15d74, fe96cd10, 568f8)

libmmdpcommon.so`__1cOMMDPCommThreadWInternalMsgHandlerLoop6Mp0_v_+0xd8(59028, 59028, 0, fe89b370, 1, fe895a60)

libmmdpcommon.so`__1cOMMDPCommThreadPThreadEntryProc6Fpv_v_+0x60(59028, 0, fe897940, 0, fe4b5200, 1)

libperifw.so.1`pfw_posix_wrapper+0x14(55d48, fda6c000, 0, 0, ff312d38, 59028)

libc.so.1`_lwp_start(0, 0, 0, 0, 0, 0)

 

b) Crash#2

root@solaris_host {23} adb core.24

SIGSEGV: Segmentation Fault

$c

libc.so.1`_malloc_unlocked+0x164(600, 0, 6dff0, fe812ab8, 11, fe8923ec)

libc.so.1`_smalloc+0x4c(10, 0, ea7dc, fe7a7e2c, fffffffc, fe89b2e0)

libc.so.1`malloc+0x4c(c, 1, ea728, fe7a7d14, fe8923ec, fe89c5e0)

libperifw.so.1`CRYPTO_malloc+0x78(fef7e180, fef7e180, c1, c, fef9c544, feedebb4)

libperifw.so.1`lh_insert+0x74(4a00, ff22ea6c, 87500, 877fc, 4a, fef96b80)

libperifw.so.1`int_err_set_item+0x6c(ff22ea6c, fefa7478, fefa59f8, fef96b80, ee78, ec00)

libperifw.so.1`ERR_load_strings+0x80(2, ee78, ec00, fef96b80, 1000, ff22ea6c)

libmmdpsvc.so`ERR_load_ERR_strings+0x64(1aafc, ff0cf8ac, ff213e60, ff22ea3c, 1abdc, 1a800)

libmmdpsvc.so`ERR_load_crypto_strings+4(ff0f6ee0, 0, fef96b80, 59cc, 5800, 0)

libmmdpsvc.so`SSL_load_error_strings+4(1, 8001, fef7c9f0, 87060, fefabf00, fef96b80)

libmmdpsvc.so`__1cRConnectionManagerRSSLInitialization6M_nMt_MMDPStatus__+0x88(581b8, ff1d4434, 589c0, 9, 56718, 0)

libmmdpsvc.so`__1cRConnectionManagerWHandleSSLOptionsChange6MpnTConfigItemChangeMsg_h_nMt_MMDPStatus__+0x500(581b8, 608f8, 3, 0, 80808080, 1010101)

libmmdpsvc.so`__1cbBReplicatorConnectionManagerbAProcessConfigItemChangeMsg6MpnTConfigItemChangeMsg__nMt_MMDPStatus__+0x3f0(581b8, 608f8, 8, 2, 2, 56718)

libmmdpsvc.so`__1cRConnectionManagerRHandleMMDPCommMsg6MpnSMMDPInterThreadMsg__v_+0x1fc(581b8, 608f8, ff000000, 15d74, fe96cd10, 568c8)

libmmdpcommon.so`__1cOMMDPCommThreadWInternalMsgHandlerLoop6Mp0_v_+0xd8(581b8, 581b8, 0, fe89b370, 0, fe895a60)

libmmdpcommon.so`__1cOMMDPCommThreadPThreadEntryProc6Fpv_v_+0x60(581b8, 0, fe897940, 0, fe4b5200, 1)

libperifw.so.1`pfw_posix_wrapper+0x14(55c78, fda6c000, 0, 0, ff312d38, 581b8)

libc.so.1`_lwp_start(0, 0, 0, 0, 0, 0)

 

c) Crash#3

root@solaris_host {24} adb core.23

...

SIGSEGV: Segmentation Fault

$c

libc.so.1`t_splay+0xf4(d1d70, 200, d0f98, fe8139b0, fe8923ec, d13d0)

libc.so.1`realloc+0x158(d1b68, 400, d1b70, 59ac, cfdc0, d1d70)

libperifw.so.1`CRYPTO_realloc+0x13c(d1b70, 400, fef7e180, 13f, 0, fef9c548)

libperifw.so.1`expand+0x50(cfa80, d1b70, 7f, 110, cebfc, ba570)

libperifw.so.1`lh_insert+0x3c(18000, ff230eb0, cfa80, c0, 180, fef96b80)

libperifw.so.1`int_err_set_item+0x6c(ff230eb0, fefa7478, fefa59f8, fef96b80, ee78, ec00)

libperifw.so.1`ERR_load_strings+0x44(0, ee78, ec00, fef96b80, 408c000, ff230eb0)

libmmdpsvc.so`ERR_load_RSA_strings+0x34(2, ee78, ff230d90, ff213e60, 1cf30, 1cc00)

libmmdpsvc.so`ERR_load_crypto_strings+0x14(ff0f6ee0, 0, fef96b80, 59cc, 5800, 0)

libmmdpsvc.so`SSL_load_error_strings+4(1, 8001, fef7c9f0, 9f000, fefabf00, fef96b80)

libmmdpsvc.so`__1cRConnectionManagerRSSLInitialization6M_nMt_MMDPStatus__+0x88(56c20, ff1d4434, 58958, 5, 56508, 0)

libmmdpsvc.so`__1cRConnectionManagerWHandleSSLOptionsChange6MpnTConfigItemChangeMsg_h_nMt_MMDPStatus__+0x500(56c20, 82e10, 3, 66530, 80808080, 1010101)

libmmdpsvc.so`__1cVMMDPConnectionManagerbAProcessConfigItemChangeMsg6MpnTConfigItemChangeMsg__nMt_MMDPStatus__+0x588(56c20, 82e10, 8, 2, 2, 56508)

libmmdpsvc.so`__1cRConnectionManagerRHandleMMDPCommMsg6MpnSMMDPInterThreadMsg__v_+0x1fc(56c20, 82e10, ff000000, 15d74, fe96cd10, 56580)

libmmdpcommon.so`__1cOMMDPCommThreadWInternalMsgHandlerLoop6Mp0_v_+0xd8(56c20, 56c20, 0, fe89b370, 1, fe895a60)

libmmdpcommon.so`__1cOMMDPCommThreadPThreadEntryProc6Fpv_v_+0x60(56c20, 0, fe897940, 0, fe4b3200, 1)

libperifw.so.1`pfw_posix_wrapper+0x14(55c48, fde6c000, 0, 0, ff312d38, 56c20)

libc.so.1`_lwp_start(0, 0, 0, 0, 0, 0)

 

4) Source code (sorry, but it is simplified code. I cannot provide you the source code, as it is proprietary softwareL of our company):

#include <iostream>

#include <openssl/ssl.h>

 

using namespace std;

 

class B;

class C;

 

class A {

public:

void SSLInitialization();

};

 

class B: public A {

public:

       B();

};

 

 

class C: public A {

public:

       C();  

}; 

 

B::B() {

       SSLInitialization();

}

 

C::C() {

       SSLInitialization();

}

 

void A::SSLInitialization() {

if (SSL_library_init()!=1) {

        cout << "Error initializing SSL Libraries" << endl;

 

 

 OpenSSL_add_all_algorithms();

SSL_load_error_strings();

 /*

Some logic...

*/

}

 

int main() {

  B    *b = new B();

  C    *c = new C();

  return 0;

}

 

Please investigate this issue and create a ticket (if it possible). I can provide you additional information from my side, if it’s needed.

Thank you,

Russia, N.Novgorod,

--Mikhail

Reply via email to