ewowi / StarBase

Try things out
GNU General Public License v3.0
6 stars 7 forks source link

Crash Report #22

Closed ewowi closed 4 months ago

ewowi commented 10 months ago

There is still an issue with stability when it comes to web sockets exchanging data with the ui. If the UI is closed and everything is controlled by E131/DMX nothing crashes so it is clearly related to web sockets.

I used all flavors of ESPAsyncWebServer but see no difference in stability:

https://github.com/me-no-dev/ESPAsyncWebServer.git https://github.com/aircoookie/ESPAsyncWebServer.git https://github.com/lost-hope/ESPAsyncWebServer.git#master https://github.com/ewowi/ESPAsyncWebServer.git

It looks like crashes will happen if you leave the UI alone, as long as you interact with the UI there are hardly any crashes, so probably related to UI going into sleep mode / closing connection.

Any idea how we can track the problem down and resolve it?

This is a typical one: CORRUPT HEAP: Bad head at 0x3ffdac8c. Expected 0xabba1234 got 0x3ffcb8d4

assert failed: multi_heap_free multi_heap_poisoning.c:253 (head != NULL)

Backtrace:0x40083959:0x3ffdf0000x4008ba89:0x3ffdf020 0x40090eb9:0x3ffdf040 0x40090aff:0x3ffdf170 0x40083dbd:0x3ffdf190 0x40090ee9:0x3ffdf1b0 0x40156ca5:0x3ffdf1d0 0x400e7410:0x3ffdf1f0 0x4016addf:0x3ffdf210 0x400e82c7:0x3ffdf230 0x400e8304:0x3ffdf250 0x400e8a5a:0x3ffdf270 0x400e8a69:0x3ffdf2a0 0x4015992b:0x3ffdf2c0 0x40159a98:0x3ffdf2f0 0x4015a1e9:0x3ffdf310

0 0x40083959:0x3ffdf000 in panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c:402

1 0x4008ba89:0x3ffdf020 in esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c:128

2 0x40090eb9:0x3ffdf040 in __assert_func at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/assert.c:85

3 0x40090aff:0x3ffdf170 in multi_heap_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/multi_heap_poisoning.c:253

  (inlined by) multi_heap_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/multi_heap_poisoning.c:245

4 0x40083dbd:0x3ffdf190 in heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:340

5 0x40090ee9:0x3ffdf1b0 in free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/heap.c:39

6 0x40156ca5:0x3ffdf1d0 in operator delete(void*) at /builds/idf/crosstool-NG/.build/HOST-x86_64-apple-darwin12/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/del_op.cc:49

7 0x400e7410:0x3ffdf1f0 in AsyncWebSocketMultiMessage::~AsyncWebSocketMultiMessage() at .pio/libdeps/esp32dev/ESPAsyncWebServerAircoookie/src/AsyncWebSocket.cpp:405

8 0x4016addf:0x3ffdf210 in std::_Function_handler<void (AsyncWebSocketMessage const&), AsyncWebSocketClient::AsyncWebSocketClient(AsyncWebServerRequest, AsyncWebSocket)::{lambda(AsyncWebSocketMessage)#2}>::_M_invoke(std::_Any_data const&, AsyncWebSocketMessage* const&) at .pio/libdeps/esp32dev/ESPAsyncWebServerAircoookie/src/AsyncWebSocket.cpp:466

  (inlined by) _M_invoke at /Users/ewoudwijma/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/std_function.h:297

9 0x400e82c7:0x3ffdf230 in std::function<void (AsyncWebSocketMessage const&)>::operator()(AsyncWebSocketMessage const&) const at /Users/ewoudwijma/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/std_function.h:687

10 0x400e8304:0x3ffdf250 in LinkedList<AsyncWebSocketMessage, LinkedListNode>::remove(AsyncWebSocketMessage const&) at .pio/libdeps/esp32dev/ESPAsyncWebServerAircoookie/src/StringArray.h:137

  (inlined by) AsyncWebSocketClient::_runQueue() at .pio/libdeps/esp32dev/ESPAsyncWebServerAircoookie/src/AsyncWebSocket.cpp:526

11 0x400e8a5a:0x3ffdf270 in AsyncWebSocketClient::_onAck(unsigned int, unsigned int) at .pio/libdeps/esp32dev/ESPAsyncWebServerAircoookie/src/AsyncWebSocket.cpp:513

12 0x400e8a69:0x3ffdf2a0 in std::_Function_handler<void (void, AsyncClient, unsigned int, unsigned int), AsyncWebSocketClient::AsyncWebSocketClient(AsyncWebServerRequest, AsyncWebSocket)::{lambda(void, AsyncClient, unsigned int, unsigned int)#4}>::_M_invoke(std::_Any_data const&, void&&, AsyncClient&&, unsigned int&&, AsyncClient*&&) at .pio/libdeps/esp32dev/ESPAsyncWebServerAircoookie/src/AsyncWebSocket.cpp:478

  (inlined by) _M_invoke at /Users/ewoudwijma/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/std_function.h:297

13 0x4015992b:0x3ffdf2c0 in std::function<void (void, AsyncClient, unsigned int, unsigned int)>::operator()(void, AsyncClient, unsigned int, unsigned int) const at /Users/ewoudwijma/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/std_function.h:687

  (inlined by) AsyncClient::_sent(tcp_pcb*, unsigned short) at .pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:898
  (inlined by) AsyncClient::_sent(tcp_pcb*, unsigned short) at .pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:893

14 0x40159a98:0x3ffdf2f0 in AsyncClient::_s_sent(void, tcp_pcb, unsigned short) at .pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1203

15 0x4015a1e9:0x3ffdf310 in _async_service_task(void*) at .pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:165

  (inlined by) _async_service_task at .pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:194
ewoudwijma commented 4 months ago

Solved