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

Memory Leakage in cpprestsdk (libcpprest.so.2.10) used in nmos-cpp. #1817

Open
Ansul501 opened this issue Feb 26, 2025 · 0 comments
Open

Memory Leakage in cpprestsdk (libcpprest.so.2.10) used in nmos-cpp. #1817

Ansul501 opened this issue Feb 26, 2025 · 0 comments

Comments

@Ansul501
Copy link

We have been using nmos-cpp library (taken from master branch on 04th September 2024) in our product which is Linux based and have been witnessing slow but steady increase in memory leakage. We continuously ran it for 60 days and saw a leakage of around 140 MB. We did some investigations and used Valgrind tool , which pointed that leakage is happening inside cpprestsdk.
Here’s a sample from Valgrind’s output:

20 bytes in 1 blocks are definitely lost in loss record 2,732 of 8,922
==7433== at 0x483FDB8: operator new(unsigned int) (vg_replace_malloc.c:328)
==7433== by 0x3E810D: void std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_construct<char const
>(char const
, char const*, std::forward_iterator_tag) (basic_string.tcc:219)
==7433== by 0x4A07219: ??? (in /usr/lib/arm-linux-gnueabihf/libcpprest.so.2.10)
==7433== by 0x49F3B61: ??? (in /usr/lib/arm-linux-gnueabihf/libcpprest.so.2.10)**

Key details:
Platform & Build: Running on an Linux based system with nmos-cpp, built on 04th September 2024.
Library Usage: The cpprestsdk library is used within nmos-cpp, and Valgrind reports the leakage occurring inside cpprestsdk.
Memory Growth: The application’s memory footprint steadily increases, reaching approximately 140MB in 60 days.

Questions:

  1. Has anyone observed similar memory leaks in cpprestsdk (libcpprest.so.2.10)?
  2. Is this a known issue, and has it been addressed in a newer version?
  3. Are there any suggested fixes, patches, or workarounds to mitigate the issue?
    Any insights would be greatly appreciated.
    Thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant