Opened 4 years ago

Closed 21 months ago

#342 closed enhancement (duplicate)

Memory leak detection

Reported by: mrusu Owned by: j.yu
Priority: minor Milestone: 9.0.x
Component: systemtest Version: 8.4
Keywords: Cc:
Complexity: Medium

Description (last modified by mrusu)

Would be useful to have a memory leak detection option, especially combined with systemtest.

Change History (11)

comment:1 Changed 4 years ago by j.yu

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 4 years ago by mrusu

  • Description modified (diff)
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopened the ticket, since it refers to something else than ../systemtest/testcases_fixed/test_memleak
As I could see, test_memleak checks for errors 801 (system overload) or 206 (error in base dbms), but not for memory leaks caused by the code, when the allocated memory is not freed afterwards. I am sure there are quite a number of occurrences.

comment:3 Changed 4 years ago by abeccati

Thanks Mihaela, Would you please add a little more detail on the description about what should be done to solve this (e.g. use a code analysis tool or else).

Do we already have relevant consequences on that or will the servers restart (countdown) take care of cleaning them? In the latter case I think we can move this to "Future" milestone with minor priority.


comment:4 Changed 4 years ago by dmisev

I assume the test should run valgrind or similar on directql (not rasql, valgrind can't be attached to server processes), and automatically extract from the valgrind output whether there is a memleak or not.

Server restart can fix memleaks, but sometimes, e.g. nasty memleak during import or a million queries between restarts it can be fatal.

Last edited 4 years ago by dmisev (previous) (diff)

comment:5 Changed 4 years ago by dmisev

  • Milestone set to 8.5
  • Priority changed from major to minor

I put it for 8.5 but Jin can reassign this to someone else or different milestone, he's the owner of systemtest after all.

comment:6 Changed 4 years ago by j.yu

the Makefile in systemtest should know --enable-debug and run the if the debug is on

comment:7 Changed 4 years ago by dmisev

What should it know?

comment:8 Changed 4 years ago by j.yu

the ./configure --enable-debug
with will set RMANDEBUG=on, CXXFLAGS+=" -g3 -gdwarf-2 -O0 "
test queries can be fetched from ../systemtest/testcases_mandatory/test_select/test_rasql/

comment:9 Changed 4 years ago by dmisev

We could try to write a C++ client directly integrated in the server in the style of directql or source:relblobif/test/ which would run all the queries in source:systemtest/testcases_mandatory, and run this through valgrind.

comment:10 Changed 4 years ago by dmisev

  • Milestone changed from 8.5 to 9.0

comment:11 Changed 21 months ago by dmisev

  • Resolution set to duplicate
  • Status changed from reopened to closed

duplicate #919

Note: See TracTickets for help on using tickets.