< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate-users] TLS memory leak of resiprocate 1.7????


Hi,

I used sipp -t tl at 30 calls per second for about 48 hours, the total memory (SIZE) with top command did not change after several hours, but resident memory (RES) increased 2 MBytes for about every 4 hours.  Each incoming call has a new TLS connection.

So I use valgrind to test for 1000 calls at one call per second with answer time 50 seconds, and wait for all call finished and all TLS connection destroyed, and then terminates valgrind. What I found is that some memories in TlsConnection are still reachable although all TLS connections are destroyed.

Is anyone aware of openssl shared lib memory leak ???

Here are some output of valgrind:

==28317== 4 bytes in 1 blocks are still reachable in loss record 12 of 1,937
==28317==    at 0x4004A16: malloc (vg_replace_malloc.c:195)
==28317==    by 0x12C48D: ??? (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12CAB9: CRYPTO_malloc (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x151DA1: OPENSSL_private_rsa_blinding_check_thread_id (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x150125: ??? (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x15182D: RSA_private_decrypt (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x1FB2AD: ??? (in /lib/libssl.so.0.9.7a)
==28317==    by 0x1FCF00: ssl3_accept (in /lib/libssl.so.0.9.7a)
==28317==    by 0x20BDA7: SSL_do_handshake (in /lib/libssl.so.0.9.7a)
==28317==    by 0x83738EA: resip::TlsConnection::checkState() (TlsConnection.cxx:145)
==28317==    by 0x83747C6: resip::TlsConnection::read(char*, int) (TlsConnection.cxx:272)

==28317== 12 bytes in 1 blocks are still reachable in loss record 587 of 1,937
==28317==    at 0x4004A16: malloc (vg_replace_malloc.c:195)
==28317==    by 0x12C48D: ??? (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12CAB9: CRYPTO_malloc (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x17253F: lh_insert (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12D4C9: CRYPTO_dbg_malloc (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12CAE4: CRYPTO_malloc (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x1752F7: ERR_get_state (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x1756C0: ERR_clear_error (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x837366F: resip::TlsConnection::checkState() (TlsConnection.cxx:123)
==28317==    by 0x83747C6: resip::TlsConnection::read(char*, int) (TlsConnection.cxx:272)

==28317== 12 bytes in 1 blocks are still reachable in loss record 590 of 1,937
==28317==    at 0x4004A16: malloc (vg_replace_malloc.c:195)
==28317==    by 0x12C48D: ??? (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12CAB9: CRYPTO_malloc (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12E04A: ??? (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12E355: ??? (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12EA51: CRYPTO_new_ex_data (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x20E29D: SSL_SESSION_new (in /lib/libssl.so.0.9.7a)
==28317==    by 0x20EBD0: ssl_get_new_session (in /lib/libssl.so.0.9.7a)
==28317==    by 0x1FCB4E: ssl3_accept (in /lib/libssl.so.0.9.7a)
==28317==    by 0x20BDA7: SSL_do_handshake (in /lib/libssl.so.0.9.7a)
==28317==    by 0x83738EA: resip::TlsConnection::checkState() (TlsConnection.cxx:145)
==28317==    by 0x83747C6: resip::TlsConnection::read(char*, int) (TlsConnection.cxx:272)

==28317== 12 bytes in 1 blocks are still reachable in loss record 632 of 1,937
==28317==    at 0x4004A16: malloc (vg_replace_malloc.c:195)
==28317==    by 0x12C48D: ??? (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12CAB9: CRYPTO_malloc (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x17253F: lh_insert (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12D683: CRYPTO_dbg_realloc (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x12CB75: CRYPTO_realloc (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x17259F: lh_insert (in /lib/libcrypto.so.0.9.7a)
==28317==    by 0x20E684: SSL_CTX_add_session (in /lib/libssl.so.0.9.7a)
==28317==    by 0x20BB71: ssl_update_cache (in /lib/libssl.so.0.9.7a)
==28317==    by 0x1FE2E1: ssl3_accept (in /lib/libssl.so.0.9.7a)
==28317==    by 0x20BDA7: SSL_do_handshake (in /lib/libssl.so.0.9.7a)
==28317==    by 0x83738EA: resip::TlsConnection::checkState() (TlsConnection.cxx:145)




Any suggestions are appreciated.


Frank