Memory leaks are observed for libgcrypt.so.11 in multi-thread mode

tangtong tang__tong at hotmail.com
Sat Oct 10 10:21:05 CEST 2009


Hi,
My program is a multi-thread server(pthread) working in Solaris enviorment, For thread-safe consideration, according to the guide, I have defined the following macro and call the specific function during iniatlization:
GCRY_THREAD_OPTION_PTHREAD_IMPL;
 gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);

Scenario1:
Launch Tls session one after another to guarantee there is no concurrency existing between tls session, there is no memory leak reported by MDB;


Scenario2:
Launch TLS session concurrently, e.g., 50 TPS,  memory leaks are reported by MDB

> ::findleaks
CACHE     LEAKED   BUFCTL CALLER
00204a88      17 0053b860 libUE.so`_ZN12PacketHelper12createPacketEi+0x34
0020dc08      27 00aea708 libgcrypt.so.11`do_malloc+0x54
0020b188      88 012f0b40 libgcrypt.so.11`do_malloc+0x54
0020dc08     100 013aa000 libgcrypt.so.11`do_malloc+0x54
0020ae08      64 00461e00 libgcrypt.so.11`do_malloc+0x54
0020b188      39 0073a780 libgcrypt.so.11`do_malloc+0x54
0020ae08      65 016cf248 libgcrypt.so.11`do_malloc+0x54
0020dc08     129 00aea7f8 libgcrypt.so.11`do_malloc+0x54
----------------------------------------------------------------------
   Total     529 buffers, 325752 bytes

I have disabled the session reusage and deinit tls sessions structure with gnutls_deinit().

Anybody can give me some tips on this issue?

Regards
Tony










 		 	   		  
_________________________________________________________________
Messenger安全保护中心,免费修复系统漏洞,保护Messenger安全!
http://im.live.cn/safe/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20091010/ec6fc410/attachment.htm>


More information about the Gnutls-help mailing list