istgt icon indicating copy to clipboard operation
istgt copied to clipboard

feat(test): Track memory leak (or) memory corruption issues

Open mittachaitu opened this issue 4 years ago • 1 comments

What would you like to be added: It will help to fix memory issues/corruption in cstor-istgt.

Why is this needed: Add a test case to track memory leak (or) corruption using Valgrind tool

Describe the solution you'd like: [A clear and concise description of what you want to happen]

Environment:

  • OpenEBS version:
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):<Paste>

mittachaitu avatar May 21 '20 06:05 mittachaitu

Explored Valgrind tool to detect memory leak/corruption in istgt

  • It is able to give stats about the memory only once the istgt process is killed/died.
  • It doesn't support attaching the currently running process to it(By its design).
  • If will kill the Valgrind process then it will not give any stats about memory usage. Ex: We need to launch istgt process as Valgrind ./istgt to get memory stats but if we kill that process then it is not giving any stats about the memory(since Valgrind itself dies so no one is there to print output). ============ Basically, to overcome the above issue we need to have istgtcontrol command to kill istgt process alone and need to check whether Valgrind is able to give stats.

mittachaitu avatar Jul 08 '20 07:07 mittachaitu