-
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 <swapnil.chaudhary@seagate.com>
[fenced-code-flag] -> added name of programming language after 3 backquotes ``` Signed-off-by: Pratik Patil <pratik.k.patil@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
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 <nagakishore.kommuri@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
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 <venkateswarlu.payidimarry@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: alfhad <fahadshah2411@gmail.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
) 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 <gaurav.gaur@seagate.com> Co-authored-by: Venkatesh Balagani <venkatesh.balagani@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: Rinku Kothiya <rinku.kothiya@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: Rinku Kothiya <rinku.kothiya@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: Rinku Kothiya <rinku.kothiya@seagate.com> Co-authored-by: Pradeep Kumbhre <pradeep.kumbhre@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: Rinku Kothiya <rinku.kothiya@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
…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 <hua.huang@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
Problem: Getting following codacy warnings Useless cat. Consider `cmd < file | ...` Solution: Removed unnecessary cat from the command. Signed-off-by: Rinku Kothiya <rinku.kothiya@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: alfhad <fahadshah2411@gmail.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: alfhad <fahadshah2411@gmail.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
…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 <rahul.kumar@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
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 <rajat.r.patil@seagate.com> Co-authored-by: Vidyadhar Pinglikar <vidyadhar.pinglikar@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
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 <rinku.kothiya@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
…eagate#2105) Signed-off-by: Mehul Joshi <mehul.joshi@seagate.com> Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
Pulled latest code and addressed review comments. Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
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