Min Free Heap drop over time ( #10853
Unanswered
andrevipid
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello I have used esp32 connecting to multiple BLE Sensors (servers). In addition to that I have a buffer where I add measreuments from sensors and when it reachs maximum readings for the period (like every 1 minute) it activate a task that send the data to AWS via MQTT.
It runs free of cpu load, very smoothly, however after couple of minutes it starts dropping the min_free_heap over time:
Green: Free heap
Yellow: Min free heap
After dropping overtime it reachs low memory, an error like that appears:
2025-01-08 10:24:53 --> CORRUPT HEAP: Bad head at 0x3ffdfb30. Expected 0xabba1234 got 0x3ffcb4bc
2025-01-08 10:24:53 -->
2025-01-08 10:24:53 --> assert failed: multi_heap_free multi_heap_poisoning.c:279 (head != NULL)
2025-01-08 10:24:53 -->
2025-01-08 10:24:53 -->
2025-01-08 10:24:53 --> Backtrace: 0x4008253d:0x3ffd3430 0x400943a9:0x3ffd3450 0x4009a7c6:0x3ffd3470 0x400994cf:0x3ffd35a0 0x4008354f:0x3ffd35c0 0x4009a7f9:0x3ffd35e0 0x401745fd:0x3ffd3600 0x40173605:0x3ffd3620 0x400d5183:0x3ffd3640 0x400d7215:0x3ffd3660 0x400d7279:0x3ffd3690 0x400d29bd:0x3ffd36b0 0x400d5b2b:0x3ffd3700 0x400db909:0x3ffd3760 0x400dc5d2:0x3ffd3780 0x400dc5f8:0x3ffd37e0 0x400e0baa:0x3ffd3840 0x400e0ddd:0x3ffd3860 0x400dfa39:0x3ffd3880 0x40081341:0x3ffd38a0 0x400d606f:0x3ffd38c0 0x400954a6:0x3ffd38e0
I do not want to modify my code to track that on ESP IDF because I am using nimBLE library and do not want to modify deeper what is used for arduino firmware on esp32.
Is there anyway to fix that or better investigate ? I am just able to see tasks allocation and task execution time and all seems okay:
2025-01-13 19:56:15 --> ---- Heap Statistics ----
2025-01-13 19:56:15 --> Free Heap: 65248 bytes
2025-01-13 19:56:15 --> Minimum Free Heap: 18600 bytes
2025-01-13 19:56:15 --> free block maximum/biggest: 59380 bytes
2025-01-13 19:56:15 --> free blocks: 18
2025-01-13 19:56:15 --> allocation: 426
2025-01-13 19:56:15 --> total free memory: 65248 bytes
2025-01-13 19:56:15 --> total allocated memory: 174744 bytes
2025-01-13 19:56:15 --> ---- Tasks List ----
2025-01-13 19:56:15 --> Task Name.State.Priority.Stack.Task#
2025-01-13 19:56:15 --> loopTask .X.1.4940.8.1
2025-01-13 19:56:15 --> IDLE1 .R.0.580.6.1
2025-01-13 19:56:15 --> IDLE0 .R.0.464.5.0
2025-01-13 19:56:15 --> Tmr Svc .B.1.3384.7.-1
2025-01-13 19:56:15 --> Performance Tas.B.1.1612.17.-1
2025-01-13 19:56:15 --> MQTT Task .B.1.3564.16.1
2025-01-13 19:56:15 --> tiT .B.18.2992.12.0
2025-01-13 19:56:15 --> ipc1 .S.24.476.2.1
2025-01-13 19:56:15 --> ipc0 .S.1.332.1.0
2025-01-13 19:56:15 --> nimble_host .B.21.1904.11.0
2025-01-13 19:56:15 --> wifi .B.23.4340.15.0
2025-01-13 19:56:15 --> esp_timer .S.22.7824.3.0
2025-01-13 19:56:15 --> btController .B.23.2092.10.0
2025-01-13 19:56:15 --> sys_evt .B.20.2940.13.0
2025-01-13 19:56:15 --> arduino_events .B.19.2368.14.1
2025-01-13 19:56:15 --> ---- Task Execution time ----
2025-01-13 19:56:15 --> Task Name.Runtime.Percentage
2025-01-13 19:56:15 --> loopTask .12158103..<1%
2025-01-13 19:56:15 --> IDLE1 .1395156752..99%
2025-01-13 19:56:15 --> IDLE0 .1236219156..87%
2025-01-13 19:56:15 --> Tmr Svc .498326..<1%
2025-01-13 19:56:15 --> Performance Tas.198104..<1%
2025-01-13 19:56:15 --> MQTT Task .807600..<1%
2025-01-13 19:56:15 --> tiT .5976641..<1%
2025-01-13 19:56:15 --> ipc0 .217193..<1%
2025-01-13 19:56:15 --> nimble_host .15268041..1%
2025-01-13 19:56:15 --> sys_evt .1815..<1%
2025-01-13 19:56:15 --> btController .51594465..3%
2025-01-13 19:56:15 --> wifi .83647874..5%
2025-01-13 19:56:15 --> esp_timer .15099853..1%
2025-01-13 19:56:15 --> arduino_events .1132..<1%
2025-01-13 19:56:15 --> ipc1 .49617..<1%
Beta Was this translation helpful? Give feedback.
All reactions