Describe the bug
There's an increase over time of total memory used over WiFi, it looks like a small leak, something like ~20 bytes per minute when running Cultivar sending metrics every minute. There's also an increase in the number of total free blocks, which indicates a memory fragmentation over time much higher than over Ethernet.
To Reproduce
Just run Cultivar app with health metrics enabled, or another network app that uses PostAsync() or similar API, and keep tracking the total_memory_free_blocks and total_free_memory in the Meadow.Cloud.
Expected behavior
The total_free_memory just oscillates around a value, and does not keep decreasing over time until leaks on almost all the device memory. Also, the total_memory_free_blocks should oscillate around a value, instead of keep increasing over time.
Screenshots
Some plots comparing memory usage and number of free blocks over time of Wifi and Ethernet.
As can be seen, the number of free blocks, i.e. memory fragmentation, is much higher on WiFi than on Ethernet. Also, WiFi increases over time the total allocated memory, on the other hand, Ethernet keeps it stable.
Meadow (please complete the following information as best as you can):
Board Information
Model: F7Micro
Hardware version: F7CoreComputeV2
Hardware Information
Processor type: STM32F777IIK6
ID: 2E-00-25-00-12-50-33-53-32-34-31-20
Serial number: 2056346A5333
Coprocessor type: ESP32
MAC Address -
WiFi: 4C:75:25:D5:28:34
Firmware Versions
OS: 1.14.0.0
Mono: 1.14.0.0
Coprocessor: 1.14.0.0
Protocol: 7
Additional context
After two week of running Cultivar sending metrics every minute this is the device metrics info:
Describe the bug There's an increase over time of total memory used over WiFi, it looks like a small leak, something like ~20 bytes per minute when running Cultivar sending metrics every minute. There's also an increase in the number of total free blocks, which indicates a memory fragmentation over time much higher than over Ethernet.
To Reproduce Just run Cultivar app with health metrics enabled, or another network app that uses
PostAsync()
or similar API, and keep tracking thetotal_memory_free_blocks
andtotal_free_memory
in the Meadow.Cloud.Expected behavior The
total_free_memory
just oscillates around a value, and does not keep decreasing over time until leaks on almost all the device memory. Also, thetotal_memory_free_blocks
should oscillate around a value, instead of keep increasing over time.Screenshots Some plots comparing memory usage and number of free blocks over time of Wifi and Ethernet. As can be seen, the number of free blocks, i.e. memory fragmentation, is much higher on WiFi than on Ethernet. Also, WiFi increases over time the total allocated memory, on the other hand, Ethernet keeps it stable.
Meadow (please complete the following information as best as you can):
Additional context
After two week of running Cultivar sending metrics every minute this is the device metrics info:
After 24 days of running, this is the device info:
As can be seen, the
total_free_memory
decreased over time due to the leak, as well as thelargest_memory_free_block
due to the fragmentation.