-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Using Fledge version v2.5.0 as part of the south 104 plugin of the project fledge-power, a potential memory leak may have been found in C/services/south/ingest.cpp according to a battery of tests ran with Valgrind, see screenshot attached.
The amount of allocated memory seem to increase over time, by increase of 48 bytes and even without the transmission of messages from the remote device. The trace shown above points to the following code at ./C/services/south/ingest.cpp:748:
ReadingSet *readingSet = new ReadingSet(m_data);
m_data->clear();
// Pass readingSet to filter chain
firstFilter->ingest(readingSet);
/*
* If filtering removed all the readings then simply clean up m_data and
* return.
*/
if (m_data->size() == 0)
{
delete m_data;
m_data = NULL;
return;
}
Suggesting that readingSet may need to be deleted. The code snippet cited above has not been extensively modified from v2.5.0 to develop as of June 2025. Questions are as follow :
- Should it be the responsability of a filter or a plugin futher down in the data stream to clean up the memory allocated for
readingSetat this point ? - If not, could this have been resolved in newer (
>v2.5.0) versions of Fledge ?
Thank you.
Environment Platform
Ubuntu 20.04.6 LTS
Fledge Version
v2.5.0
Installation
Source Code
Steps To Reproduce
1. Start a south service connected to a remote device using Fledge v2.5.0
2. Memory usage increases over time for this serviceExpected Behavior
No memory leaks are expected.
Screenshots
Logs
Support bundle
.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
