IBM Support

Throughput problems when malloc is called often in SSL mode

Troubleshooting


Problem

malloc is often a bottleneck for application performance, especially under AIX.

Symptom

In procstack output, we have many edus in SSL, stucking behind lock for malloc heap, trying to either malloc or free the memory.
procstack output shows that we only have this one got the malloc heap, and during releasing the malloc heap's lock

---------- tid# 76218535 (pthread ID: 147768) ----------
0x090000000053d4d8 _global_unlock_common(??, ??) + 0x58 ####################
0x090000000004103c free_y(??, ??) + 0x2fc
0x09000000008d0a94 operator delete(void*)(??) + 0x14
0x090000001bcd4460 GSKBufferAttributes::~GSKBufferAttributes()(??, ??) + 0xa0
0x090000001bcd50ac GSKBuffer::~GSKBuffer()(??, ??, ??) + 0xec
0x090000001c46eadc SSLV3Protocol::SSL_WriteCompressedFragment(const GSKASNCBuffer&,unsigned char)(??, ??, ??) + 0x7fc
0x090000001c46d54c SSLV3Protocol::SSL_WriteFragment(const GSKASNCBuffer&,unsigned char)(??, ??, ??) + 0x46c
0x090000001c46c590 SSLV3Protocol::SSL_Write(const void*,int,unsigned char)(??, ??, ??, ??) + 0x190
0x090000001c48e038 SSLV3Protocol::Send(const void*,int)(??, ??, ??) + 0x98
0x090000001c48c870 SSLProtocolManager::Send(const void*,int)(??, ??, ??) + 0x30
0x090000001c37d8a8 gsk_secure_soc_write(??, ??, ??, ??) + 0x508
0x09000000077ddc44 sqlcctcpsend(SQLCC_COMHANDLE_T*,SQLCC_COND_T*)(??, ??) + 0x12c
0x0a000001d83fa64c ????????() + ??
0x09000000080e5720 symbol_fixer.260.fdpr.chunk.329(??) + 0x30c
0x09000000080e46ec @72@sqeAgent::ResetInterrupt.fdpr.chunk.90(int,int)(??, ??, ??) + 0x40
0x09000000080e46ec @72@sqeAgent::ResetInterrupt.fdpr.chunk.90(int,int)(??, ??, ??) + 0x40
0x09000000095f1b90 @72@sqljsDriveRequests(sqeAgent*,db2UCconHandle*)(??, ??) + 0xa8
0x09000000095f26a0 @72@sqljsInitAgent.fdpr.chunk.1(sqeAgent*,SQLCC_INITSTRUCT_T*,db2UCconHandle*,bool*,char**)(??, ??) + 0x5f8
0x090000000779f5ac sqeAgent::RunEDU.fdpr.chunk.156()(??) + 0x204
0x090000000771d240 symbol_fixer.217.fdpr.chunk.238(??) + 0x124
0x0900000008c37dfc symbol_fixer.304.fdpr.chunk.497(??) + 0x130
0x0900000007ca8664 sqloEDUEntry(??) + 0x388
0x090000000053fe10 _pthread_body(??) + 0xf0

Only this one got the malloc heap, and still holding it.

---------- tid# 93258591 (pthread ID: 355896) ----------
0x0900000007710bb8 sqloGetCPUUsage.fdpr.chunk.4(0x8, 0xa000003107f57ec, 0x14, 0x2) + 0x100 ####################
0x0900000000040e48 free_y(??, ??) + 0x108
0x09000000008d0a94 operator delete(void*)(??) + 0x14
0x090000001bb1ebbc GSKASNBuffer::~GSKASNBuffer()(??, ??, ??) + 0x5c
0x090000001bcd4430 GSKBufferAttributes::~GSKBufferAttributes()(??, ??) + 0x70
0x090000001bcd50ac GSKBuffer::~GSKBuffer()(??, ??, ??) + 0xec
0x090000001c3ce3a8 HMAC_Hash(GSKKRYDigestAlgorithm*,unsigned char*,unsigned long,const unsigned char*,unsigned long,const unsigned char*,unsigned
long,const unsigned char*,unsigned long,const unsigned char*,unsigned long,const unsigned char*,unsigned long)(0xa000003107f58a0, 0x9001000a0d9ecc0
, 0x14, 0xa000003107f59c0, 0xa000003107f58a0, 0x9001000a3654d58, 0x90000001bcd53b8, 0x85) + 0x448
0x090000001c4636d4 TLSV10Protocol::CalcMAC(GSKKRYDigestAlgorithm*,const unsigned char*,CipherSpec&,const unsigned char*,unsigned long,const unsign
ed char*,unsigned long*,unsigned long*,unsigned char*)(??, ??, ??, ??, ??, ??, ??, ??) + 0x1b4
0x090000001c465b9c SSLV3Protocol::ReadCompressedMsg_BlockCipher(int)(??, ??) + 0x129c
0x090000001c469874 SSLV3Protocol::ReadCompressedMsg(int)(??, ??) + 0x434
0x090000001c469be8 SSLV3Protocol::ReadMsg(int)(??, ??) + 0x108
0x090000001c46b49c SSLV3Protocol::SSL_Read(void*,int,int)(??, ??, ??, ??) + 0x33c
0x090000001c492a34 SSLV3Protocol::StateMachine(int,void*,int,bool*)(??, ??, ??, ??, ??) + 0x2ef4
0x090000001c48e55c SSLV3Protocol::Receive(void*,int)(??, ??, ??) + 0x21c
0x090000001c48c7f0 SSLProtocolManager::Receive(void*,int)(??, ??, ??) + 0x30
0x090000001c37c6ac gsk_secure_soc_read(??, ??, ??, ??) + 0x52c
0x09000000077da7a8 sqlccSSLSocketRead(SQLCC_TCPCONNHANDLE_T*,SQLCC_COND_T*,unsigned short,unsigned int,char*,int,int*)(0x0, 0x1, 0x1, 0x1, 0xa0002
00610cd100, 0x90000000aff61e0, 0xa000210e6190080, 0xffff0000) + 0x13c
0x09000000077db6ac sqlccSSLSocketRead.fdpr.chunk.3(SQLCC_TCPCONNHANDLE_T*,SQLCC_COND_T*,unsigned short,unsigned int,char*,int,int*)(0xa000003107fa
710, 0x6be000006be, 0x9000000077de560, 0x4444222800000000, 0x900000000042de0, 0x9001000a1473f00, 0x1, 0x9001000a3615860) + 0x1e0
0x09000000077dc810 sqlcctcprecv(SQLCC_COMHANDLE_T*,SQLCC_COND_T*)(??, ??) + 0xd50
0x09000000080eb8ac sqljcReceive.fdpr.chunk.31(sqljCmnMgr*)(??) + 0xd8
0x09000000080e4d98 @72@sqeAgent::ResetInterrupt.fdpr.chunk.93(int,int)(??, ??, ??) + 0x410
0x09000000080e4d98 @72@sqeAgent::ResetInterrupt.fdpr.chunk.93(int,int)(??, ??, ??) + 0x410
0x09000000095f1b90 @72@sqljsDriveRequests(sqeAgent*,db2UCconHandle*)(??, ??) + 0xa8
0x09000000095f26a0 @72@sqljsInitAgent.fdpr.chunk.1(sqeAgent*,SQLCC_INITSTRUCT_T*,db2UCconHandle*,bool*,char**)(??, ??) + 0x5f8
0x090000000779f5ac sqeAgent::RunEDU.fdpr.chunk.156()(??) + 0x204
0x090000000771d240 symbol_fixer.217.fdpr.chunk.238(??) + 0x124
0x0900000008c37dfc symbol_fixer.304.fdpr.chunk.497(??) + 0x130
0x0900000007ca8664 sqloEDUEntry(??) + 0x388
0x090000000053fe10 _pthread_body(??) + 0xf0

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Security \/ Plug-Ins - LDAP","Platform":[{"code":"PF002","label":"AIX"}],"Version":"9.7;10.1;10.5","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Express;Express-C;Personal;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
30 April 2025

UID

swg21971070