Skip to content

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

@Ansul501

Description

@Ansul501

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions