-
Notifications
You must be signed in to change notification settings - Fork 13.3k
MNDS.begin crashes ESP with Fatal exception 28(LoadProhibitedCause) when used with WiFiManager #4417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Confirmed issue remains after erase_flash. Looking for some help here please. Thanks. |
I have the same issue but seems random. WiFi.mode(WIFI_STA);
WiFi.hostname(myHostName.c_str());
WiFi.begin(strSSID.c_str(), strPassword.c_str());
MDNS.begin(myHostName.c_str()); Exception (28): ctx: sys
|
The MDNS responder has several issues, and I believe calling begin() multiple times is one of them. |
Also getting Exception(28) on MDNS.Begin (on version 2.4) |
I don't believe my issue is being caused by multiple calls to begin(). If I use hardcoded ssid and password to start wifi, it works fine (every time). I've confirmed the wifi connection is active by checking Wifi.status() See discussion in WifiManager forum |
I'm having similar issues as well. mdns server begin after WiFi manager causes crashes sometimes. Setting SSID and password manually fixes this issue, but that is not a solution. |
FYI - Didn't change the code but moved back to Core 2.3 and the issue went away |
Don't know if it is related, but I am experiencing almost the same crash with MDNS (and OTA which calls MDNS) when in AP mode rather then STA mode. |
@lawrence-jeff Is the issue also present with core 2.4.0 if you choose LwIP v1.4 from tools menu? |
Observation based on the stack dump: WiFi "station got IP" event is dispatched to mDNS responder, which calls I think this might have been partially fixed by @d-a-v here: d-a-v/esp82xx-nonos-linklayer@afc9297#diff-bb3aa6bcbd43cb748d0152bb3478ad46. That is, the crash should probably be fixed. But why we might be calling @devyte This does not look like an issue with mDNS library to me. I think it is something related to LwIP or WiFi event handling or both. |
@igrr - Yes, if using 2.4 I change it to LwIP 1.4 Pre-built I do not have the crash and everything seems to work correctly. |
2.4.0 is known to have issues with lwip2.
@igrr lwIP routes 224. to all the interfaces and link flagged up. The lwip2-issue was also a misunderstanding that the interface was up where it was not, happening when switching from AP to STA (if I remember well). |
@d-a-v Does that script fail with 2.4.0 release (and lwip2) |
Yes it does fail all the same (with core at current git master and lwip2 tag arduino-2.4.0). |
@lawrence-jeff can you check with 2.4.1 ? |
updating the esp8622 board software via the board manager seems to have fixed this MDNS issue, at least for me. |
I still have this / or a similar issue with latest git version, but only on one specific router (FritzBox) (out of 3 in total). There is no crash anymore, but a watchdog timer reset without a stack dump to look at. I leave this here in case someone can confirm this. |
On ESPeasy I also get a number of reports about the same Watchdog timer resets as described by @comino . I am not able to reproduce it myself, but I've seen Watchdog reboots on 1 node that is furthest away from the accesspoints. This particular node has been known to run extremely stable (100+ days uptime, downtime due to power loss) on firmware versions prior to ESPeasy using WiFi events. |
I am having the similar issue where i am getting exception28 continuously... |
A lot of times when using interrupts based sensors like HLW(A power measurement IC) with MDNS then calling mdns.begin() is causeing esp to restart due to hardware watch dog reset. Although if i turn off Interrupts for the same sensor. It runs fine. Definitely there is something in mdns that needs to be taken care of i think. I am using latest Git version and Lwip 2 higher bandwidth. |
Closing in view of #5442 with a full rewrite of mdns. |
Basic Infos
Wemos NodeMCU dev board 2.4 core
Hardware
Description
Problem description
Settings in IDE
Module: ?WEMOS Node MCU
Flash Size: ?4MB
CPU Frequency: ?80Mhz?
Flash Mode: ?qio?
Flash Frequency: ?40Mhz
Upload Using: ?SERIAL
Reset Method: ?ck / nodemcu?
Sketch
Debug Messages
Connected to TrojanBackdoorVirus ,IP address is 10.0.1.111 and signal strength is -58
Fatal exception 28(LoadProhibitedCause):
epc1=0x40225d9b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000098, depc=0x00000000
Exception (28):
epc1=0x40225d9b epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000098 depc=0x00000000
ctx: cont
sp: 3fff0570 end: 3fff09a0 offset: 01a0
stack dump
Decoding 33 results 0x40220184: ieee80211_output_pbuf at ?? line ? 0x40104456: glue2esp_linkoutput at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 292 0x401043d1: glue2esp_linkoutput at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 263 0x4010453d: new_linkoutput at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c line 240 0x40212147: ethernet_output at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 305 0x40212150: ethernet_output at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 305 0x401051da: os_printf_plus at ?? line ? 0x40232f26: pp_attach at ?? line ? 0x402181e5: etharp_output_LWIP2 at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/etharp.c line 893 0x40218c6c: ip4_output_if_opt_src at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c line 962 0x402192e4: mem_malloc at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/mem.c line 136 0x40106c91: __wrap_spi_flash_read at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/core_esp8266_phy.c line 267 0x40248d10: sleep_reset_analog_rtcreg_8266 at ?? line ? 0x40218cac: ip4_output_if_opt at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c line 788 0x4021843d: igmp_send at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 570 0x402121ac: do_memp_malloc_pool at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/memp.c line 231 0x402121e8: memp_malloc at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/memp.c line 231 0x4021850e: igmp_lookup_group at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 570 0x402186e7: igmp_start_timer at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 570 : (inlined by) igmp_joingroup_netif at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 521 0x40218773: igmp_joingroup at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 570 0x40202542: MDNSResponder::_listen() at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396 0x40100690: free at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/umm_malloc/umm_malloc.c line 1737 0x4020af2c: operator delete(void) at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/abi.cpp line 84 0x402037de: MDNSResponder::begin(char const) at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396 0x402021a8: _M_manager at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396 0x40202664: operator() at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396 : (inlined by) _M_invoke at /Users/mchadha/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/functional line 2071 0x4020a394: Print::println(int, int) at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/Print.cpp line 87 0x40202110: setup at /Users/mchadha/Documents/Arduino/wifiandMDNStest/wifiandMDNStest.ino line 23 0x4020b038: loop_wrapper at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/core_esp8266_main.cpp line 57 0x40100710: cont_norm at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/cont.S line 109
The text was updated successfully, but these errors were encountered: