-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Exception (3) crashes in umm_malloc_core #1251
Comments
This is another crash, again in umm_malloc_cpp:635 :
|
Looks like hardware issue. Check your power supply.
Sent from Yahoo Mail for iPhone
On Monday, December 19, 2022, 11:15 AM, mamama1 ***@***.***> wrote:
This is another crash, again in umm_malloc_cpp:635 :
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Exception (3):
epc1=0x40100ff2 epc2=0x00000000 epc3=0x00000000 excvaddr=0x4001ef20 depc=0x00000000
LoadStoreError: Processor internal physical address or data error during load or store
epc1=0x40100ff2 in umm_malloc_core at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266\umm_malloc/umm_malloc.cpp:635
LoadStoreError: Processor internal physical address or data error during load or store
epc1=0x40100ff2 in umm_malloc_core at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266\umm_malloc/umm_malloc.cpp:635
>>stack>>>
ctx: cont
sp: 3ffffc50 end: 3fffffc0 offset: 0190
3ffffde0: 20363534 30303028 29303030 00000065
3ffffdf0: 3fff1bfc 00000020 00000066 00000065
3ffffe00: 00000000 00000020 00000008 40101375
3ffffe10: 39203163 4020c4d2 00000008 40226367
3ffffe20: 00000000 3fff1dfc 3fff5d84 4020c4d2
3ffffe30: 00000000 3ffffe40 0000000c 40205004
3ffffe40: 12d5469b 3ffffeb8 3fff1be8 3fff26b0
3ffffe50: 3fff1dfc 3fff1bfc 3fff1dfc 4020d57f
3ffffe60: 3fff26b4 3fff1bfc 3fff1be8 40205b60
3ffffe70: 00000063 62ff1655 b4721e53 00000090
3ffffe80: 00000000 4bc6a7f0 3fa0040d 67ae147a
3ffffe90: 00000000 00000000 4bc6a7f0 00000000
3ffffea0: 00000000 00000000 40100af5 00000000
3ffffeb0: 3ffffecc 3fff1be8 3ffffecc 3fff1be8
3ffffec0: 40229c10 40204e10 3f9f0212 00000063
3ffffed0: 3fff5e2c 4bc6a7f0 3fa014fb bd2f1a9f
3ffffee0: 00000000 00000000 4bc6a7f0 00000000
3ffffef0: 4010645a 3fff0d28 40100af5 00000000
3fffff00: 001049bf 3fff2494 00000000 00000001
3fffff10: 12d545b2 3fff32fc 00000004 3fff31e8
3fffff20: 3fff4d34 4020a208 00000004 3fff31e8
3fffff30: 3fffdad0 00000000 3fff2494 3fff31e8
3fffff40: 3fffdad0 00000000 3ffe8910 40206c72
3fffff50: 007a1200 cc320b8c 00000000 00000001
3fffff60: 00000000 00000000 40229c68 40229c54
3fffff70: 007a1200 cc320a1b 00005d00 00000914
3fffff80: 00000000 00000000 00000001 401005d0
3fffff90: 3fffdad0 00000000 3ffe8910 3fff31e8
3fffffa0: 3fffdad0 00000000 3ffe8910 402267ea
3fffffb0: feefeffe feefeffe feefeffe 40101751
<<<stack<<<
0x40101375 in malloc at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266\umm_malloc/umm_malloc.cpp:821
0x4020c4d2 in LinkedListNode<AsyncWebSocketMessageBuffer*>::LinkedListNode(AsyncWebSocketMessageBuffer*) at .pio\libdeps\ESP8266\ESP Async WebServer\src/StringArray.h:32
(inlined by) LinkedList<AsyncWebSocketMessageBuffer*, LinkedListNode>::add(AsyncWebSocketMessageBuffer* const&) at .pio\libdeps\ESP8266\ESP Async WebServer\src/StringArray.h:67
(inlined by) AsyncWebSocket::makeBuffer(unsigned char*, unsigned int) at .pio\libdeps\ESP8266\ESP Async WebServer\src/AsyncWebSocket.cpp:1222
0x40226367 in operator new(unsigned int) at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/abi.cpp:41
0x4020c4d2 in LinkedListNode<AsyncWebSocketMessageBuffer*>::LinkedListNode(AsyncWebSocketMessageBuffer*) at .pio\libdeps\ESP8266\ESP Async WebServer\src/StringArray.h:32
(inlined by) LinkedList<AsyncWebSocketMessageBuffer*, LinkedListNode>::add(AsyncWebSocketMessageBuffer* const&) at .pio\libdeps\ESP8266\ESP Async WebServer\src/StringArray.h:67
(inlined by) AsyncWebSocket::makeBuffer(unsigned char*, unsigned int) at .pio\libdeps\ESP8266\ESP Async WebServer\src/AsyncWebSocket.cpp:1222
0x40205004 in std::__cxx11::list<WebSocketTask*, std::allocator<WebSocketTask*> >::remove(WebSocketTask* const&) at c:\users\neumluc.nnet\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\10.3.0\ext/new_allocator.h:133
0x4020d57f in AsyncWebSocket::textAll(char const*, unsigned int) at .pio\libdeps\ESP8266\ESP Async WebServer\src/AsyncWebSocket.cpp:971
0x40205b60 in WebSocketTaskProcessor::ProcessTasks() at src/WebSocketTaskProcessor.cpp:550
0x40100af5 in millis at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/core_esp8266_wiring.cpp:188
0x40229c10 in std::_Function_handler<void (char*), WebSocketTaskProcessor::ProcessTasks()::{lambda(char*)#1}>::_M_manager(std::_Any_data&, std::_Function_handler<void (char*), WebSocketTaskProcessor::ProcessTasks()::{lambda(char*)#1}> const&, std::_Manager_operation) at c:\users\neumluc.nnet\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\10.3.0\bits/std_function.h:271
0x40204e10 in std::_Function_handler<void (char*), WebSocketTaskProcessor::ProcessTasks()::{lambda(char*)#1}>::_M_invoke(std::_Any_data const&, char*&&) at c:\users\neumluc.nnet\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\10.3.0\bits/std_function.h:289
0x40101375 in malloc at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266\umm_malloc/umm_malloc.cpp:821
0x4020c4d2 in LinkedListNode<AsyncWebSocketMessageBuffer*>::LinkedListNode(AsyncWebSocketMessageBuffer*) at .pio\libdeps\ESP8266\ESP Async WebServer\src/StringArray.h:32
(inlined by) LinkedList<AsyncWebSocketMessageBuffer*, LinkedListNode>::add(AsyncWebSocketMessageBuffer* const&) at .pio\libdeps\ESP8266\ESP Async WebServer\src/StringArray.h:67
(inlined by) AsyncWebSocket::makeBuffer(unsigned char*, unsigned int) at .pio\libdeps\ESP8266\ESP Async WebServer\src/AsyncWebSocket.cpp:1222
0x40226367 in operator new(unsigned int) at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/abi.cpp:41
0x4020c4d2 in LinkedListNode<AsyncWebSocketMessageBuffer*>::LinkedListNode(AsyncWebSocketMessageBuffer*) at .pio\libdeps\ESP8266\ESP Async WebServer\src/StringArray.h:32
(inlined by) LinkedList<AsyncWebSocketMessageBuffer*, LinkedListNode>::add(AsyncWebSocketMessageBuffer* const&) at .pio\libdeps\ESP8266\ESP Async WebServer\src/StringArray.h:67
(inlined by) AsyncWebSocket::makeBuffer(unsigned char*, unsigned int) at .pio\libdeps\ESP8266\ESP Async WebServer\src/AsyncWebSocket.cpp:1222
0x40205004 in std::__cxx11::list<WebSocketTask*, std::allocator<WebSocketTask*> >::remove(WebSocketTask* const&) at c:\users\neumluc.nnet\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\10.3.0\ext/new_allocator.h:133
0x4020d57f in AsyncWebSocket::textAll(char const*, unsigned int) at .pio\libdeps\ESP8266\ESP Async WebServer\src/AsyncWebSocket.cpp:971
0x40205b60 in WebSocketTaskProcessor::ProcessTasks() at src/WebSocketTaskProcessor.cpp:550
0x40100af5 in millis at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/core_esp8266_wiring.cpp:188
0x40229c10 in std::_Function_handler<void (char*), WebSocketTaskProcessor::ProcessTasks()::{lambda(char*)#1}>::_M_manager(std::_Any_data&, std::_Function_handler<void (char*), WebSocketTaskProcessor::ProcessTasks()::{lambda(char*)#1}> const&, std::_Manager_operation) at c:\users\neumluc.nnet\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\10.3.0\bits/std_function.h:271
0x40204e10 in std::_Function_handler<void (char*), WebSocketTaskProcessor::ProcessTasks()::{lambda(char*)#1}>::_M_invoke(std::_Any_data const&, char*&&) at c:\users\neumluc.nnet\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\10.3.0\bits/std_function.h:289
0x4010645a in wdt_feed at ??:?
0x40100af5 in millis at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/core_esp8266_wiring.cpp:188
0x4020a208 in ESP8266WiFiSTAClass::status() at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.cpp:527
0x40206c72 in loop at src/main.cpp:229
0x40229c68 in std::_Function_handler<void (bool), void (*)(bool)>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) at c:\users\neumluc.nnet\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\10.3.0\bits/std_function.h:271
0x40229c54 in std::_Function_handler<void (bool), void (*)(bool)>::_M_invoke(std::_Any_data const&, bool&&) at c:\users\neumluc.nnet\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\10.3.0\bits/std_function.h:289
0x401005d0 in ets_post at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/core_esp8266_main.cpp:181
0x402267ea in loop_wrapper() at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/core_esp8266_main.cpp:201
0x40101751 in cont_wrapper at C:\Users\neumluc.NNET\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/cont.S:81
…--------------- CUT HERE FOR EXCEPTION DECODER ---------------
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
I'll attach a scope to it, but I doubt it. ESP8266 has a 1000uF electrolytic cap (nichicon) very near and is connected via a short, high quality USB cable to a powered USB hub... |
Another variant of the crash, provoked by the same action:
|
Now a very short crash:
|
And another one, remember - all goes away if I do not delete my WebSocketTask *currentTask as mentioned in the first post.
|
yet another variant:
|
Oh wow, we got a 28
|
Now I got the exception from my 2nd post again. So it is not absolutely random but the same bunch of exceptions seems to be repeating. Sometimes I can go bonkers in the webinterface without anything happening and sometimes it crashes almost every click. I guess that happens when you do much stuff asynchronously... Not easy to debug. |
Getting similar backtraces with what is likely related if not the same issue with the 8266. I'm using web sockets and serving pages, operating as AP_STA, with various networking operations such as network scans triggered from loop as required, I found adding a call to yield() in various points in loop helped, but there can still be instability. Receiving pongs from a couple of clients after a pingAll() tends to lead to a crash soon after as well. The ottowinter esphome port seems preferable as it's smaller and uses around 10K less ram, but the ping/pong issues remains unfortunately. |
Hi
what follows is an exception trace I can reproduce by running a specific action in the web interface of my firmware.
I am afraid I won't be able to post a minimal sketch to reproduce on your side due to the massive complexity of the project. I could however share the complete source code if that helps, but it ain't very easy to set up the build environment.
I'm using the latest version of ESPAsyncWebServer and ESPAsyncTCP from platformio registry and latest Arduino Core 3.0.2.
I'm hoping for clues or general advice whether I'm likely to do something wrong or whether a bug in ESPAsyncWebServer is possible or likely or whether maybe this could even be a bug in the Arduino Core. As far as I'm aware, I'm not doing any slow/blocking stuff while I'm in sys context and I do a delay frequently in the main loop. Overall the whole code should be very non-blocking.
If some work is incoming through eg the webinterface, we queue it into a task list which then is worked on by a task processor, for example.
Any guidance would be highly appreciated. The only clue I have is, that this crash doesn't seem to occur if I in my task processor do not delete the last task it was working on, creating a memory leak, obviously. As far as I can tell, nothing is referencing to the deleted task later on, so I have no idea why deleting it could cause a crash. I delete the task like this, at the end of the function:
The line
0x40205bcc in WebSocketTaskProcessor::ProcessTasks() at src/WebSocketTaskProcessor.cpp:577
from the stack trace btw points to the snippet above, to the line "currentTask = NULL;". But the exceptions vary and sometimes I get a 3 and sometimes a 9. Sometimes the trace is way shorter also.
currentTask is
WebSocketTask *currentTask = this->Tasks.front();
WebSocketTask is a class:
and Tasks is a list:
std::list<WebSocketTask *> Tasks;
The text was updated successfully, but these errors were encountered: