Closed dosipod closed 1 week ago
DEBUG from WLED 0.15.0-b7 Stimuli MQTT message to select preset 2 and then preset 3.
[MQTT LOG]
12:04:46 PM Topic wled/11020c/api Payload PL=2
12:04:50 PM Topic wled/11020c/status Payload offline
12:04:50 PM Topic wled/11020c/status Payload offline
12:04:50 PM Topic wled/11020c/g Payload 128
12:04:50 PM Topic wled/11020c/c Payload #0D39FF
12:04:50 PM Topic wled/11020c/status Payload online
12:04:50 PM Topic wled/11020c/v Payload <?xml version="1.0" ?>
[WLED SERIAL]
N9[1D][01]:5[05]"[05]Q[05][01]"=multiple clients.
JSON buffer released. (12)
---DEBUG INFO---
Runtime: 30000
Unix time: 30,000
Free heap: 181072
TX power: 75/78
Wifi state: 3
ESP-NOW state: 0
State time: 0
NTP last sync: 999000000
Client IP: 192.168.0.204
Loops/sec: 2034
Loop time[ms]: 0/717
UM time[ms]: 0/1
Strip time[ms]:0/26
Segments: 1 -> 68/0B
Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
Modes: 4187=748B
Data: 4187=748B
Map: 2*0=0B
Reconnecting MQTT
MQTT msg: wled/11020c/api
PL=2
JSON buffer locked. (15)
API req: win&PL=2
Playlist unloaded.
Request to apply preset: 2
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x401329d6 PS : 0x00060830 A0 : 0x8010b1b8 A1 : 0x3ffdd360
A2 : 0x00000000 A3 : 0x3ffdfa54 A4 : 0x3ffc3954 A5 : 0x0000003c
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x80123518 A9 : 0x3ffdd270
A10 : 0x000000ae A11 : 0x36943335 A12 : 0x36943335 A13 : 0x3ffc3954
A14 : 0x3ffdd2ac A15 : 0x3ffe1544 SAR : 0x00000004 EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000000c LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
ELF file SHA256: 0000000000000000
Backtrace: 0x401329d3:0x3ffdd360 0x4010b1b5:0x3ffdd3a0 0x40106646:0x3ffdd440 0x401c56c6:0x3ffdd4e0 0x40112a75:0x3ffdd500 0x401c589d:0x3ffdd570 0x40113cfe:0x3ffdd5a0 0x40112641:0x3ffdd5f0 0x401126d2:0x3ffdd660 0x40129d15:0x3ffdd680 0x40129d95:0x3ffdd6c0 0x4012a3c6:0x3ffdd6e0 0x4008cd1e:0x3ffdd710
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DOUT, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8
---WLED 0.15.0-b7 2410270 INIT---
esp32 v3.3.6-16-gcc5440f6a2 arduino-esp32 v1.0.x
CPU: ESP32-D0WDQ6 rev.1, 2 core(s), 240 MHz. FLASH: 4 MB, Mode 3 (DOUT), speed 40 MHz. heap 308288 JSON buffer allocated: 32767 TX power: 78/78 PIN ALLOC: Pin 1 successfully allocated by 0x89. PIN ALLOC: 0x00000000000002. Registering usermods ... heap 275276 Reading config Reading settings from /wsec.json... JSON buffer locked. (3) JSON buffer released. (3) JSON buffer locked. (1) Reading settings from /cfg.json... Heap before buses: 272960 Removing all. Maximum LEDs on a bus: 30 Digital buses: 1 PIN ALLOC: Pin 16 successfully allocated by 0x82. PIN ALLOC: 0x00000000010002. Successfully inited strip 0 (len 30) with type 22 and pins 16,255 (itype 23). mA=55/850 LED buffer size: 270B Heap after buses: 272032 PIN ALLOC: Pin 0 successfully allocated by 0x85. PIN ALLOC: 0x00000000010003. Starting usermod config. JSON buffer released. (1) heap 271988 Initializing strip Loading custom palettes Loading custom ledmaps Playlist unloaded. Request to apply preset: 1 heap 271784 Usermods setup PIN ALLOC: Pin 15 successfully allocated by 0x20. PIN ALLOC: 0x00000000018003. PIN ALLOC: Pin 32 successfully allocated by 0x20. PIN ALLOC: 0x00000100018003. PIN ALLOC: Pin 14 successfully allocated by 0x20. PIN ALLOC: 0x0000010001C003. heap 266620 Defaulf WiFi used. Ada initServer heap 211960 initIR heap 211960 Initial connect or forced reconnect. Defaulf WiFi used. initConnection() called. Access point disabled (init). Connecting to Anthem... JSON buffer locked. (9) Applying preset: 1 JSON buffer released. (9) Loop took 52ms. Usermods took 0ms. Strip took 26ms. Loop took 717ms. Usermods took 0ms. Strip took 0ms.
Connected! IP address: 192.168.0.204
Init STA interfaces
mDNS started
Reconnecting MQTT
Reconnecting MQTT
Loop took 34ms.
Usermods took 0ms.
Strip took 0ms.
MQTT ready
Publish MQTT
---DEBUG INFO---
Runtime: 30000
Unix time: 30,000
Free heap: 181848
TX power: 76/78
Wifi state: 3
ESP-NOW state: 0
State time: 0
NTP last sync: 999000000
Client IP: 192.168.0.204
Loops/sec: 1862
Loop time[ms]: 0/717
UM time[ms]: 0/1
Strip time[ms]:0/26
Segments: 1 -> 68/0B
Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
Modes: 4187=748B
Data: 4187=748B
Map: 20=0B
Reconnecting MQTT
WS client connected.
JSON buffer locked. (12)
JSON buffer size: 2641 for WS request (1505).
heap 178884
Sending WS data to a single client.
JSON buffer released. (12)
Local time: 00:01
---DEBUG INFO---
Runtime: 60020
Unix time: 60,020
Free heap: 181096
TX power: 76/78
Wifi state: 3
ESP-NOW state: 0
State time: 0
NTP last sync: 999000000
Client IP: 192.168.0.204
Loops/sec: 1757
Loop time[ms]: 0/12
UM time[ms]: 0/1
Strip time[ms]:0/11
Segments: 1 -> 68/0B
Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
Modes: 4187=748B
Data: 4187=748B
Map: 20=0B
Reconnecting MQTT
---DEBUG INFO---
Runtime: 90040
Unix time: 90,040
Free heap: 181096
TX power: 76/78
Wifi state: 3
ESP-NOW state: 0
State time: 0
NTP last sync: 999000000
Client IP: 192.168.0.204
Loops/sec: 1792
Loop time[ms]: 0/3
UM time[ms]: 0/1
Strip time[ms]:0/1
Segments: 1 -> 68/0B
Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
Modes: 4187=748B
Data: 4187=748B
Map: 2*0=0B
MQTT msg: wled/11020c/api
PL=3
JSON buffer locked. (15)
API req: win&PL=3
Playlist unloaded.
Request to apply preset: 3
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x401329d6 PS : 0x00060230 A0 : 0x8010b1b8 A1 : 0x3ffdd360
A2 : 0x00000000 A3 : 0x3ffdff6c A4 : 0x3ffc3954 A5 : 0x0000003c
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x80123518 A9 : 0x3ffdd270
A10 : 0x000000ae A11 : 0xf85bc5dd A12 : 0xf85bc5dd A13 : 0x3ffc3954
A14 : 0x3ffdd2ac A15 : 0x3ffe1474 SAR : 0x00000010 EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000000c LBEG : 0x4000c349 LEND : 0x4000c36b LCOUNT : 0x00000000
ELF file SHA256: 0000000000000000
Backtrace: 0x401329d3:0x3ffdd360 0x4010b1b5:0x3ffdd3a0 0x40106646:0x3ffdd440 0x401c56c6:0x3ffdd4e0 0x40112a75:0x3ffdd500 0x401c589d:0x3ffdd570 0x40113cfe:0x3ffdd5a0 0x40112641:0x3ffdd5f0 0x401126d2:0x3ffdd660 0x40129d15:0x3ffdd680 0x40129d95:0x3ffdd6c0 0x4012a3c6:0x3ffdd6e0 0x4008cd1e:0x3ffdd710
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DOUT, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8
---WLED 0.15.0-b7 2410270 INIT---
esp32 v3.3.6-16-gcc5440f6a2 arduino-esp32 v1.0.x
CPU: ESP32-D0WDQ6 rev.1, 2 core(s), 240 MHz. FLASH: 4 MB, Mode 3 (DOUT), speed 40 MHz. heap 308292 JSON buffer allocated: 32767 TX power: 78/78 PIN ALLOC: Pin 1 successfully allocated by 0x89. PIN ALLOC: 0x00000000000002. Registering usermods ... heap 275280 Reading config Reading settings from /wsec.json... JSON buffer locked. (3) JSON buffer released. (3) JSON buffer locked. (1) Reading settings from /cfg.json... Heap before buses: 272964 Removing all. Maximum LEDs on a bus: 30 Digital buses: 1 PIN ALLOC: Pin 16 successfully allocated by 0x82. PIN ALLOC: 0x00000000010002. Successfully inited strip 0 (len 30) with type 22 and pins 16,255 (itype 23). mA=55/850 LED buffer size: 270B Heap after buses: 272036 PIN ALLOC: Pin 0 successfully allocated by 0x85. PIN ALLOC: 0x00000000010003. Starting usermod config. JSON buffer released. (1) heap 271992 Initializing strip Loading custom palettes Loading custom ledmaps Playlist unloaded. Request to apply preset: 1 heap 271788 Usermods setup PIN ALLOC: Pin 15 successfully allocated by 0x20. PIN ALLOC: 0x00000000018003. PIN ALLOC: Pin 32 successfully allocated by 0x20. PIN ALLOC: 0x00000100018003. PIN ALLOC: Pin 14 successfully allocated by 0x20. PIN ALLOC: 0x0000010001C003. heap 266624 Defaulf WiFi used. Ada initServer heap 211964 initIR heap 211964 Initial connect or forced reconnect. Defaulf WiFi used. initConnection() called. Access point disabled (init). Connecting to Anthem... JSON buffer locked. (9) Applying preset: 1 JSON buffer released. (9) Loop took 53ms. Usermods took 0ms. Strip took 26ms. Loop took 717ms. Usermods took 0ms. Strip took 0ms.
Connected! IP address: 192.168.0.204 Init STA interfaces mDNS started Reconnecting MQTT Reconnecting MQTT Loop took 35ms. Usermods took 0ms. Strip took 0ms. MQTT ready Publish MQTT
A repeatable crash, my favorite kind!
Thanks for the report! This was indeed my fault. ;) Fix is in PR #4271.
That was quick , thank you @willmmiles , I tested PL and other HTTP apis and they all worked without any crashes and unit is stable . @mcsSolutions kindly test the same as you are technically the owner of this issue . Just out of curiosity why you are not using json apis ?
Confirming crash in AWS.
Playlist unloaded.
Request to apply preset: 1
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x40135f32 PS : 0x00060130 A0 : 0x80107ddc A1 : 0x3ffe79c0
A2 : 0x00000000 A3 : 0x3ffebbac A4 : 0x3ffc8d54 A5 : 0x0000000f
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x80126bc8 A9 : 0x3ffe78d0
A10 : 0x000000b2 A11 : 0x0d0db0f9 A12 : 0x0d0db0f9 A13 : 0x3ffc8d54
A14 : 0x3ffe790c A15 : 0x3ffecb20 SAR : 0x00000004 EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000000c LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
ELF file SHA256: 0000000000000000
Backtrace: 0x40135f32:0x3ffe79c0 0x40107dd9:0x3ffe7a00 0x401033ea:0x3ffe7ab0 0x401cca06:0x3ffe7b50 0x4010c6d5:0x3ffe7b70 0x401ccc55:0x3ffe7be0 0x4010d972:0x3ffe7c10 0x4010c291:0x3ffe7c60 0x4010c322:0x3ffe7cd0 0x4012d49d:0x3ffe7cf0 0x4012d51d:0x3ffe7d30 0x4012db4e:0x3ffe7d50 0x4008d55e:0x3ffe7d80
#0 0x40135f32:0x3ffe79c0 in AsyncWebServerRequest::send(AsyncWebServerResponse*) at .pio/libdeps/wemos_d1_mini32_debug/ESPAsyncWebServerWLED/src/WebRequest.cpp:1015
#1 0x40107dd9:0x3ffe7a00 in handleSet(AsyncWebServerRequest*, String const&, bool) at wled00/set.cpp:1196
#2 0x401033ea:0x3ffe7ab0 in onMqttMessage(char*, char*, AsyncMqttClientMessageProperties, unsigned int, unsigned int, unsigned int) at wled00/mqtt.cpp:112
#3 0x401cca06:0x3ffe7b50 in std::_Function_handler<void (char*, char*, AsyncMqttClientMessageProperties, unsigned int, unsigned int, unsigned int), void (*)(char*, char*, AsyncMqttClientMessageProperties, unsigned int, unsigned int, unsigned int)>::_M_invoke(std::_Any_data const&, char*&&, char*&&, AsyncMqttClientMessageProperties&&, unsigned int&&, unsigned int&&, unsigned int&&) at /Users/blaz/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:1871
#4 0x4010c6d5:0x3ffe7b70 in std::function<void (char*, char*, AsyncMqttClientMessageProperties, unsigned int, unsigned int, unsigned int)>::operator()(char*, char*, AsyncMqttClientMessageProperties, unsigned int, unsigned int, unsigned int) const at wled00/src/dependencies/async-mqtt-client/AsyncMqttClient.cpp:50
(inlined by) AsyncMqttClient::_onMessage(char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short) at wled00/src/dependencies/async-mqtt-client/AsyncMqttClient.cpp:523
#5 0x401ccc55:0x3ffe7be0 in void std::_Mem_fn_base<void (AsyncMqttClient::*)(char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short), true>::operator()<char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short, void>(AsyncMqttClient*, char*&&, char*&&, unsigned char&&, bool&&, bool&&, unsigned int&&, unsigned int&&, unsigned int&&, unsigned short&&) const at /Users/blaz/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:600
(inlined by) void std::_Bind<std::_Mem_fn<void (AsyncMqttClient::*)(char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short)> (AsyncMqttClient*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>, std::_Placeholder<4>, std::_Placeholder<5>, std::_Placeholder<6>, std::_Placeholder<7>, std::_Placeholder<8>, std::_Placeholder<9>)>::__call<void, char*&&, char*&&, unsigned char&&, bool&&, bool&&, unsigned int&&, unsigned int&&, unsigned int&&, unsigned short&&, 0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u, 9u>(std::tuple<char*&&, char*&&, unsigned char&&, bool&&, bool&&, unsigned int&&, unsigned int&&, unsigned int&&, unsigned short&&>&&, std::_Index_tuple<0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u, 9u>) at /Users/blaz/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:1074
(inlined by) void std::_Bind<std::_Mem_fn<void (AsyncMqttClient::*)(char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short)> (AsyncMqttClient*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>, std::_Placeholder<4>, std::_Placeholder<5>, std::_Placeholder<6>, std::_Placeholder<7>, std::_Placeholder<8>, std::_Placeholder<9>)>::operator()<char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short, void>(char*&&, char*&&, unsigned char&&, bool&&, bool&&, unsigned int&&, unsigned int&&, unsigned int&&, unsigned short&&) at /Users/blaz/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:1133
(inlined by) std::_Function_handler<void (char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short), std::_Bind<std::_Mem_fn<void (AsyncMqttClient::*)(char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short)> (AsyncMqttClient*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>, std::_Placeholder<4>, std::_Placeholder<5>, std::_Placeholder<6>, std::_Placeholder<7>, std::_Placeholder<8>, std::_Placeholder<9>)> >::_M_invoke(std::_Any_data const&, char*&&, char*&&, unsigned char&&, bool&&, bool&&, unsigned int&&, unsigned int&&, unsigned int&&, unsigned short&&) at /Users/blaz/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:1871
#6 0x4010d972:0x3ffe7c10 in std::function<void (char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short)>::operator()(char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short) const at /Users/blaz/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:2271
(inlined by) AsyncMqttClientInternals::PublishPacket::parsePayload(char*, unsigned int, unsigned int*) at wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PublishPacket.cpp:83
#7 0x4010c291:0x3ffe7c60 in AsyncMqttClient::_onData(AsyncClient*, char*, unsigned int) at wled00/src/dependencies/async-mqtt-client/AsyncMqttClient.cpp:50
#8 0x4010c322:0x3ffe7cd0 in std::_Function_handler<void (void*, AsyncClient*, void*, unsigned int), AsyncMqttClient::AsyncMqttClient()::{lambda(void*, AsyncClient*, void*, unsigned int)#6}>::_M_invoke(std::_Any_data const&, void*&&, AsyncClient*&&, std::_Any_data const&, unsigned int&&) at wled00/src/dependencies/async-mqtt-client/AsyncMqttClient.cpp:50
(inlined by) _M_invoke at /Users/blaz/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:1871
#9 0x4012d49d:0x3ffe7cf0 in std::function<void (void*, AsyncClient*, void*, unsigned int)>::operator()(void*, AsyncClient*, void*, unsigned int) const at .pio/libdeps/wemos_d1_mini32_debug/AsyncTCP@src-39de97abf7348c44d4dda815b8aab0ae/src/AsyncTCP.cpp:1076
(inlined by) AsyncClient::_recv(tcp_pcb*, pbuf*, signed char) at .pio/libdeps/wemos_d1_mini32_debug/AsyncTCP@src-39de97abf7348c44d4dda815b8aab0ae/src/AsyncTCP.cpp:968
#10 0x4012d51d:0x3ffe7d30 in AsyncClient::_s_recv(void*, tcp_pcb*, pbuf*, signed char) at .pio/libdeps/wemos_d1_mini32_debug/AsyncTCP@src-39de97abf7348c44d4dda815b8aab0ae/src/AsyncTCP.cpp:1076
#11 0x4012db4e:0x3ffe7d50 in _async_service_task(void*) at .pio/libdeps/wemos_d1_mini32_debug/AsyncTCP@src-39de97abf7348c44d4dda815b8aab0ae/src/AsyncTCP.cpp:1076
(inlined by) _async_service_task at .pio/libdeps/wemos_d1_mini32_debug/AsyncTCP@src-39de97abf7348c44d4dda815b8aab0ae/src/AsyncTCP.cpp:201
#12 0x4008d55e:0x3ffe7d80 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6360
entry 0x400806b4
What happened?
Crashes when using HTTP API within MQTT . I am raising this on behave of @mcsSolutions as it is also confirmed from our side .Original post on discord https://discord.com/channels/473448917040758787/779395228624617512/1304888652161220729
( I never used nor will use HTTP API within MQTT but only helping log this )
To Reproduce Bug
User PL=1 with mqtt
Expected Behavior
No crash
Install Method
Self-Compiled
What version of WLED?
0.15.0-b7 (build 2410270)
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
Anything else?
MQTT_PL_CRASH.txt
Code of Conduct