Description of problem: An ACL test added to cluster_test exposed a memory leak in the SASL client library. Steps to Reproduce: Remove the #if 0 around QPID_AUTO_TEST_CASE(testAcl) {} in qpid/src/tests/cluster_test.cpp and run make check TESTS=cluster_test Actual results: Memory leak. Looks like we need thread local storage Expected results: Additional info: This comment from sasl.h seems relevant. We may need thread-local storage, note that qpid/sys/Thread.h defines a macro QPID_TSS which expands to the appropriate thread-local modifier for gcc or windows. /* get a sasl_secret_t (plaintext password with length) * inputs: * conn -- connection context * context -- context from callback structure * id -- callback id * outputs: * psecret -- set to NULL to cancel * set to password structure which must persist until * next call to getsecret in same connection, but middleware * will erase password data when it's done with it. * returns SASL_OK */ typedef int sasl_getsecret_t(sasl_conn_t *conn, void *context, int id, sasl_secret_t **psecret); The existing SASL test should be converted into a unit test. It can follow the pattern in cluster_test, using BrokerFixture instead of ClusterFixture. This will give valgrind coverage of both client and broker code.
Fixed upstream (by aconway) in revision 832134.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: cause: opening client connections with authentication mechanisms involving passwords. consequence: a very small amount of memory is leaked for each connection setup. fix: code was added to manage the memory used in the authentication mechanism result: memory is freed properly
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,4 +1 @@ -cause: opening client connections with authentication mechanisms involving passwords. +Opening client connections with authentication mechanisms involving passwords caused a very small amount of memory to be leaked for each connection setup. With this update, management of the memory used in the authentication mechanism is handled properly and memory leaks no longer occur.-consequence: a very small amount of memory is leaked for each connection setup. -fix: code was added to manage the memory used in the authentication mechanism -result: memory is freed properly
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0773.html