Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Investigate memory leaks #385

Open
2 tasks done
dagardner-nv opened this issue Sep 12, 2023 · 0 comments
Open
2 tasks done

[BUG]: Investigate memory leaks #385

dagardner-nv opened this issue Sep 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@dagardner-nv
Copy link
Contributor

Version

23.11

Which installation method(s) does this occur on?

Source

Describe the bug.

Repeatedly re-running the TestControlPlane.SingleClientConnectDisconnect test in MRC causes memory consumption to grow over time.

When I started the test top was displaying memory consumption as:

top - 17:03:38 up 13 days,  2:57,  3 users,  load average: 1.20, 1.22, 1.21
Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.6 us,  1.6 sy,  0.0 ni, 97.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  64119.2 total,  25869.4 free,  18042.7 used,  20207.1 buff/cache
MiB Swap:  33744.0 total,  32246.5 free,   1497.5 used.  44921.3 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
2284348 dagardn+  20   0 8622820 300544 207152 S 106.7   0.5   8:33.40 test_mrc_privat

Then approx 15 hours later memory usage was reported as:

top - 08:05:16 up 13 days, 17:59,  3 users,  load average: 2.07, 1.72, 1.43
Tasks:   1 total,   1 running,   0 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.9 us,  1.6 sy,  0.0 ni, 97.5 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  64119.2 total,  17814.4 free,  25057.0 used,  21247.8 buff/cache
MiB Swap:  33744.0 total,  32247.2 free,   1496.8 used.  37886.0 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
2284348 dagardn+  20   0   12.8g   4.9g 187288 R  99.8   7.8 913:17.03 test_mrc_privat

Running a single iteration of this code through valgrind reports :

==475162== HEAP SUMMARY:
==475162==     in use at exit: 13,142,335 bytes in 11,796 blocks
==475162==   total heap usage: 39,895 allocs, 28,099 frees, 54,817,745 bytes allocated
==475162== 
==475162== LEAK SUMMARY:
==475162==    definitely lost: 446,594 bytes in 751 blocks
==475162==    indirectly lost: 20,657 bytes in 383 blocks
==475162==      possibly lost: 65,840 bytes in 206 blocks
==475162==    still reachable: 12,609,244 bytes in 10,456 blocks
==475162==         suppressed: 0 bytes in 0 blocks
==475162== Rerun with --leak-check=full to see details of leaked memory

Minimum reproducible example

cd build/cpp/mrc/src/tests
./test_mrc_private.x --gtest_filter=TestControlPlane.SingleClientConnectDisconnect --gtest_repeat=-1 --gtest_break_on_failure

Relevant log output

No response

Full env printout

No response

Other/Misc.

No response

Code of Conduct

  • I agree to follow MRC's Code of Conduct
  • I have searched the open bugs and have found no duplicates for this bug report
@dagardner-nv dagardner-nv added the bug Something isn't working label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant