aZholtikov / zh_network

ESP32 ESP-IDF and ESP8266 RTOS SDK component (arduino library for ESP32 family) for ESP-NOW based mesh network.
Apache License 2.0
47 stars 6 forks source link

corrupt heap problem #3

Closed ecoenghk closed 9 months ago

ecoenghk commented 9 months ago

I've created a setup with seven devices. it send a broadcast message and also send a message to a non-existent MAC address in every 0.3s. Then I encountered a restart issue caused by a corrupted heap. sometime it happen at s_zh_network_processing. sometime it happen at s_zh_network_recv_cb. and the restart happen are so random.

here are some exception message from exception decoder happen at s_zh_network_processing 0x40377296: panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c line 408 0x4037c9a9: esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c line 137 0x403826c1: __assert_func at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/assert.c line 85 0x403822d1: multi_heap_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/multi_heap_poisoning.c line 259 0x40377975: heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c line 382 0x403826f1: free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/heap.c line 39 0x4200358b: zh_vector_delete_item (/Users/macbookpro/Arduino/libraries/zh_network-arduino-esp32/src/zh_vector.c line 75 0x42002b2d: s_zh_network_processing (/Users/macbookpro/Arduino/libraries/zh_network-arduino-esp32/src/zh_network.c line 20

sometime it happen at s_zh_network_recv_cb 0x40377296: panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c line 408 0x4037c9a9: esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c line 137 0x403826c1: __assert_func at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/assert.c line 85 0x4038238d: multi_heap_realloc at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/multi_heap_poisoning.c line 295 0x40377a42: heap_caps_realloc_base at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c line 434 0x40377ae5: heap_caps_realloc at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c line 465 0x40377b13: heap_caps_realloc_default at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c line 253 0x403826e1: realloc at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/heap.c line 34 0x4200360a: zh_vector_delete_item (/Users/macbookpro/Arduino/libraries/zh_network-arduino-esp32/src/zh_vector.c line 31 0x403752f9: s_zh_network_recv_cb (/Users/macbookpro/Arduino/libraries/zh_network-arduino-esp32/src/zh_network.c line 177 0x40375379: s_zh_network_recv_cb (/Users/macbookpro/Arduino/libraries/zh_network-arduino-esp32/src/zh_network.c line 16

aZholtikov commented 9 months ago

The ESP32/ESP8266 Arduino versions of zh_network have not been fully tested and have shown to be unstable (according to user feedbacks information). Both of these branches will be removed soon. Use versions for RTOS_SDK and ESF-IDF.