-
Notifications
You must be signed in to change notification settings - Fork 142
CORTX-33834: Fixed rpc/conn.c m0_rpc_conn_ha_timer_start() memory leak #2108
Conversation
Signed-off-by: Abhishek Saha <abhishek.saha@seagate.com>
Signed-off-by: Abhishek Saha <abhishek.saha@seagate.com>
Signed-off-by: Abhishek Saha <abhishek.saha@seagate.com>
Valgrind output on fs_stats UT without this patch
Valgrind output on fs_stats UT with this patch
complete traces are attached here: |
Jenkins CI Result : Motr#1666Motr Test Summary
CppCheck SummaryCppcheck: No new warnings found 👍 |
Problem: Prior to this patch, m0_rpc_conn_ha_timer_start() was responsible for initializing
and finalizing the timer m0_rpc_conn::c_ha_timer. The old timer would be finalized
and freed and then the new timer would be allocated and initialized. This led to a memory leak because
one instance of c_ha_timer was always left.
Solution: m0_rpc_conn_ha_timer_stop() now finalizes the RPC timer c_ha_timer and
m0_rpc_conn_ha_timer_start() is modified to finalize only the timer which is not already finalized.
Signed-off-by: Abhishek Saha abhishek.saha@seagate.com
Problem Statement
Design
Coding
Checklist for Author
Testing
Checklist for Author
Impact Analysis
Checklist for Author/Reviewer/GateKeeper
Review Checklist
Checklist for Author
Documentation
Checklist for Author