Dear Zoran, Thank you very much for your checking.
Would you please tell me which test case is failed in your environment because my current pc return OK for all and no mem leak. That might because of threading problem. Further information, please note that this patch should apply after #2174 (already been pushed). Sincerely, Hoang -----Original Message----- From: Zoran Milinkovic [mailto:zoran.milinko...@ericsson.com] Sent: Tuesday, March 7, 2017 10:07 PM To: Hoang Minh Vo <hoang.m...@dektech.com.au>; mahesh.va...@oracle.com; Anders Widell <anders.wid...@ericsson.com> Cc: opensaf-devel@lists.sourceforge.net Subject: RE: [devel] [PATCH 0 of 2] Review Request for mdstest: handle memory leak [#1860] Hi Hoang, Reviewed and tested both patches. There is still a memory leak when some tests fail. ==20325== 752 bytes in 2 blocks are definitely lost in loss record 9 of 10 ==20325== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20325== by 0x4E7731D: mds_mcm_user_event_callback (mds_c_api.c:3301) ==20325== by 0x4E78BB1: mds_mcm_svc_up (mds_c_api.c:1615) ==20325== by 0x4E95C14: mdtm_process_discovery_events (mds_dt_tipc.c:1031) ==20325== by 0x4E95C14: mdtm_process_recv_events (mds_dt_tipc.c:699) ==20325== by 0x50C7183: start_thread (pthread_create.c:312) ==20325== by 0x53D737C: clone (clone.S:111) ==20325== ==20325== LEAK SUMMARY: ==20325== definitely lost: 752 bytes in 2 blocks ==20325== indirectly lost: 0 bytes in 0 blocks ==20325== possibly lost: 120 bytes in 4 blocks ==20325== still reachable: 263,815 bytes in 5 blocks ==20325== suppressed: 0 bytes in 0 blocks Thanks, Zoran -----Original Message----- From: Hoang Vo [mailto:hoang.m...@dektech.com.au] Sent: den 6 mars 2017 09:00 To: mahesh.va...@oracle.com; Anders Widell <anders.wid...@ericsson.com> Cc: opensaf-devel@lists.sourceforge.net Subject: [devel] [PATCH 0 of 2] Review Request for mdstest: handle memory leak [#1860] Summary: mdstest: handle memory leak [#1860] Review request for Trac Ticket(s): #1870 Peer Reviewer(s): mahesh.va...@oracle.com; zoran.milinko...@ericsson.com Pull request to: mahesh.va...@oracle.com Affected branch(es): default Development branch: default -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services y OpenSAF services n Core libraries n Samples n Tests y Other n Comments (indicate scope for each "y" above): --------------------------------------------- changeset 9a1f61672dd538472bf0c1340011467a35f83a23 Author: Hoang Vo <hoang.m...@dektech.com.au> Date: Mon, 06 Mar 2017 14:52:06 +0700 mds: handle memory leak [#1860] Some error handling does not clean internal memory. Error handling in dirrect send case clear user memory seem inconsistence, mds should let creater manage its memory in error cases. action: implement as proposed. changeset 1efa643eb496a2938d1ddfecac6e91aa4a1cda88 Author: Hoang Vo <hoang.m...@dektech.com.au> Date: Mon, 06 Mar 2017 14:52:08 +0700 mdstest: handle memory leak [#1860] mdstest leak in many cases because of: - incorrect use of input param - wrong test sequence (cacel subscription after uninstall) - malloc then terminate thread (cannot reach free) - missing free on receiving message (used global pointer) - encode wrong message length action: fix above cases Complete diffstat: ------------------ src/base/sysf_mem.c | 3 + src/mds/apitest/mdstipc.h | 3 +- src/mds/apitest/mdstipc_api.c | 288 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- ----------------------------------------------------------------------- src/mds/apitest/mdstipc_conf.c | 42 ++++++++++----------- src/mds/mds_c_sndrcv.c | 34 +++++++--------- 5 files changed, 181 insertions(+), 189 deletions(-) Testing Commands: ----------------- G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log mdstest Testing, Expected Results: -------------------------- No definitely and indirectly lost report in valgrind.log Conditions of Submission: ------------------------- ACK from maintainer Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y powerpc n n powerpc64 n n Reviewer Checklist: ------------------- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. ---------------------------------------------------------------------------- -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel