-
Notifications
You must be signed in to change notification settings - Fork 142
CORTX-33743: Analyze and fix memory leaks #2088
CORTX-33743: Analyze and fix memory leaks #2088
Conversation
f93c6eb to
7b12e1a
Compare
… s3 IOs with valgrind Problem statement: Valgrind reported few leaks in the code, where strdup was used for allocating memory to the duplicate string. Fix Description: Analyzed the code statically and freed up the variables allocated memory dynamically during the execution. Attaching the valrind report with the code changes, where no leak is found wrt the leaks described of the JIRA ticket. Signed-off-by: Swapnil Chaudhary <[email protected]>
[fenced-code-flag] -> added name of programming language after 3 backquotes ``` Signed-off-by: Pratik Patil <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
Problem: Unable to load gdb-extensions.py. Failing with syntax errors Solution: Introduce parenthesis for "print" function. Replace "long" with "int". Removed macro definition as gdb.execute() is throwing errors. User need to manually define macros at gdb command prompt. Added comments for the same inside the file. Signed-off-by: Naga Kishore Kommuri <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
Problem: Codacy warning, "shellcheck: Tips depend on target shell and yours is unknown. Solution: Add a shebang or a 'shell' directive" Signed-off-by: Venkateswarlu Payidimarry <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: alfhad <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
) Problem: We see 1688 occurrences of the pattern, "Double quote to prevent globing and word splitting". And issues like Use $(...) notation instead of legacy backticked .... Solution: We are putting the variable references in double-quotes. Also fixed issues like Use $(...) notation instead of legacy backticked .... Signed-off-by: Gaurav Gaur <[email protected]> Co-authored-by: Venkatesh Balagani <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: Rinku Kothiya <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: Rinku Kothiya <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: Rinku Kothiya <[email protected]> Co-authored-by: Pradeep Kumbhre <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: Rinku Kothiya <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
…eagate#2004) * async_disconnecting is used to check if waiting is needed. * No need to call session_put() in rm_remote_free(). Because at this moment, maybe some other requests are still in progress. Signed-off-by: Hua Huang <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
Problem: Getting following codacy warnings Useless cat. Consider `cmd < file | ...` Solution: Removed unnecessary cat from the command. Signed-off-by: Rinku Kothiya <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: alfhad <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: alfhad <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
…le (Seagate#2059) Problem: The addb client logs in rgw container is generating in wrong directory (rgw_debug). This "rgw_debug" directories meant for rgw crash files only. Our expectation, addb client logs should be resides in "addb_files-0x7200000000000001:0x13" directory. Solution: It's required to set an environment for M0_CLIENT_ADDB_DIR on cortx-rgw-integration repository in src/rgw/setup/rgw.py at config stage. In cortx-motr, client_init.c will make use of M0_CLIENT_ADDB_DIR environment variable to store addb client log. Signed-off-by: Rahul Kumar <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
Problem: 43motr-sync-replication ST fails. be-ut failure in emap and io-nw-xfer-ut failure in target_ioreq_seg_add fails. Solution: 43motr-sync-replication fixed for N < K by shifting goff by (K-N)*offset. be-ut failure in emap is fixed by changing EXTMAP_UT_UNIT_SIZE to 16 from 10 as it should be in range of power 2. io-nw-xfer-ut is fixed by allocating ti_goff_ivec. Signed-off-by: Rajat Patil <[email protected]> Co-authored-by: Vidyadhar Pinglikar <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
Problem: With the previous job if one of the test failed then rest of the jobs were not executed. Solution: Running tests individually instead of a group. Ignoring any failures that occur. Signed-off-by: Rinku Kothiya <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
…eagate#2105) Signed-off-by: Mehul Joshi <[email protected]> Signed-off-by: Swapnil Chaudhary <[email protected]>
Pulled latest code and addressed review comments. Signed-off-by: Swapnil Chaudhary <[email protected]>
Signed-off-by: Swapnil Chaudhary <[email protected]>
Signed-off-by: Swapnil Chaudhary <[email protected]>
Signed-off-by: Swapnil Chaudhary <[email protected]>
Signed-off-by: Swapnil Chaudhary <[email protected]>
641d64f to
5ab2d68
Compare
|
Thanks for your contribution! |
…into CORTX-33743_FIX_MEMORY_LEAK
|
Thanks for your contribution! |
|
Latest valgrind report. |
Jenkins CI Result : Motr#1671Motr Test Summary
CppCheck SummaryCppcheck: No new warnings found 👍 |
|
Thanks for your contribution! |
CORTX-33743: Analyse and fix memory leaks found in glibc when running s3 IOs with valgrind
Problem statement:
Valgrind reported few leaks in the code, where strdup was used for allocating memory to the duplicate string.
Fix Description:
Analyzed the code statically and freed up the variables allocated memory dynamically during the execution.
Attaching the valrind report with the code changes, where no leak is found wrt the leaks described of the JIRA ticket.
Coding
Checklist for Author
Testing
Checklist for Author
Impact Analysis
Checklist for Author/Reviewer/GateKeeper
Review Checklist
Checklist for Author
Documentation
Checklist for Author