Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
14.99k stars 3.24k forks source link

ESP8266 websockets causing crash #3686

Closed casesolved-co-uk closed 10 months ago

casesolved-co-uk commented 10 months ago

What happened?

Clicking 10 - 20 times on the colour wheel causes a crash whilst DMX is outputting. I'm using my own DMX driver but anything sending effect data over a HardwareSerial driver should be sufficient to cause it.

The WDT reset below doesn’t happen if I use WLED_DISABLE_WEBSOCKETS

Also tried with the following with a similar result except outputs a stack trace:

  -D WLED_DISABLE_LOXONE
  -D WLED_DISABLE_ADALIGHT
  -D WLED_DISABLE_MQTT
  -D WLED_DISABLE_HUESYNC

Here’s the reset output:

heap 14992
Sending WS data to multiple clients.
JSON buffer released. (12)

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 3424, room 16 
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8 
tail 0
chksum 0x2b
csum 0x2b
v000c7a00
~ld
����'�;��'|�$�$ c��|;�l�g�
                          �o�l`��s�l�l
                                      �
---WLED 0.14.1 2401141 INIT---

To Reproduce Bug

Clicking lots of times on the colour wheel causes a crash whilst DMX is outputting. I'm using my own DMX driver but anything sending effect data over a HardwareSerial driver should be sufficient to cause it.

Expected Behavior

I can click anything as much as I want with WLED_DISABLE_WEBSOCKETS and no crash

Install Method

Self-Compiled

What version of WLED?

WLED 0.14.1 2401141

Which microcontroller/board are you seeing the problem on?

ESP8266

Relevant log/trace output

heap 14992
Sending WS data to multiple clients.
JSON buffer released. (12)

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 3424, room 16 
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8 
tail 0
chksum 0x2b
csum 0x2b
v000c7a00
~ld
����'�;��'|�$�$ c��|;�l�g�
                          �o�l`��s�l�l
                                      �
---WLED 0.14.1 2401141 INIT---

With other things disabled:

heap 14208
Sending WS data to multiple clients.
JSON buffer released. (12)

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Exception (28):
epc1=0x402736fe epc2=0x00000000 epc3=0x00000000 excvaddr=0x10500000 depc=0x00000000

LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads
  epc1=0x402736fe in pbuf_clen at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/pbuf.c:816

>>>stack>>>

ctx: sys
sp: 3fffecf0 end: 3fffffb0 offset: 0150
3fffee40:  0000ffff 00000000 00003a98 00000000  
3fffee50:  00000000 3ffeaac4 00000000 3fff3e38  
3fffee60:  3fff3e44 3fff751c 3fff3e48 4026bcdd  
3fffee70:  3fff6498 3fff648c 4028fecb 3fff3bc8  
3fffee80:  3fff3df0 3fff3bc8 3fff79cc 3fff3e38  
3fffee90:  3fff751c 3fff3e3c 3fff3e3d 4026cf7a  
3fffeea0:  4028f148 3ffee6c8 0000e858 00000008  
3fffeeb0:  00000010 00000000 00000020 401016c0  
3fffeec0:  00000000 3fff79b4 0000001d 3fff3bc8  
3fffeed0:  3fff3df0 3fff79ea 3fff79cc 40272329  
3fffeee0:  00000014 3fff3bc8 00000000 40269c81  
3fffeef0:  00000000 000006b7 3ffe8944 4010133e  
3fffef00:  4028f148 3fff75dc 3fff6264 3fff634c  
3fffef10:  3fff3bc8 00000008 3fff79cc 40269345  
3fffef20:  3fffdc90 3fff6264 3fff75dc 40269158  
3fffef30:  40292305 3fff6264 3fff75dc 40292317  
3fffef40:  3fff79dc 3fff79cc 00000000 3fffdcc0  
3fffef50:  3ffead20 00000000 3fff75dc 40293627  
3fffef60:  40000f49 3fffdab0 ffffff01 40000f49  
3fffef70:  40000e19 000c0eaf bff00000 0000bfff  
3fffef80:  00000005 aa55aa55 000000ed 4010629d  
3fffef90:  401062a3 bff00000 0000bfff 74756f00  
3fffefa0:  4010000d bff00000 000c0eaf 401000ab  
3fffefb0:  40283ce8 3fffef4c 40283c99 3ffffee8  
3fffefc0:  3fffffd0 00000000 00000000 feefeffe  
3fffefd0:  feefeffe feefeffe feefeffe feefeffe  
3fffefe0:  feefeffe feefeffe feefeffe feefeffe  
3fffeff0:  feefeffe feefeffe feefeffe feefeffe  
3ffff000:  feefeffe feefeffe feefeffe feefeffe  
3ffff010:  feefeffe feefeffe feefeffe feefeffe  
3ffff020:  feefeffe feefeffe feefeffe feefeffe  
3ffff030:  feefeffe feefeffe feefeffe feefeffe  
3ffff040:  feefeffe feefeffe feefeffe feefeffe  
3ffff050:  feefeffe feefeffe feefeffe feefeffe  
3ffff060:  feefeffe feefeffe feefeffe feefeffe  
3ffff070:  feefeffe feefeffe feefeffe feefeffe  
3ffff080:  feefeffe feefeffe feefeffe feefeffe  
3ffff090:  feefeffe feefeffe feefeffe feefeffe  
3ffff0a0:  feefeffe feefeffe feefeffe feefeffe  
3ffff0b0:  feefeffe feefeffe feefeffe feefeffe  
3ffff0c0:  feefeffe feefeffe feefeffe feefeffe  
3ffff0d0:  feefeffe feefeffe feefeffe feefeffe  
3ffff0e0:  feefeffe feefeffe feefeffe feefeffe  
3ffff0f0:  feefeffe feefeffe feefeffe feefeffe  
3ffff100:  feefeffe feefeffe feefeffe feefeffe  
3ffff110:  feefeffe feefeffe feefeffe feefeffe  
3ffff120:  feefeffe feefeffe feefeffe feefeffe  
3ffff130:  feefeffe feefeffe feefeffe feefeffe  
3ffff140:  feefeffe feefeffe feefeffe feefeffe  
3ffff150:  feefeffe feefeffe feefeffe feefeffe  
3ffff160:  feefeffe feefeffe feefeffe feefeffe  
3ffff170:  feefeffe feefeffe feefeffe feefeffe  
3ffff180:  feefeffe feefeffe feefeffe feefeffe  
3ffff190:  feefeffe feefeffe feefeffe feefeffe  
3ffff1a0:  feefeffe feefeffe feefeffe feefeffe  
3ffff1b0:  feefeffe feefeffe feefeffe feefeffe  
3ffff1c0:  feefeffe feefeffe feefeffe feefeffe  
3ffff1d0:  feefeffe feefeffe feefeffe feefeffe  
3ffff1e0:  feefeffe feefeffe feefeffe feefeffe  
3ffff1f0:  feefeffe feefeffe feefeffe feefeffe  
3ffff200:  feefeffe feefeffe feefeffe feefeffe  
3ffff210:  feefeffe feefeffe feefeffe feefeffe  
3ffff220:  feefeffe feefeffe feefeffe feefeffe  
3ffff230:  feefeffe feefeffe feefeffe feefeffe  
3ffff240:  feefeffe feefeffe feefeffe feefeffe  
3ffff250:  feefeffe feefeffe feefeffe feefeffe  
3ffff260:  feefeffe feefeffe feefeffe feefeffe  
3ffff270:  feefeffe feefeffe feefeffe feefeffe  
3ffff280:  feefeffe feefeffe feefeffe feefeffe  
3ffff290:  feefeffe feefeffe feefeffe feefeffe  
3ffff2a0:  feefeffe feefeffe feefeffe feefeffe  
3ffff2b0:  feefeffe feefeffe feefeffe feefeffe  
3ffff2c0:  feefeffe feefeffe feefeffe feefeffe  
3ffff2d0:  feefeffe feefeffe feefeffe feefeffe  
3ffff2e0:  feefeffe feefeffe feefeffe feefeffe  
3ffff2f0:  feefeffe feefeffe feefeffe feefeffe  
3ffff300:  feefeffe feefeffe feefeffe feefeffe  
3ffff310:  feefeffe feefeffe feefeffe feefeffe  
3ffff320:  feefeffe feefeffe feefeffe feefeffe  
3ffff330:  feefeffe feefeffe feefeffe feefeffe  
3ffff340:  feefeffe feefeffe feefeffe feefeffe  
3ffff350:  feefeffe feefeffe feefeffe feefeffe  
3ffff360:  feefeffe feefeffe feefeffe feefeffe  
3ffff370:  feefeffe feefeffe feefeffe feefeffe  
3ffff380:  feefeffe feefeffe feefeffe feefeffe  
3ffff390:  feefeffe feefeffe feefeffe feefeffe  
3ffff3a0:  feefeffe feefeffe feefeffe feefeffe  
3ffff3b0:  feefeffe feefeffe feefeffe feefeffe  
3ffff3c0:  feefeffe feefeffe feefeffe feefeffe  
3ffff3d0:  feefeffe feefeffe feefeffe feefeffe  
3ffff3e0:  feefeffe feefeffe feefeffe feefeffe  
3ffff3f0:  feefeffe feefeffe feefeffe feefeffe  
3ffff400:  feefeffe feefeffe feefeffe feefeffe  
3ffff410:  feefeffe feefeffe feefeffe feefeffe  
3ffff420:  feefeffe feefeffe feefeffe feefeffe  
3ffff430:  feefeffe feefeffe feefeffe feefeffe  
3ffff440:  feefeffe feefeffe feefeffe feefeffe  
3ffff450:  feefeffe feefeffe feefeffe feefeffe  
3ffff460:  feefeffe feefeffe feefeffe feefeffe  
3ffff470:  feefeffe feefeffe feefeffe feefeffe  
3ffff480:  feefeffe feefeffe feefeffe feefeffe  
3ffff490:  feefeffe feefeffe feefeffe feefeffe  
3ffff4a0:  feefeffe feefeffe feefeffe feefeffe  
3ffff4b0:  feefeffe feefeffe feefeffe feefeffe  
3ffff4c0:  feefeffe feefeffe feefeffe feefeffe  
3ffff4d0:  00000000 400042db feefeffe feefeffe  
3ffff4e0:  40004b31 3fff4ce4 00000040 00303c80  
3ffff4f0:  401075f0 feefeffe feefeffe feefeffe  
3ffff500:  40250708 00000000 00000040 00303c80  
3ffff510:  feefeffe feefeffe 3fff4ce4 40250795  
3ffff520:  feefeffe feefeffe feefeffe feefeffe  
3ffff530:  feefeffe feefeffe feefeffe feefeffe  
3ffff540:  feefeffe feefeffe feefeffe feefeffe  
3ffff550:  feefeffe feefeffe feefeffe feefeffe  
3ffff560:  feefeffe feefeffe feefeffe feefeffe  
3ffff570:  feefeffe feefeffe feefeffe feefeffe  
3ffff580:  feefeffe feefeffe feefeffe feefeffe  
3ffff590:  feefeffe feefeffe feefeffe feefeffe  
3ffff5a0:  00000000 00000000 0000000a 00000000  
3ffff5b0:  00000000 00000000 0000000a 00000000  
3ffff5c0:  feefeffe feefeffe feefeffe feefeffe  
3ffff5d0:  00000000 a0000000 00000000 0000001c  
3ffff5e0:  00000000 feefeffe 00000000 3ffe83c4  
3ffff5f0:  00000001 00000000 3fff445c 00000008  
3ffff600:  00000007 3ffff6f3 00000000 00000008  
3ffff610:  feefeffe feefeffe 40262631 3ffe83c4  
3ffff620:  00000040 00000000 3ffe8940 3fff4ce4  
3ffff630:  00000040 00000000 4025458e 00000000  
3ffff640:  00000040 3fff4ce4 00303c80 402556e4  
3ffff650:  3fff445c 00000004 00001c80 40241c0e  
3ffff660:  3fff445c 3fff445c 00000008 402012a5  
3ffff670:  00000001 40241bf0 3fff445c 00002000  
3ffff680:  00001fff 00001c80 00003cbf 00000004  
3ffff690:  3fff44d4 3ffff760 00000008 40202142  
3ffff6a0:  00000008 3ffe83c4 3ffff760 3fff445c  
3ffff6b0:  8010080c 3ffff7b0 8010080c 40201886  
3ffff6c0:  3ffff6ec 00000004 fe302064 feefeffe  
3ffff6d0:  eb6a9213 00000248 ffffffff ffffffff  
3ffff6e0:  00000035 00000034 aff003cf 00000000  
3ffff6f0:  00001c80 aff003cf 00000004 00000004  
3ffff700:  00000001 00000002 00000000 78000000  
3ffff710:  00000000 00000000 0000000d 00000000  
3ffff720:  00000000 3ffff6e8 500ffc30 00000001  
3ffff730:  40218437 00000030 00000018 3fff445c  
3ffff740:  0000000d 3ffff7b0 3ffffed9 40201bc2  
3ffff750:  40202118 3ffff760 00000005 3ffff760  
3ffff760:  3fff445c 3ffffed9 0000000d 3fff2d50  
3ffff770:  3ffffee6 00000000 3ffff7d0 3ffff7c8  
3ffff780:  feefeffe 00000001 3ffffee6 002ffc00  
3ffff790:  feefeffe feefeffe feefeffe 3fff4ebc  
3ffff7a0:  3fff2d50 3ffff7f0 3fff445c 40204aaf  
3ffff7b0:  00000001 00000000 00000035 00001c80  
3ffff7c0:  500ffc30 00010004 ffffffff ffffffff  
3ffff7d0:  3ffffed9 feefeffe feefeffe feefeffe  
3ffff7e0:  feefeffe 00000001 00000000 4024196c  
3ffff7f0:  3ffff810 3ffff800 00000008 feefeffe  
3ffff800:  feefeffe feefeffe 00000000 00000000  
3ffff810:  3fffff00 0000007f feefeffe feefeffe  
3ffff820:  feefeffe 3fff35b4 3fff2d50 4021844a  
3ffff830:  feefeffe feefeffe feefeffe feefeffe  
3ffff840:  3ffff860 3ffff860 3ffffe60 3ffffe60  
3ffff850:  3ffeacb5 4010619f 3ffee6f0 feefef00  
3ffff860:  40103a93 3ffee6f0 feefeffe feefeffe  
3ffff870:  0000004e 0022450c 3ffeefd4 40103c70  
3ffff880:  3ffeb560 00000000 00000000 feefeffe  
3ffff890:  0000004e 0022450c 4010412a 00000100  
3ffff8a0:  3ffeb560 7fffffff 00000000 00000001  
3ffff8b0:  00000001 00000040 feefeffe feefeffe  
3ffff8c0:  3ffeb560 00000000 0000001f 0022450c  
3ffff8d0:  4000b570 2c9f0300 4000050c 3fffc278  
3ffff8e0:  00000000 00000000 00000000 00000000  
3ffff8f0:  00000000 00000000 00000000 00000000  
3ffff900:  00000000 00000000 00000000 00000000  
3ffff910:  00000000 00000000 00000000 00000000  
3ffff920:  e8ed3bdb 7bc369a3 0ed442c6 e917f5f1  
3ffff930:  c4e1ed8d 27d8123a 7e1bacdf 8c24c39e  
3ffff940:  1ac34a7e 1f4e2243 72aab485 45184adc  
3ffff950:  4000b5f9 00000008 00000038 3ffffa30  
3ffff960:  00000008 3ffffa30 6ec60cba 6955e972  
3ffff970:  4b120654 2589018a cd7da686 30cce7be  
3ffff980:  e5c2b3e9 72d549bb 272dff4b d941e54a  
3ffff990:  7b81d6bf bb0c80ee 9f283072 5725113f  
3ffff9a0:  4cfb7908 b8a34dc7 fda73743 3b665c13  
3ffff9b0:  3face8c4 257dff1e 2c481c13 75e6628c  
3ffff9c0:  d9073ef5 dccea506 a09f9424 7befd8e8  
3ffff9d0:  61420e1d c2f5f355 8b8b3c93 3fcfaf66  
3ffff9e0:  4000b62e 21d09c36 c20331c1 37d71b4d  
3ffff9f0:  4000b6c4 3ffffa30 3ffffbc0 ffffffff  
3ffffa00:  4000b72e 3ffffa10 00000008 5b110f3e  
3ffffa10:  00000000 00000000 4000a333 3ffffb38  
3ffffa20:  3ffffbc0 3ffffb18 3fff6a1c 5025def1  
3ffffa30:  00000000 00000000 0000001f 40100aa8  
3ffffa40:  00000000 00000000 3fffc228 40106a35  
3ffffa50:  4000050c 00000000 00000000 00000000  
3ffffa60:  4000e21c 00000030 00000004 ffffffff  
3ffffa70:  4000d9ce 00000000 0000a000 00000010  
3ffffa80:  00000000 000000b0 402b439c 0000000a  
3ffffa90:  00000000 00000000 3ffffca3 00000000  
3ffffaa0:  00000000 00000000 a0000000 00000030  
3ffffab0:  00000000 00000000 00000000 00000000  
3ffffac0:  00000000 00000000 00000000 00000000  
3ffffad0:  3c90fddc f4be13a8 d45ce94c 5ef67f43  
3ffffae0:  00000000 00000000 0000001f 40100aa8  
3ffffaf0:  0000000f 00000000 00000010 00000000  
3ffffb00:  0000000f 00000000 00000010 00000000  
3ffffb10:  402624b3 00000030 00000000 ffffffff  
3ffffb20:  00000000 80000000 00000000 0000001b  
3ffffb30:  00007800 3ffffcc0 00007800 3ffe83c4  
3ffffb40:  00000001 00000000 0000000a 00000000  
3ffffb50:  00000001 00000000 0000000a 00000000  
3ffffb60:  00000000 00000000 40262631 3ffe83c4  
3ffffb70:  3ffffc6a a0000000 00000000 0000001c  
3ffffb80:  00001000 3ffffc41 00001000 3ffe83c4  
3ffffb90:  00000001 00000001 3ffffd00 402617f0  
3ffffba0:  3ffffc92 3ffffc6a 00000001 40262760  
3ffffbb0:  00000002 3ffffca3 40262631 3ffe83c4  
3ffffbc0:  00000001 00000000 3ffffd00 402617f0  
3ffffbd0:  4026172c 3ffffc92 00000001 00000000  
3ffffbe0:  00000001 00000000 0000000a 00000000  
3ffffbf0:  00000001 00000000 0000000a 00000000  
3ffffc00:  00000001 ffffffff 4028fecb 00000001  
3ffffc10:  ffffffff 00000000 3ffeae01 00000008  
3ffffc20:  3ffeacb5 4010619f 3ffee6c8 00020021  
3ffffc30:  40103a93 3ffee6c8 3fff660c 3ffee448  
3ffffc40:  00007fff 0387cf92 3ffeefd4 40103c70  
3ffffc50:  3ffeb560 00000000 00000000 3fff8194  
3ffffc60:  00007fff 0387cf92 4010412a 00000100  
3ffffc70:  3ffeb560 7fffffff 00002200 00000001  
3ffffc80:  00000001 00004108 3ffee6a0 3fff3b64  
3ffffc90:  3ffeb560 3ffee6a0 3ffffcf0 0387cf92  
3ffffca0:  3ffeb56c 2c9f0300 4000050c 3fffc278  
3ffffcb0:  40103e4c 3fffc200 00000022 402617f0  
3ffffcc0:  4021a6f6 00000030 00000018 ffffffff  
3ffffcd0:  4021a82f 00000000 3fff4eac 0000000a  
3ffffce0:  00000002 000000ff 0000001d 00000000  
3ffffcf0:  00000090 00000000 00000000 3fff4e8c  
3ffffd00:  00000000 3fff2e04 00000008 00000030  
3ffffd10:  40103e4c 3fffc200 00000022 40270954  
3ffffd20:  4000dd2d 00000030 00000010 ffffffff  
3ffffd30:  40100e68 b2aabefa 0000e75f 00000387  
3ffffd40:  00000041 b2aabefa 00000009 00000008  
3ffffd50:  00000218 00000004 6e53befa 00000000  
3ffffd60:  0387cdd6 00000000 010b86a7 00000030  
3ffffd70:  401057d3 3fff3bc8 3fff7520 40272548  
3ffffd80:  00000214 00000218 00000020 40269ce0  
3ffffd90:  4010529b 0000002b 00000002 00040000  
3ffffda0:  00002200 00000000 00000020 40100aa8  
3ffffdb0:  40104164 00080000 00000002 40102f08  
3ffffdc0:  3ffeacb2 00000000 3f002c9e 402725b0  
3ffffdd0:  40002c9e 2c9f0300 4000050c 3fffc278  
3ffffde0:  0000006d 0000001e 00000000 00000019  
3ffffdf0:  3fff4eec 000000ff 00000102 00000103  
3ffffe00:  00000000 00000101 578d4fdf 010b8765  
3ffffe10:  0000000c 000046f0 00000000 006d1e00  
3ffffe20:  3fff517c 00000000 3fff4ebc 4021bea1  
3ffffe30:  00000000 0000e760 58d4fdf3 0000000b  
3ffffe40:  3fff2e04 0000000b 00000002 401076f8  
3ffffe50:  006d1e00 3fff2e0c 3fff5284 40215636  
3ffffe60:  40106e20 3fffc6fc 00000000 3fff5284  
3ffffe70:  3fff2d50 00000000 006d1e00 401004c0  
3ffffe80:  00000001 0000000b 006d1e00 00000083  
3ffffe90:  00000000 00000000 00000000 3fff379c  
3ffffea0:  00000000 3fffdad0 3fff37c8 3fff2d50  
3ffffeb0:  00000000 0000006f 00000080 40212ce4  
3ffffec0:  00000003 00000070 00000038 00000001  
3ffffed0:  00000000 ffffff1f 00000000 00000000  
3ffffee0:  00000000 00000000 3ffe8940 0000e75f  
3ffffef0:  00000001 3fff52c8 4025458e 3fffefb0  
3fffff00:  00000001 0000e75f 3fff2d50 40217274  
3fffff10:  00000000 0000e75f 00418937 010b85d8  
3fffff20:  00000000 3fff37c8 4025458e 3fff37c8  
3fffff30:  3fffdad0 00000000 0000e75e 4022c154  
3fffff40:  3fff52c8 3fff2dac 3ffe8940 00000000  
3fffff50:  3fffdad0 3fff37c8 4025458e 3fff37c8  
3fffff60:  3fffdad0 00000000 0000e75e 40238ca7  
3fffff70:  4025bdf0 ffffffff 00000080 40255fb4  
3fffff80:  00000000 fffffffc 0000e74b 3fff03f0  
3fffff90:  4023f408 3ffea08c 3fff35b4 3fff37c8  
3fffffa0:  3fffdad0 00000000 3fff379c 3fff37c8  
<<<stack<<<

0x4026bcdd in tcp_receive at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_in.c:1295 (discriminator 4)
0x4028fecb in pp_attach at ??:?
0x4026cf7a in tcp_process at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_in.c:984
 (inlined by) tcp_input at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_in.c:438
0x4028f148 in ppRecycleRxPkt at ??:?
0x401016c0 in malloc at ??:?
0x40272329 in ip4_input at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c:1467
0x40269c81 in mem_malloc at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/mem.c:210
0x4010133e in umm_free_core at umm_malloc.cpp:?
0x4028f148 in ppRecycleRxPkt at ??:?
0x40269345 in ethernet_input_LWIP2 at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c:188
0x40269158 in git2glue_err at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c:118
 (inlined by) esp2glue_ethernet_input at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c:494
0x40292305 in ethernet_input at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c:365
0x40292317 in ethernet_input at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c:373
0x40293627 in ets_snprintf at ??:?
0x4010629d in call_user_start_local at ??:?
0x401062a3 in call_user_start_local at ??:?
0x4010000d in call_user_start at ??:?
0x401000ab in app_entry_redefinable at ??:?
0x40283ce8 in cont_ret at cont.S.o:?
0x40283c99 in cont_continue at cont.S.o:?
0x401075f0 in spi_flash_read at ??:?
0x40250708 in EspClass::flashRead(unsigned int, unsigned int*, unsigned int) at ??:?
0x40250795 in EspClass::flashRead(unsigned int, unsigned char*, unsigned int) at ??:?
0x40262631 in _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:196 (discriminator 1)
0x4025458e in yield at ??:?
0x402556e4 in flash_hal_read at ??:?
0x40241c0e in littlefs_impl::LittleFSImpl::lfs_flash_read(lfs_config const*, unsigned int, unsigned int, void*, unsigned int) at ??:?
0x402012a5 in lfs_bd_read at lfs.c:?
0x40241bf0 in littlefs_impl::LittleFSImpl::lfs_flash_read(lfs_config const*, unsigned int, unsigned int, void*, unsigned int) at ??:?
0x40202142 in lfs_dir_find_match at lfs.c:?
0x40201886 in lfs_dir_fetchmatch at lfs.c:?
0x40218437 in WS2812FX::loadCustomPalettes() at ??:?
0x40201bc2 in lfs_dir_find at lfs.c:?
0x40202118 in lfs_dir_find_match at lfs.c:?
0x40204aaf in lfs_stat at ??:?
0x4024196c in littlefs_impl::LittleFSImpl::exists(char const*) at ??:?
0x4021844a in WS2812FX::loadCustomPalettes() at ??:?
0x4010619f in lmacRxDone at ??:?
0x40103a93 in rcReachRetryLimit at ??:?
0x40103c70 in rcReachRetryLimit at ??:?
0x4010412a in wDev_ProcessFiq at ??:?
0x40100aa8 in ets_post at ??:?
0x40106a35 in ets_timer_disarm at ??:?
0x402b439c in etharp_output at ??:?
0x40100aa8 in ets_post at ??:?
0x402624b3 in _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:141
0x40262631 in _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:196 (discriminator 1)
0x402617f0 in __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232
0x40262760 in _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:246
0x40262631 in _printf_i at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_i.c:196 (discriminator 1)
0x402617f0 in __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232
0x4026172c in __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:179
0x4028fecb in pp_attach at ??:?
0x4010619f in lmacRxDone at ??:?
0x40103a93 in rcReachRetryLimit at ??:?
0x40103c70 in rcReachRetryLimit at ??:?
0x4010412a in wDev_ProcessFiq at ??:?
0x40103e4c in wDev_ProcessFiq at ??:?
0x402617f0 in __ssputs_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:232
0x4021a6f6 in PolyBus::setPixelColor(void*, unsigned char, unsigned short, unsigned int, unsigned char) at ??:?
0x4021a82f in PolyBus::setPixelColor(void*, unsigned char, unsigned short, unsigned int, unsigned char) at ??:?
0x40103e4c in wDev_ProcessFiq at ??:?
0x40270954 in etharp_output_to_arp_index at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/etharp.c:770
0x40100e68 in millis at ??:?
0x401057d3 in lmacRecycleMPDU at ??:?
0x40272548 in ip4_output_if_opt_src at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c:1765
0x40269ce0 in do_memp_malloc_pool at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/memp.c:255
0x4010529b in lmacProcessTxSuccess at ??:?
0x40100aa8 in ets_post at ??:?
0x40104164 in wDev_ProcessFiq at ??:?
0x40102f08 in pp_post at ??:?
0x402725b0 in ip4_output_if_opt at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c:1577
0x4021bea1 in BusDMX::setPixelColor(unsigned short, unsigned int) at ??:?
0x401076f8 in BusManager::setPixelColor(unsigned short, unsigned int) at ??:?
0x40215636 in Segment::progress() at ??:?
0x40106e20 in system_get_time at ??:?
0x401004c0 in Segment::setPixelColor(int, unsigned int) at ??:?
0x40212ce4 in candle(bool) at ??:?
0x4025458e in yield at ??:?
0x40217274 in WS2812FX::service() at ??:?
0x4025458e in yield at ??:?
0x4022c154 in handleNightlight() at ??:?
0x4025458e in yield at ??:?
0x40238ca7 in WLED::loop() at ??:?
0x4025bdf0 in StreamNull::~StreamNull() at ??:?
0x40255fb4 in uart_write at ??:?
0x4023f408 in HardwareSerial::write(unsigned char const*, unsigned int) at ??:?

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3424, room 16 
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8 
tail 0
chksum 0x2b
csum 0x2b
v000c0eb0

Anything else?

Sounds very similar to #3609 Related: https://wled.discourse.group/t/board-wdt-reset-caused-by-websockets/10770 Driver: https://github.com/casesolved-co-uk/DMXUART

Code of Conduct

blazoncek commented 10 months ago

Probably RAM depletion. When you disable websockets you free up plenty of RAM. Please upgrade to ESP32.

casesolved-co-uk commented 10 months ago

Probably RAM depletion. When you disable websockets you free up plenty of RAM. Please upgrade to ESP32.

Arguably it's worse and more laggy with the following disabled:

  -D WLED_DISABLE_LOXONE
  -D WLED_DISABLE_ADALIGHT
  -D WLED_DISABLE_MQTT
  -D WLED_DISABLE_HUESYNC
  -D WLED_DISABLE_INFRARED
  -D WLED_DISABLE_2D

There's definitely an issue with websockets. Normal HTTP requests are much more responsive and reliable.

blazoncek commented 10 months ago

I use websockets without issues on about 10 of my ESP01 devices. I did disable 2D, Loxone, Hue, Ada, Alexa and MQTT. I also used WLED_USE_UNREAL_MATH to free a few bytes more by removing libc dependency..

blazoncek commented 10 months ago

And BTW I am unfamiliar with 0x4021bea1 in BusDMX::setPixelColor(unsigned short, unsigned int) at ??:?

This appears to be your extension of WLED which you'll need to debug on your own. I am closing as it appears not to be related with WLED core functionality.

Feel free to reopen when you reproduce with stock WLED.

casesolved-co-uk commented 10 months ago

It's clearly not a RAM issue because there's 14k of heap remaining when it crashes. No issue with websockets disabled, so it can't be my driver.

Similar issues with WLED_USE_UNREAL_MATH

Two other symptoms:

heap 17664
heap 15904
Sending WS data to multiple clients.
JSON buffer released. (12)

User exception (panic/abort/assert)
--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Abort called

>>>stack>>>

ctx: cont
sp: 3ffffed0 end: 3fffffd0 offset: 0010
3ffffee0:  00000001 0000b5e3 3fff4e40 4010169b  
3ffffef0:  3ffe9c96 0000b5e3 3fff4e40 40215531  
3fffff00:  00000066 0000b5e3 3fff2950 402170d4  
3fffff10:  00000000 0000b5e3 26e978d4 00d24ea4  
3fffff20:  00000000 3fff33c8 40254ac2 3fff33c8  
3fffff30:  3fffdad0 00000000 0000b5e3 4022c154  
3fffff40:  3fff4ec8 3fff29ac 3ffe8940 00000000  
3fffff50:  3fffdad0 3fff33c8 40254ac2 3fff33c8  
3fffff60:  3fffdad0 00000000 0000b5e3 40238c9b  
3fffff70:  4025c324 ffffffff 00000080 402564e8  
3fffff80:  00000000 fffffffc 0000b5d8 3ffefff0  
3fffff90:  4023f93c 3ffe9c94 3fff31b4 3fff33c8  
3fffffa0:  3fffdad0 00000000 3fff339c 3fff33c8  
3fffffb0:  3fffdad0 00000000 3fff339c 40254c50  
3fffffc0:  feefeffe feefeffe 3fffdab0 40100a01  
<<<stack<<<

0x4010169b in free at ??:?
0x40215531 in Segment::stopTransition() at ??:?
0x402170d4 in WS2812FX::service() at ??:?
0x40254ac2 in yield at ??:?
0x4022c154 in handleNightlight() at ??:?
0x40254ac2 in yield at ??:?
0x40238c9b in WLED::loop() at ??:?
0x4025c324 in StreamNull::~StreamNull() at ??:?
0x402564e8 in uart_write at ??:?
0x4023f93c in HardwareSerial::write(unsigned char const*, unsigned int) at ??:?
0x40254c50 in loop_wrapper() at core_esp8266_main.cpp:?
0x40100a01 in cont_wrapper at ??:?

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 3424, room 16 
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8 
tail 0
chksum 0x2b
csum 0x2b
v000bf290
~ld
���'�;��g|�
           $
            �
             d`#�|s�d�'��o�
                           d`��s�l�l
                                    �
---WLED 0.14.1 2401141 INIT---
esp8266 3.1.2
heap 30488
PIN ALLOC: Pin 1 successfully allocated by 0x89 (137)
Registering usermods ...
heap 30488
Reading config
JSON buffer released. (11)
JSON buffer locked. (12)
JSON buffer size: 3049 for WS request (1707).
heap 17640
heap 15888
Sending WS data t**ERROR: Locking JSON buffer failed! (12)**
ERROR: Locking JSON buffer failed! (12)
o multiple clients.
JSON buffer released. (12)
Loop took **2026ms**.
Usermods took 0ms.
Strip took 1ms.
JSON buffer locked. (11)
JSON buffer released. (11)

There's clearly a huge issue with websockets ...

blazoncek commented 10 months ago

Websockets were not developed by WLED team. Please open an issue with AsyncWebServer/AsyncTCP library.

casesolved-co-uk commented 10 months ago

I'll just disable it thanks. It clearly has some serious issues that I don't have time to debug. My board has been running for 18 hours outputting DMX using Candle Multi without issues with it disabled with web clicks any time. It crashes within 30 seconds with it enabled and clicks.

Websockets is a chosen feature of the project you support.