Exception 29: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores
Closed this issue · 6 comments
I have some code that reads a Google calendar and it works great except every so often I get this & the Arduino (D1 Mini) restarts & carries on.
Exception 29: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores
PC: 0x4020d30e
EXCVADDR: 0x00000004
Decoding stack results
0x4021a186: more_comps at crypto/bigint.c line 1072
0x4021a380: alloc at crypto/bigint.c line 1106
0x40100980: realloc at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/umm_malloc/umm_malloc.c line 1720
0x4021a699: regular_multiply at crypto/bigint.c line 822
0x4020583c: optimistic_yield(uint32_t) at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/core_esp8266_main.cpp line 111
0x4021b1d3: bi_barrett at crypto/bigint.c line 1289
0x4021b428: bi_mod_power at crypto/bigint.c line 1414
0x4021a22c: trim at crypto/bigint.c line 1197
0x4021c5b1: RSA_encrypt at crypto/rsa.c line 254
0x402172ac: send_client_key_xchg at ssl/tls1_clnt.c line 409
0x40217741: do_clnt_handshake at ssl/tls1_clnt.c line 123
0x40210519: pbuf_free_LWIP2 at core/pbuf.c line 777
0x402057fc: __yield() at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/core_esp8266_main.cpp line 96
0x402170b4: basic_read at ssl/tls1.c line 1607
0x40217490: do_client_connect at ssl/tls1_clnt.c line 168
0x401007ac: malloc at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/umm_malloc/umm_malloc.c line 1668
0x40203f58: SSLContext::_delete_shared_SSL(SSL_*) at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp line 115
0x4021721c: ssl_read at ssl/tls1.c line 314
0x40204739: SSLContext::connect(ClientContext*, char const*, unsigned int) at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp line 146
0x40205784: esp_yield() at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/core_esp8266_main.cpp line 87
0x4020136f: delay at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/core_esp8266_wiring.c line 51
0x40204987: WiFiClientSecure::_connectSSL(char const*) at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp line 350
0x40204a2d: WiFiClientSecure::connect(char const*, unsigned short) at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp line 518
0x40202a60: HTTPSRedirect::printRedir() at /var/folders/7l/nw1xs8yd2sl9sxb25k0xz8_m0000gn/T/arduino_build_917635/sketch/HTTPSRedirect.cpp line 94
0x40202b18: HTTPSRedirect::GET(String const&, char const*, bool const&) at /var/folders/7l/nw1xs8yd2sl9sxb25k0xz8_m0000gn/T/arduino_build_917635/sketch/HTTPSRedirect.cpp line 374
0x40204a2d: WiFiClientSecure::connect(char const*, unsigned short) at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp line 518
0x40202b3a: HTTPSRedirect::GET(String const&, char const*) at /var/folders/7l/nw1xs8yd2sl9sxb25k0xz8_m0000gn/T/arduino_build_917635/sketch/HTTPSRedirect.cpp line 348
0x40202cd0: getCalendar() at /Users/stu/Documents/Arduino/bin days/bin_day/bin_day.ino line 71
0x40205784: esp_yield() at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/core_esp8266_main.cpp line 87
0x4020137a: delay at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/core_esp8266_wiring.c line 54
0x40202f3d: loop() at /Users/stu/Documents/Arduino/bin days/bin_day/bin_day.ino line 153
0x402057a5: esp_schedule() at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/core_esp8266_main.cpp line 91
0x402057d0: loop_wrapper() at /Users/stu/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/core_esp8266_main.cpp line 121
I'm quite new to Arduino's & the last C++ I did was at college, 20+ years ago, so it doesn't make much sense, but it looks like it's trying to allocate some memory when it's decrypting the payload maybe?
The full code, minus sensitive stuff, is here https://github.com/Stubbs/bin_days
Doing a similar project inspired to https://github.com/ClemRz/GCalendar-Irrigation, getting same error: Wemos D1 Mini restarts.
Exception (29):
epc1=0x40217ccb epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000006 depc=0x00000000
Stack decoding below.
0x40217cc7: send_client_hello at ssl/tls1_clnt.c line 202
: (inlined by) do_client_connect at ssl/tls1_clnt.c line 167
0x401004d8: malloc at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266\umm_malloc/umm_malloc.c line 1668
0x40217f0a: ssl_client_new at ssl/tls1_clnt.c line 89
0x40208d7e: strdup at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/string/../../../.././newlib/libc/string/strdup.c line 11
0x4010500c: ets_timer_arm_new at ?? line ?
0x40204a63: shared_ptr at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 310 (discriminator 1)
: (inlined by) SSLContext::connect(ClientContext*, char const*, unsigned int) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 138 (discriminator 1)
0x402061a4: esp_yield at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/core_esp8266_main.cpp line 57
0x402060b4: operator new(unsigned int) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/abi.cpp line 57
0x40204af4: std::__shared_ptr ::operator=(std::__shared_ptr &&) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 310 (discriminator 1)
0x40204d03: WiFiClientSecure::_connectSSL(char const*) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 310 (discriminator 1)
0x40204da9: WiFiClientSecure::connect(char const*, unsigned short) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 310 (discriminator 1)
0x401072e8: sntp_get_current_timestamp at ?? line ?
0x401072e8: sntp_get_current_timestamp at ?? line ?
0x40202279: httpsGet() at C:\Users\gabri\Documents\Arduino\ESP8266_gcalendar_irrigation/client.ino line 29
0x402057b1: Print::write(char const*) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/Print.cpp line 87
0x402057b1: Print::write(char const*) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/Print.cpp line 87
0x402058a0: Print::println() at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/Print.cpp line 87
0x4020326d: loop at C:\Users\gabri\Documents\Arduino\ESP8266_gcalendar_irrigation/ESP8266_gcalendar_irrigation.ino line 81
0x402061c5: esp_schedule at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/core_esp8266_main.cpp line 57
0x402061f0: loop_wrapper at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/core_esp8266_main.cpp line 57
0x40100710: cont_norm at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/cont.S line 109
Will look into it. In the meantime, could you change the value of the delay at the end of the loop in GoogleDocs.ino and try again? Try increasing or decreasing (but not below 1500) and see.
Done the test with GoogleDocs.ino in your libraries and I have obtained a crash with 4s delay after a long series of GET and POST requests:
Decoding 32 results
0x4021a6b2: more_comps at crypto/bigint.c line 672
0x4021a8ac: alloc at crypto/bigint.c line 672
0x40100670: _umm_realloc at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266\umm_malloc/umm_malloc.c line 1641
: (inlined by) realloc at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266\umm_malloc/umm_malloc.c line 1715
0x4021abc5: regular_multiply at crypto/bigint.c line 672
0x40205b9c: optimistic_yield at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/core_esp8266_main.cpp line 57
0x4021b6ff: bi_barrett at crypto/bigint.c line 1289
0x4021b954: bi_mod_power at crypto/bigint.c line 1414
0x4021a758: trim at crypto/bigint.c line 672
0x4021cadd: RSA_public at crypto/rsa.c line 254
: (inlined by) RSA_encrypt at crypto/rsa.c line 288
0x402177d8: send_client_key_xchg at ssl/tls1_clnt.c line 409
0x40217c6d: do_clnt_handshake at ssl/tls1_clnt.c line 123
0x40210895: pbuf_free_LWIP2 at /local/users/gauchard/arduino/arduino_esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/pbuf.c line 1306
0x40205b5c: __yield at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/core_esp8266_main.cpp line 57
0x402175e0: do_handshake at ssl/tls1.c line 2007
: (inlined by) basic_read at ssl/tls1.c line 1483
0x402179bc: do_client_connect at ssl/tls1_clnt.c line 168
0x401004d8: malloc at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266\umm_malloc/umm_malloc.c line 1668
0x4020379c: SSLContext::delete_shared_SSL(SSL) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 310 (discriminator 1)
0x40217748: ssl_read at ssl/tls1.c line 2007
0x40204185: SSLContext::connect(ClientContext, char const*, unsigned int) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 310 (discriminator 1)
0x40205ae4: esp_yield at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/core_esp8266_main.cpp line 57
0x4020136f: delay at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/core_esp8266_wiring.c line 51
0x402043d3: WiFiClientSecure::_connectSSL(char const*) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 310 (discriminator 1)
0x40204479: WiFiClientSecure::connect(char const*, unsigned short) at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 310 (discriminator 1)
0x401071b0: sntp_get_current_timestamp at ?? line ?
0x401071b0: sntp_get_current_timestamp at ?? line ?
0x40204be4: HTTPSRedirect::printRedir() at C:\Users\gabri\Documents\Arduino\libraries\HTTPSRedirect/HTTPSRedirect.cpp line 431
0x40204c9c: HTTPSRedirect::GET(String const&, char const*, bool const&) at C:\Users\gabri\Documents\Arduino\libraries\HTTPSRedirect/HTTPSRedirect.cpp line 431
0x402050b0: Print::println() at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/Print.cpp line 99
0x40204cbe: HTTPSRedirect::GET(String const&, char const*) at C:\Users\gabri\Documents\Arduino\libraries\HTTPSRedirect/HTTPSRedirect.cpp line 431
0x40202646: loop at C:\Users\gabri\Documents\Arduino\libraries\HTTPSRedirect\GoogleDocs/GoogleDocs.ino line 192
0x40205b30: loop_wrapper at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/core_esp8266_main.cpp line 57
0x40100710: cont_norm at C:\Users\gabri\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/cont.S line 109
Hi guys,
I have the same problem with Exception (29). I have 4 temp sensors (DS18B20), I read sensors every second, showing values on lcd and sending to spreadsheet every 15 minutes. Most of crashes are after 20 writes to sheet.
Could be a problem not on my side, but on google side? I found some limitation, but are not very clear for me
https://developers.google.com/apps-script/guides/services/quotas
There is limit of triggers=20, what does it mean?
@electronicsguy Is your example working in your environment, please? Without reset more than 20 loops?
@jozper, @ercoleg and @Stubbs esp8266 sdk for arduino ver. 2.4.2 was just released which fixes memory leaks in HTTPClient https://github.com/esp8266/Arduino/releases/tag/2.4.2 Could you please update to this within Arduino IDE/board manager and try again? Please report any differences.
Update did not help, but it seems, I solved my problem with resetting after 20 loops. I had MAX_CONNECT=10 and after first rebuilding it still worked, but after second rebuilding, it means after 20 loops it crashed.
I removed the "client = nullptr;" from the script and no reset anymore :)
if (connect_count > MAX_CONNECT)
{ Serial.println("Connects > MAX_CONNECT... rebuild");
connect_count = 0;
flagclient = false;
delete client;
//client = nullptr;
}