esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
15.98k stars 13.34k forks source link

BearSSL::WiFiClientSecure::_installClientX509Validator() crash (related to shared_ptr_base.h) #6146

Closed wvmarle closed 5 years ago

wvmarle commented 5 years ago

Basic Infos

Platform

Settings in IDE

Problem Description

My project is sending out data to an external server (https connection, station mode - ESP connecting to my home network), and is queried by an Android app (http connection, using the access point mode - Android connecting to the ESP's WiFi network).

Sometimes (but it seems not always - the issue is hard to reliably reproduce but the stack trace is always the same) when the app contacts the ESP while the ESP is connected over https to the external server, a crash occurs:

0x402222c5: BearSSL::WiFiClientSecure::_installClientX509Validator() at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr_base.h line 986 : (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 316 : (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 598 : (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 614 : (inlined by) BearSSL::WiFiClientSecure::_installClientX509Validator() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 877 0x40222cfc: BearSSL::WiFiClientSecure::_connectSSL(char const) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 962 0x40219c70: esp_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 91 0x4021a8c3: delay at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring.cpp line 54 0x40206d6d: WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/include/ClientContext.h line 136 : (inlined by) WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClient.cpp line 170 0x40222eed: BearSSL::WiFiClientSecure::connect(char const, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 231 0x40225230: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40225230: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40216b5c: HTTPClient::connect() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 1165 0x4021c16e: uart_write at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/uart.cpp line 498 0x40217820: HTTPClient::sendRequest(char const, unsigned char, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 655 0x40217d98: HardwareSerial::write(unsigned char const, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x40273eba: sleep_reset_analog_rtcreg_8266 at ?? line ? 0x402180a5: Print::write(char const) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 60 0x40217d83: HardwareSerial::write(unsigned char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 154 0x402179ba: HTTPClient::GET() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 575 0x402118e8: HydroMonitorLogging::sendPostData(char) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 730 0x40225470: BearSSL::PrivateKey::getEC() const at ?? line ? 0x4022c4c0: _vsprintf_r at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdio/vsprintf.c line 65 0x40217d98: HardwareSerial::write(unsigned char const, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x4022000a: spiffs_object_truncate at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/spiffs/spiffs_nucleus.cpp line 1727 0x40211d41: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 337 0x40211caa: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 326 0x40204dab: handleAPI() at /home/wouter/Arduino/Williams_fridge/Fridge_control/webAPI.ino line 149 0x402251c8: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40217d98: HardwareSerial::write(unsigned char const*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x40218130: Print::println() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.cpp line 178 0x402121b5: HydroMonitorLogging::logData() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 250 0x40217d83: HardwareSerial::write(unsigned char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 154 0x40224948: Print::write(char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 73 0x40218114: Print::print(char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.cpp line 126 0x402106f4: HydroMonitorIsolatedSensorBoard::readSensor(bool) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorIsolatedSensorBoard.cpp line 36 0x40207a07: TwoWire::requestFrom(int, int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/Wire/Wire.cpp line 134 0x402042f9: loop at /home/wouter/Arduino/Williams_fridge/Fridge_control/loop.ino line 36 0x40219d20: loop_wrapper() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 125 0x401015d5: cont_wrapper at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/cont.S line 81

MCVE Sketch


#include <Arduino.h>

void setup() {

}

void loop() {

}

Debug Messages

Debug messages go here
wvmarle commented 5 years ago

Main sketch: https://github.com/wvmarle/Fridge_control Library that goes with it: https://github.com/wvmarle/HydroMonitor

If only I knew better where/how this crash happens I'd be glad to make a separate sketch that can reliably reproduce it, but due to the nature of outgoing & incoming connections it's very hard to do so.

wvmarle commented 5 years ago

Another stack trace triggered in the same way:

Decoding 120 results 0x40223024: WiFiServer::_accept(tcp_pcb, long) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/include/ClientContext.h line 41 : (inlined by) WiFiServer::_accept(tcp_pcb, long) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiServer.cpp line 167 0x402230b0: WiFiServer::_s_accept(void, tcp_pcb, long) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiServer.cpp line 181 0x40230e16: tcp_process at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_in.c line 942 : (inlined by) tcp_input at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_in.c line 438 0x4024f200: ieee80211_decap at ?? line ? 0x4021ca90: malloc at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1677 0x40235f39: ip4_input at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c line 710 0x4021c84c: _umm_free at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1304 0x4022dc75: ethernet_input_LWIP2 at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 188 0x4022daab: esp2glue_ethernet_input at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c line 441 0x40261a52: ethernet_input at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 363 0x40261a63: ethernet_input at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 371 0x4026383b: ets_snprintf at ?? line ? 0x40105440: call_user_start_local at ?? line ? 0x40105446: call_user_start_local at ?? line ? 0x4010000d: call_user_start at ?? line ? 0x40101610: cont_ret at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/cont.S line 142 0x401015bd: cont_continue at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/cont.S line 51 0x40105c19: ets_timer_disarm at ?? line ? 0x40239c26: br_sha2small_round at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2small.c line 87 (discriminator 2) 0x40239c1c: br_sha2small_round at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2small.c line 85 0x40105c19: ets_timer_disarm at ?? line ? 0x40105c19: ets_timer_disarm at ?? line ? 0x40239e58: br_sha2small_round at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2small.c line 102 (discriminator 2) 0x40239c1c: br_sha2small_round at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2small.c line 85 0x40278bb0: chip_v6_unset_chanfreq at ?? line ? 0x40105282: lmacTxFrame at ?? line ? 0x40104e87: lmacMSDUAged at ?? line ? 0x401047fa: lmacRecycleMPDU at ?? line ? 0x40104d91: lmacMSDUAged at ?? line ? 0x4010504c: lmacProcessAckTimeout at ?? line ? 0x40103183: wDev_ProcessFiq at ?? line ? 0x40239984: sha2big_update at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2big.c line 165 : (inlined by) br_sha384_update at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2big.c line 207 0x40103004: wDev_ProcessFiq at ?? line ? 0x4024697d: br_multihash_update at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/multihash.c line 141 0x4025cb14: ppTxPkt at ?? line ? 0x4025cb12: ppTxPkt at ?? line ? 0x4025da93: pp_attach at ?? line ? 0x4025dae2: pp_attach at ?? line ? 0x4025dbee: pp_attach at ?? line ? 0x4025cb97: ppTxPkt at ?? line ? 0x4024ff3f: ieee80211_output_pbuf at ?? line ? 0x401059bf: wdt_feed at ?? line ? 0x40101f3e: pp_post at ?? line ? 0x4022d689: glue2esp_linkoutput at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 299 0x4022d90b: new_linkoutput at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c line 235 0x4022dcfc: ethernet_output at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 312 0x40105282: lmacTxFrame at ?? line ? 0x40105282: lmacTxFrame at ?? line ? 0x40101f3e: pp_post at ?? line ? 0x40101f3e: pp_post at ?? line ? 0x40101f3e: pp_post at ?? line ? 0x4010531c: lmacTxFrame at ?? line ? 0x401031ae: wDev_ProcessFiq at ?? line ? 0x4010453f: lmacRecycleMPDU at ?? line ? 0x40102e2a: trc_NeedRTS at ?? line ? 0x401049a2: lmacRecycleMPDU at ?? line ? 0x40102e2a: trc_NeedRTS at ?? line ? 0x40104486: lmacProcessTxSuccess at ?? line ? 0x40104282: lmacProcessTXStartData at ?? line ? 0x40103307: wDev_ProcessFiq at ?? line ? 0x40103004: wDev_ProcessFiq at ?? line ? 0x40222947: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 452 0x4022293f: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 447 0x40232e5e: tcp_output at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_out.c line 1319 0x4021c84c: _umm_free at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1304 0x4021cc74: free at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1764 0x40236c40: mem_free at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/mem.c line 237 0x40219c70: esp_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 91 0x40219d52: yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 100 0x40219d95: optimistic_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 115 0x40206323: WiFiClient::available() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClient.cpp line 263 0x4022299e: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 510 0x4023c02c: br_ssl_hs_client_run at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/ssl/ssl_hs_client.c line 958 0x4023bfd4: pgm_read_word_inlined at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/pgmspace.h line 67 : (inlined by) br_ssl_hs_client_init_main at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/ssl/ssl_hs_client.c line 904 0x4023bae2: br_ssl_engine_hs_reset at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/ssl/ssl_engine.c line 1305 0x40222be4: BearSSL::WiFiClientSecure::_wait_for_handshake() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 547 0x40222dd0: BearSSL::WiFiClientSecure::_connectSSL(char const) at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 291 : (inlined by) BearSSL::WiFiClientSecure::_connectSSL(char const) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 1009 0x40219c70: esp_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 91 0x4021a8c3: delay at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring.cpp line 54 0x40206d6d: WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/include/ClientContext.h line 136 : (inlined by) WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClient.cpp line 170 0x40222eed: BearSSL::WiFiClientSecure::connect(char const, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 231 0x40225230: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40225230: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40216b5c: HTTPClient::connect() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 1165 0x4021c16e: uart_write at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/uart.cpp line 498 0x40217820: HTTPClient::sendRequest(char const, unsigned char, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 655 0x40217d98: HardwareSerial::write(unsigned char const, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x40273eba: sleep_reset_analog_rtcreg_8266 at ?? line ? 0x402180a5: Print::write(char const) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 60 0x40217d83: HardwareSerial::write(unsigned char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 154 0x402179ba: HTTPClient::GET() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 575 0x402118e8: HydroMonitorLogging::sendPostData(char) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 730 0x40225470: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40217ae1: EspClass::flashRead(unsigned int, unsigned int, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Esp.cpp line 639 0x4022c4c0: _vsprintf_r at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdio/vsprintf.c line 65 0x40217d98: HardwareSerial::write(unsigned char const, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x4022000a: spiffs_object_truncate at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/spiffs/spiffs_nucleus.cpp line 1727 0x40211d41: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 337 0x40211caa: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 326 0x40100f25: millis at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring.cpp line 180 0x402251c8: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40217d98: HardwareSerial::write(unsigned char const*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x40218130: Print::println() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.cpp line 178 0x402121b5: HydroMonitorLogging::logData() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 250 0x4021a6d9: twi_readFrom at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_si2c.cpp line 294 (discriminator 1) 0x40217a78: EspClass::getCpuFreqMHz() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Esp.cpp line 264 0x40208b4e: SoftwareSerial::available() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.cpp line 220 0x402106d8: HydroMonitorIsolatedSensorBoard::readSensor(bool) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorIsolatedSensorBoard.cpp line 33 0x40207a07: TwoWire::requestFrom(int, int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/Wire/Wire.cpp line 134 0x402042f9: loop at /home/wouter/Arduino/Williams_fridge/Fridge_control/loop.ino line 36 0x40219d20: loop_wrapper() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 125

earlephilhower commented 5 years ago

Please give the full decoding, including the registers listing and the "last failed malloc" line. I bet it's reporting an address somewhere, and that is the root of your problem.

I'm not able to go through your entire application and library, but this looks like an application memory leak.

wvmarle commented 5 years ago

Understand you're not going through it all, that's too much if you don't know where to look.

Slightly different stack traces always end with: last failed alloc call: 4022D552(1480)

An address that's not mentioned in the decoded stack trace, only lower values there. I'm not using any new() operator in this code, and am not aware of anything in my code that may cause leaks (doesn't mean it's not there, I may very well be doing something wrong).

The crashes are all linked to the actions as described above: while an outgoing connection is handled (during the https.GET() call - it's in the library, in HydroMonitorLogging::sendPostData(char*), file HydroMonitorLogging.cpp, is where it goes wrong), an incoming connection causes the program to crash. This I confirmed with lots of print statements that tell me exactly where in the code it is. Disabling that function (place a return 404 line at the top of it making, thus pretending the connection failed) makes the whole thing solid.

Abort called 03:04:59.487 -> 03:04:59.487 -> >>>stack>>> 03:04:59.487 -> 03:04:59.487 -> ctx: cont 03:04:59.487 -> sp: 3ffff900 end: 3fffffc0 offset: 01b0 03:04:59.487 -> 3ffffab0: c012c008 c00dc003 3ffffbe0 402222c5
03:04:59.487 -> 3ffffac0: 00000000 00000000 3ffffaf4 00000000
03:04:59.487 -> 3ffffad0: 3fffb694 3fff60b4 3ffffbe0 40222cfc
03:04:59.487 -> 3ffffae0: 00000000 3ffffb40 40219c70 3fffefa0
03:04:59.487 -> 3ffffaf0: 00000000 00000000 00000000 4021a8c3
03:04:59.487 -> 3ffffb00: 00000000 3fffbe44 3ffffbe0 40206d6d
03:04:59.520 -> 3ffffb10: 000001bb 00000d50 3ffffccc 00000000
03:04:59.520 -> 3ffffb20: 000001bb 3ffffbe0 3fffb694 00000000
03:04:59.520 -> 3ffffb30: 000001bb 3ffffbe0 3fffb694 40222eed
03:04:59.520 -> 3ffffb40: 40225230 5969807a 40225230 5969807a
03:04:59.520 -> 3ffffb50: 3ffe8a18 3ffffbe0 3ffffcac 40216b5c
03:04:59.520 -> 3ffffb60: 3ffe8976 00000000 3ffe8975 4021c16e
03:04:59.520 -> 3ffffb70: 00000000 00000000 3ffffcac 40217820
03:04:59.520 -> 3ffffb80: 0000edf0 0000000a 3fff0164 40217d98
03:04:59.553 -> 3ffffb90: 40273eba 0000002e 3fff244c 402180a5
03:04:59.553 -> 3ffffba0: 3ffe8974 3fff0164 00000000 40217d83
03:04:59.553 -> 3ffffbb0: 00000000 fffffea0 3fff0164 00000001
03:04:59.553 -> 3ffffbc0: 0000edf0 3ffffea0 3fff0164 402179ba
03:04:59.553 -> 3ffffbd0: 0000edf0 3ffffea0 3fff0164 402118e8
03:04:59.553 -> 3ffffbe0: 40225470 00000000 00003a98 0030482c
03:04:59.553 -> 3ffffbf0: 3ffef4f8 3fffbe44 3fff535c 3fffafb4
03:04:59.586 -> 3ffffc00: 00000000 00000000 3fff535c 00000000
03:04:59.586 -> 3ffffc10: 00000000 00000000 00000000 00000000
03:04:59.586 -> 3ffffc20: 00000000 3fff60b4 3fffb86c 3fffa204
03:04:59.586 -> 3ffffc30: 3fffb66c 00000000 00000000 00000000
03:04:59.586 -> 3ffffc40: 00004145 00000255 00000000 00000000
03:04:59.586 -> 3ffffc50: 00000000 00000000 00000000 00000000
03:04:59.586 -> 3ffffc60: 00000000 00000000 3ffe0001 4022c4c0
03:04:59.586 -> 3ffffc70: 3ffffe51 00000000 7fffff1e ff000208
03:04:59.619 -> 3ffffc80: 00000000 7fffffff 00000000 00000000
03:04:59.619 -> 3ffffc90: 00000000 00000000 00000000 40217d98
03:04:59.619 -> 3ffffca0: 00000000 00204800 3fff1940 00000000
03:04:59.619 -> 3ffffcb0: 00000000 3ffffbe0 3fffb694 0016001f
03:04:59.619 -> 3ffffcc0: ffff2c9c 000001bb 3f001388 3fffaedc
03:04:59.619 -> 3ffffcd0: 00c300cf ff301100 70747468 00000073
03:04:59.619 -> 3ffffce0: 00fe8976 00000000 00000000 0021c16e
03:04:59.653 -> 3ffffcf0: 3fffb70c 0011001f ff0016b6 00000000
03:04:59.653 -> 3ffffd00: 00000000 00000003 00000000 00000000
03:04:59.653 -> 3ffffd10: 00000000 ffffffff 00000000 4022000a
03:04:59.653 -> 3ffffd20: 00000000 00000000 00000008 00000000
03:04:59.653 -> 3ffffd30: 00000000 00000000 00000000 fffef8e5
03:04:59.653 -> 3ffffd40: 3ffef97c 3ffef99d 3fff0164 3ffffe60
03:04:59.653 -> 3ffffd50: 3ffefab8 3ffffea0 3ffef5b8 40211d41
03:04:59.653 -> 3ffffd60: 3ffffeb0 3fffb814 3ffffe94 000015d0
03:04:59.686 -> 3ffffd70: 70747468 2f2f3a73 2e777777 79746963
03:04:59.686 -> 3ffffd80: 72647968 6e6f706f 2e736369 482f6b68
03:04:59.686 -> 3ffffd90: 6f726479 696e6f4d 2f726f74 74736f70
03:04:59.686 -> 3ffffda0: 64697246 61446567 702e6174 6f702f79
03:04:59.686 -> 3ffffdb0: 72467473 65676469 61746144 6573753f
03:04:59.686 -> 3ffffdc0: 6d616e72 72663d65 65676469 7026615f
03:04:59.686 -> 3ffffdd0: 77737361 3d64726f 64697266 615f6567
03:04:59.719 -> 3ffffde0: 7361705f 726f7773 6f6c2664 76656c67
03:04:59.719 -> 3ffffdf0: 333d6c65 73656d26 65676173 5348703d
03:04:59.719 -> 3ffffe00: 6f736e65 31302b72 2b413325 73756e75
03:04:59.719 -> 3ffffe10: 2b6c6175 6c2b4870 6c657665 61656d2b
03:04:59.719 -> 3ffffe20: 65727573 41332564 4432252b 45322531
03:04:59.719 -> 3ffffe30: 32253030 68432b45 2b6b6365 736e6573
03:04:59.719 -> 3ffffe40: 3225726f 69742645 7473656d 3d706d61
03:04:59.752 -> 3ffffe50: 3ffe0031 3ffffea0 3ffef5b8 40211caa
03:04:59.752 -> 3ffffe60: 00000001 00000001 3ffef4d0 40204dab
03:04:59.752 -> 3ffffe70: 402251c8 00000000 000003e8 0000edef
03:04:59.752 -> 3ffffe80: 3fff381c 3fff387c 00000000 00000000
03:04:59.752 -> 3ffffe90: 3fff0450 00000031 00000000 ff21c16e
03:04:59.752 -> 3ffffea0: 3fffb814 0048004f ff31302b 00000001
03:04:59.752 -> 3ffffeb0: 3fff0033 0000001a 3fff0164 40217d98
03:04:59.752 -> 3ffffec0: 0000003c 3ffffd70 00000011 00000008
03:04:59.785 -> 3ffffed0: 3ffef99d 000000f5 3ffef97c 3ffffeb0
03:04:59.785 -> 3ffffee0: 00000003 3ffef8e5 3ffef880 40218130
03:04:59.785 -> 3ffffef0: 3fff0110 3ffef5b8 3fff0164 3fffff10
03:04:59.785 -> 3fffff00: 3fff0110 3ffef5b8 3ffefab8 402121b5
03:04:59.785 -> 3fffff10: 00000017 0000003c 3ffef324 40217d83
03:04:59.785 -> 3fffff20: 00000001 4bc6a7f0 0000ede9 40224948
03:04:59.785 -> 3fffff30: 3fffdad0 00000000 3ffef348 40218114
03:04:59.818 -> 3fffff40: 00000001 00000000 3ffef324 402106f4
03:04:59.818 -> 3fffff50: 00000000 3ffef4f8 3ffefee8 40207a07
03:04:59.818 -> 3fffff60: 3fffdad0 00000000 3ffefda0 3fff0298
03:04:59.818 -> 3fffff70: 3fffdad0 00000000 3ffef3f0 3fff0298
03:04:59.818 -> 3fffff80: 3fffdad0 00000000 3fff0268 402042f9
03:04:59.818 -> 3fffff90: 00000000 00000000 00000001 3fff0298
03:04:59.818 -> 3fffffa0: 3fffdad0 00000000 3fff0268 40219d20
03:04:59.818 -> 3fffffb0: feefeffe feefeffe 3ffe854c 401015d5
03:04:59.851 -> <<<stack<<< 03:04:59.851 -> 03:04:59.851 -> last failed alloc call: 4022D552(1480)

Decoding 36 results 0x402222c5: BearSSL::WiFiClientSecure::_installClientX509Validator() at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr_base.h line 986 : (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 316 : (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 598 : (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 614 : (inlined by) BearSSL::WiFiClientSecure::_installClientX509Validator() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 877 0x40222cfc: BearSSL::WiFiClientSecure::_connectSSL(char const) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 962 0x40219c70: esp_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 91 0x4021a8c3: delay at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring.cpp line 54 0x40206d6d: WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/include/ClientContext.h line 136 : (inlined by) WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClient.cpp line 170 0x40222eed: BearSSL::WiFiClientSecure::connect(char const, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 231 0x40225230: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40225230: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40216b5c: HTTPClient::connect() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 1165 0x4021c16e: uart_write at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/uart.cpp line 498 0x40217820: HTTPClient::sendRequest(char const, unsigned char, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 655 0x40217d98: HardwareSerial::write(unsigned char const, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x40273eba: sleep_reset_analog_rtcreg_8266 at ?? line ? 0x402180a5: Print::write(char const) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 60 0x40217d83: HardwareSerial::write(unsigned char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 154 0x402179ba: HTTPClient::GET() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 575 0x402118e8: HydroMonitorLogging::sendPostData(char) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 730 0x40225470: BearSSL::PrivateKey::getEC() const at ?? line ? 0x4022c4c0: _vsprintf_r at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdio/vsprintf.c line 65 0x40217d98: HardwareSerial::write(unsigned char const, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x4022000a: spiffs_object_truncate at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/spiffs/spiffs_nucleus.cpp line 1727 0x40211d41: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 337 0x40211caa: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 326 0x40204dab: handleAPI() at /home/wouter/Arduino/Williams_fridge/Fridge_control/webAPI.ino line 149 0x402251c8: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40217d98: HardwareSerial::write(unsigned char const*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x40218130: Print::println() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.cpp line 178 0x402121b5: HydroMonitorLogging::logData() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 250 0x40217d83: HardwareSerial::write(unsigned char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 154 0x40224948: Print::write(char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 73 0x40218114: Print::print(char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.cpp line 126 0x402106f4: HydroMonitorIsolatedSensorBoard::readSensor(bool) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorIsolatedSensorBoard.cpp line 36 0x40207a07: TwoWire::requestFrom(int, int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/Wire/Wire.cpp line 134 0x402042f9: loop at /home/wouter/Arduino/Williams_fridge/Fridge_control/loop.ino line 36 0x40219d20: loop_wrapper() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 125 0x401015d5: cont_wrapper at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/cont.S line 81

Connected. 03:43:55.086 -> 03:43:55.086 -> Abort called 03:43:55.086 -> 03:43:55.086 -> >>>stack>>> 03:43:55.086 -> 03:43:55.086 -> ctx: cont 03:43:55.086 -> sp: 3ffff900 end: 3fffffc0 offset: 01b0 03:43:55.086 -> 3ffffab0: c012c008 c00dc003 3ffffbe0 402222c5
03:43:55.086 -> 3ffffac0: 00000000 00000000 3ffffaf4 00000000
03:43:55.086 -> 3ffffad0: 3fffa6a4 3fff6454 3ffffbe0 40222cfc
03:43:55.119 -> 3ffffae0: 00000000 3ffffb40 40219c70 3fffefa0
03:43:55.119 -> 3ffffaf0: 00000000 00000000 00000000 4021a8c3
03:43:55.119 -> 3ffffb00: 00000000 3fffb38c 3ffffbe0 40206d6d
03:43:55.119 -> 3ffffb10: 000001bb 00000d50 3ffffccc 00000000
03:43:55.119 -> 3ffffb20: 000001bb 3ffffbe0 3fffa6a4 00000000
03:43:55.119 -> 3ffffb30: 000001bb 3ffffbe0 3fffa6a4 40222eed
03:43:55.119 -> 3ffffb40: 40225230 5969807a 40225230 5969807a
03:43:55.119 -> 3ffffb50: 3ffe8a18 3ffffbe0 3ffffcac 40216b5c
03:43:55.152 -> 3ffffb60: 3ffe8976 00000000 3ffe8975 4021c16e
03:43:55.152 -> 3ffffb70: 00000000 00000000 3ffffcac 40217820
03:43:55.152 -> 3ffffb80: 0001ccd0 0000000a 3fff0164 40217d98
03:43:55.152 -> 3ffffb90: 40273eba 0000002e 3fff244c 402180a5
03:43:55.152 -> 3ffffba0: 3ffe8974 3fff0164 00000000 40217d83
03:43:55.152 -> 3ffffbb0: 00000000 fffffea0 3fff0164 00000001
03:43:55.152 -> 3ffffbc0: 0001ccd0 3ffffea0 3fff0164 402179ba
03:43:55.185 -> 3ffffbd0: 0001ccd0 3ffffea0 3fff0164 402118e8
03:43:55.185 -> 3ffffbe0: 40225470 00000000 00003a98 00320c2c
03:43:55.185 -> 3ffffbf0: 3ffef4f8 3fffb38c 3fff56fc 3fffb3c4
03:43:55.185 -> 3ffffc00: 00000000 00000000 3fff56fc 00000000
03:43:55.185 -> 3ffffc10: 00000000 00000000 00000000 00000000
03:43:55.185 -> 3ffffc20: 00000000 3fff6454 3fffb4ac 3fffb81c
03:43:55.185 -> 3ffffc30: 3fffbfd4 00000000 00000000 00000000
03:43:55.185 -> 3ffffc40: 00004145 00000255 00000000 00000000
03:43:55.219 -> 3ffffc50: 00000000 00000000 00000000 00000000
03:43:55.219 -> 3ffffc60: 00000000 00000000 3ffe0001 4022c4c0
03:43:55.219 -> 3ffffc70: 3ffffe4e 00000000 7fffff21 ff000208
03:43:55.219 -> 3ffffc80: 00000000 7fffffff 00000000 00000000
03:43:55.219 -> 3ffffc90: 00000000 00000000 00000000 40217d98
03:43:55.219 -> 3ffffca0: 00000000 00220c00 3fff1940 00000000
03:43:55.219 -> 3ffffcb0: 00000000 3ffffbe0 3fffa6a4 0016001f
03:43:55.219 -> 3ffffcc0: ff676173 000001bb 3f001388 3fffadc4
03:43:55.252 -> 3ffffcd0: 00c000cf ff000000 70747468 00000073
03:43:55.252 -> 3ffffce0: 00fe8976 00000000 00000000 0021c16e
03:43:55.252 -> 3ffffcf0: 3fffb324 0011001f ff00153f 00000000
03:43:55.252 -> 3ffffd00: 00000000 00000003 00000000 00000000
03:43:55.252 -> 3ffffd10: 00000000 ffffffff 00000000 4022000a
03:43:55.252 -> 3ffffd20: 00000000 00000000 00000008 00000000
03:43:55.252 -> 3ffffd30: 00000000 00000000 00000000 fffef8e5
03:43:55.285 -> 3ffffd40: 3ffef97c 3ffef99d 3fff0164 3ffffe60
03:43:55.285 -> 3ffffd50: 3ffefab8 3ffffea0 3ffef5b8 40211d41
03:43:55.285 -> 3ffffd60: 3ffffeb0 3fffb3e4 3ffffe94 0000154a
03:43:55.285 -> 3ffffd70: 70747468 2f2f3a73 2e777777 79746963
03:43:55.285 -> 3ffffd80: 72647968 6e6f706f 2e736369 482f6b68
03:43:55.285 -> 3ffffd90: 6f726479 696e6f4d 2f726f74 74736f70
03:43:55.285 -> 3ffffda0: 64697246 61446567 702e6174 6f702f79
03:43:55.285 -> 3ffffdb0: 72467473 65676469 61746144 6573753f
03:43:55.318 -> 3ffffdc0: 6d616e72 72663d65 65676469 7026615f
03:43:55.318 -> 3ffffdd0: 77737361 3d64726f 64697266 615f6567
03:43:55.318 -> 3ffffde0: 7361705f 726f7773 6f6c2664 76656c67
03:43:55.318 -> 3ffffdf0: 343d6c65 73656d26 65676173 6479483d
03:43:55.318 -> 3ffffe00: 6f4d6f72 6f74696e 6f724772 676e6977
03:43:55.318 -> 3ffffe10: 61726150 6574656d 33257372 65732b41
03:43:55.318 -> 3ffffe20: 70752b74 6c6c612b 6568742b 6f72672b
03:43:55.351 -> 3ffffe30: 676e6977 7261702b 74656d61 25737265
03:43:55.351 -> 3ffffe40: 74264532 73656d69 706d6174 4000363d
03:43:55.351 -> 3ffffe50: 3ffefab8 3ffffea0 3ffef5b8 40211caa
03:43:55.351 -> 3ffffe60: 00000001 00000001 3ffef4d0 40204dab
03:43:55.351 -> 3ffffe70: 402251c8 00000000 000003e8 0001ccce
03:43:55.351 -> 3ffffe80: 3fffa664 3fffb294 00000000 00000000
03:43:55.351 -> 3ffffe90: 3fff0450 00000036 00000000 ff21c16e
03:43:55.351 -> 3ffffea0: 3fffb3e4 0045004f ff6f7469 00000006
03:43:55.384 -> 3ffffeb0: 3fff0034 0000001a 3fff0164 40217d98
03:43:55.384 -> 3ffffec0: 00000041 3ffffd70 00000011 00000008
03:43:55.384 -> 3ffffed0: 3ffef99d 000000f2 3ffef97c 3ffffeb0
03:43:55.384 -> 3ffffee0: 00000004 3ffef8e5 3ffef880 40218130
03:43:55.384 -> 3ffffef0: 3fff0110 3ffef5b8 3fff0164 3fffff10
03:43:55.384 -> 3fffff00: 3fff0110 3ffef5b8 3ffefab8 402121b5
03:43:55.384 -> 3fffff10: 00000031 0000003c 3ffef324 40217d83
03:43:55.417 -> 3fffff20: 00000001 4bc6a7f0 0001ccc7 40224948
03:43:55.417 -> 3fffff30: 3fffdad0 00000000 3ffef348 40218114
03:43:55.417 -> 3fffff40: 00000001 00000000 3ffef324 402106f4
03:43:55.417 -> 3fffff50: 00000000 3ffef4f8 3ffefee8 40207a07
03:43:55.417 -> 3fffff60: 3fffdad0 00000000 3ffefda0 3fff0298
03:43:55.417 -> 3fffff70: 3fffdad0 00000000 3ffef3f0 3fff0298
03:43:55.417 -> 3fffff80: 3fffdad0 00000000 3fff0268 402042f9
03:43:55.417 -> 3fffff90: 00000000 00000000 00000001 3fff0298
03:43:55.450 -> 3fffffa0: 3fffdad0 00000000 3fff0268 40219d20
03:43:55.450 -> 3fffffb0: feefeffe feefeffe 3ffe854c 401015d5
03:43:55.450 -> <<<stack<<< 03:43:55.450 -> 03:43:55.450 -> last failed alloc call: 4022D552(1480) 03:43:55.450 -> 03:43:55.450 -> ets Jan 8 2013,rst cause:2, boot mode:(3,6)

Decoding 37 results 0x402222c5: BearSSL::WiFiClientSecure::_installClientX509Validator() at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr_base.h line 986 : (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 316 : (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 598 : (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 614 : (inlined by) BearSSL::WiFiClientSecure::_installClientX509Validator() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 877 0x40222cfc: BearSSL::WiFiClientSecure::_connectSSL(char const) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 962 0x40219c70: esp_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 91 0x4021a8c3: delay at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring.cpp line 54 0x40206d6d: WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/include/ClientContext.h line 136 : (inlined by) WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClient.cpp line 170 0x40222eed: BearSSL::WiFiClientSecure::connect(char const, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 231 0x40225230: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40225230: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40216b5c: HTTPClient::connect() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 1165 0x4021c16e: uart_write at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/uart.cpp line 498 0x40217820: HTTPClient::sendRequest(char const, unsigned char, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 655 0x40217d98: HardwareSerial::write(unsigned char const, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x40273eba: sleep_reset_analog_rtcreg_8266 at ?? line ? 0x402180a5: Print::write(char const) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 60 0x40217d83: HardwareSerial::write(unsigned char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 154 0x402179ba: HTTPClient::GET() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 575 0x402118e8: HydroMonitorLogging::sendPostData(char) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 730 0x40225470: BearSSL::PrivateKey::getEC() const at ?? line ? 0x4022c4c0: _vsprintf_r at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdio/vsprintf.c line 65 0x40217d98: HardwareSerial::write(unsigned char const, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x4022000a: spiffs_object_truncate at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/spiffs/spiffs_nucleus.cpp line 1727 0x40211d41: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 337 0x40211caa: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 326 0x40204dab: handleAPI() at /home/wouter/Arduino/Williams_fridge/Fridge_control/webAPI.ino line 149 0x402251c8: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40217d98: HardwareSerial::write(unsigned char const*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x40218130: Print::println() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.cpp line 178 0x402121b5: HydroMonitorLogging::logData() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 250 0x40217d83: HardwareSerial::write(unsigned char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 154 0x40224948: Print::write(char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 73 0x40218114: Print::print(char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.cpp line 126 0x402106f4: HydroMonitorIsolatedSensorBoard::readSensor(bool) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorIsolatedSensorBoard.cpp line 36 0x40207a07: TwoWire::requestFrom(int, int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/Wire/Wire.cpp line 134 0x402042f9: loop at /home/wouter/Arduino/Williams_fridge/Fridge_control/loop.ino line 36 0x40219d20: loop_wrapper() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 125 0x401015d5: cont_wrapper at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/cont.S line 81

03:41:53.661 -> 03:41:53.661 -> Abort called 03:41:53.661 -> 03:41:53.661 -> >>>stack>>> 03:41:53.661 -> 03:41:53.661 -> ctx: sys 03:41:53.661 -> sp: 3fffecc0 end: 3fffffb0 offset: 01b0 03:41:53.661 -> 3fffee70: 00000000 00000000 3fff06c9 40223024
03:41:53.661 -> 3fffee80: 3fff3e54 3fff06c8 3fff06c9 402230b0
03:41:53.661 -> 3fffee90: 3fff3fc4 00000000 00000000 40230e16
03:41:53.694 -> 3fffeea0: 4024f200 4bc6a7f0 00012fdf 00000038
03:41:53.694 -> 3fffeeb0: 3fff08c8 0104a8c0 00000048 4021ca90
03:41:53.694 -> 3fffeec0: 00000000 00000036 3fffef30 3fff08c8
03:41:53.694 -> 3fffeed0: 3fff0928 3fffb664 3fffb682 40235f39
03:41:53.694 -> 3fffeee0: 00000014 00000000 3fff08c8 4021c84c
03:41:53.694 -> 3fffeef0: 3fffdc90 3fff12fc 3fff530c 3fff1354
03:41:53.694 -> 3fffef00: 00000008 3fff08c8 3fffb664 4022dc75
03:41:53.694 -> 3fffef10: 3fffdc90 3fff12fc 3fff530c 4022daab
03:41:53.727 -> 3fffef20: 40261a52 3fff12fc 3fff530c 40261a63
03:41:53.727 -> 3fffef30: 3fffb674 3fffb664 00000000 3fffdcc0
03:41:53.727 -> 3fffef40: 3ffe95b8 00000000 3fff530c 4026383b
03:41:53.727 -> 3fffef50: 40000f49 3fffdab0 3fffdab0 40000f49
03:41:53.727 -> 3fffef60: 40000e19 40001878 00000002 00000000
03:41:53.727 -> 3fffef70: 3fffff10 aa55aa55 00000013 40105440
03:41:53.727 -> 3fffef80: 40105446 00000002 00000000 ffffffff
03:41:53.760 -> 3fffef90: 4010000d ffffffff ffffffff 814d63c7
03:41:53.760 -> 3fffefa0: 40101610 3fffef3c 401015bd 3ffffa58
03:41:53.760 -> 3fffefb0: 3fffffc0 00000000 00000000 feefeffe
03:41:53.760 -> 3fffefc0: feefeffe feefeffe feefeffe feefeffe
03:41:53.760 -> 3fffefd0: feefeffe feefeffe feefeffe feefeffe
03:41:53.760 -> 3fffefe0: feefeffe feefeffe feefeffe feefeffe
03:41:53.760 -> 3fffeff0: feefeffe feefeffe feefeffe feefeffe
03:41:53.760 -> 3ffff000: feefeffe feefeffe feefeffe feefeffe
03:41:53.793 -> 3ffff010: feefeffe feefeffe feefeffe feefeffe
03:41:53.793 -> 3ffff020: feefeffe feefeffe feefeffe feefeffe
03:41:53.793 -> 3ffff030: feefeffe feefeffe feefeffe feefeffe
03:41:53.793 -> 3ffff040: feefeffe feefeffe feefeffe feefeffe
03:41:53.793 -> 3ffff050: feefeffe feefeffe feefeffe feefeffe
03:41:53.793 -> 3ffff060: feefeffe feefeffe feefeffe feefeffe
03:41:53.793 -> 3ffff070: feefeffe feefeffe feefeffe feefeffe
03:41:53.826 -> 3ffff080: feefeffe feefeffe feefeffe feefeffe
03:41:53.826 -> 3ffff090: feefeffe feefeffe feefeffe feefeffe
03:41:53.826 -> 3ffff0a0: feefeffe feefeffe feefeffe feefeffe
03:41:53.826 -> 3ffff0b0: feefeffe feefeffe feefeffe feefeffe
03:41:53.826 -> 3ffff0c0: feefeffe feefeffe feefeffe feefeffe
03:41:53.826 -> 3ffff0d0: feefeffe feefeffe feefeffe feefeffe
03:41:53.826 -> 3ffff0e0: feefeffe feefeffe feefeffe feefeffe
03:41:53.859 -> 3ffff0f0: feefeffe feefeffe feefeffe feefeffe
03:41:53.859 -> 3ffff100: feefeffe feefeffe feefeffe feefeffe
03:41:53.859 -> 3ffff110: feefeffe feefeffe feefeffe feefeffe
03:41:53.859 -> 3ffff120: feefeffe feefeffe feefeffe feefeffe
03:41:53.859 -> 3ffff130: feefeffe feefeffe feefeffe feefeffe
03:41:53.859 -> 3ffff140: feefeffe feefeffe feefeffe feefeffe
03:41:53.859 -> 3ffff150: 00000000 00000000 0000001f 40105c19
03:41:53.893 -> 3ffff160: 4000050c feefeffe feefeffe feefeffe
03:41:53.893 -> 3ffff170: 40239c26 00000030 00000007 ffffffff
03:41:53.893 -> 3ffff180: 40239c1c 3ffff2ec c6792893 3ea1d646
03:41:53.893 -> 3ffff190: 88ba605e 97fa00b2 3bf66981 3ffff368
03:41:53.893 -> 3ffff1a0: 9222be62 cc175b2e a851ed78 00000040
03:41:53.893 -> 3ffff1b0: 3ffff440 00000040 00000000 00000030
03:41:53.893 -> 3ffff1c0: 3a942f60 efee487e 2b7fa26e 7f1ddea3
03:41:53.893 -> 3ffff1d0: da0a48c6 c8354a59 6739b17c 476a802e
03:41:53.926 -> 3ffff1e0: 00000000 00000000 0000001f 40105c19
03:41:53.926 -> 3ffff1f0: 00000000 00000000 0000001f 40105c19
03:41:53.926 -> 3ffff200: 4000050c 00000030 00000007 ffffffff
03:41:53.926 -> 3ffff210: 40239e58 00000030 00000016 ffffffff
03:41:53.926 -> 3ffff220: 40239c1c 2c90d731 0ca74e61 3acad39b
03:41:53.926 -> 3ffff230: 08824201 ec2474d8 2c80d731 02eb9d26
03:41:53.926 -> 3ffff240: afb09e37 2007fcb2 5500d7a1 4947501e
03:41:53.959 -> 3ffff250: 06a6a6c1 440b5764 cd81966f 5b73ee77
03:41:53.959 -> 3ffff260: fe399128 8f813ce4 cf0b3d94 209a95ec
03:41:53.959 -> 3ffff270: 383de23c b8c2ffed b83a2937 dd3681bc
03:41:53.959 -> 3ffff280: 5c5c5c5c 5c5c5c5c 5c5c5c5c 5c5c5c5c
03:41:53.959 -> 3ffff290: 5c5c5c5c 5c5c5c5c 5c5c5c5c 5c5c5c5c
03:41:53.959 -> 3ffff2a0: 981ea63b 90aa8dfd 2c8dc245 9c550cb7
03:41:53.959 -> 3ffff2b0: 618e0371 2f4464a6 98d90f82 d8454f6e
03:41:53.992 -> 3ffff2c0: 374237b1 3b7ae93e f9f8fafb 8bc48859
03:41:53.992 -> 3ffff2d0: 91e1e323 6e5e95ba a69792a2 f9cd90da
03:41:53.992 -> 3ffff2e0: 59119284 0445c2a2 f2f71b06 f569c7bf
03:41:53.992 -> 3ffff2f0: 8f6b439a 06bb8b89 f1a80246 cf757ea3
03:41:53.992 -> 3ffff300: fe35ed5f 159a5823 bb17cb4b b01776b5
03:41:53.992 -> 3ffff310: 7306596a 866c3d6d 5bd9b559 9f861df2
03:41:53.992 -> 3ffff320: 99dc135c 8b7d6a63 2db922c8 bb7e40b5
03:41:53.992 -> 3ffff330: 80000000 00000000 00000000 00000000
03:41:54.025 -> 3ffff340: 00000000 00000000 00000000 00000300
03:41:54.025 -> 3ffff350: 37a097b6 5ce710a4 26ad52be b8b6d657
03:41:54.025 -> 3ffff360: 29bf457a 1aaacecd 6405be49 42d87d1e
03:41:54.025 -> 3ffff370: 45dbb091 57e9b1e6 6702d311 00000080
03:41:54.025 -> 3ffff380: 03030000 010000da 21171d91 0000f21f
03:41:54.025 -> 3ffff390: 3875a795 3bfab2d1 c3a9587d d3dd3fc7
03:41:54.025 -> 3ffff3a0: ccc30000 a9b0b08f a8c02bc0 5acca9cc
03:41:54.058 -> 3ffff3b0: 30c0acc0 2fc02cc0 afc023c0 adc0aec0
03:41:54.058 -> 3ffff3c0: 28c009c0 27c024c0 14c02dc0 13c00ac0
03:41:54.058 -> 3ffff3d0: 32c025c0 31c02ec0 2ac004c0 29c026c0
03:41:54.058 -> 3ffff3e0: 0f009c00 0ec005c0 9dc0a0c0 9dc09cc0
03:41:54.058 -> 3ffff3f0: 3d002f00 a1003c00 12c003c0 35c008c0
03:41:54.058 -> 3ffff400: b92164c7 35267885 da9cacc9 e921b83a
03:41:54.058 -> 3ffff410: 1dc518b9 80d58da0 5167092c 16f04930
03:41:54.058 -> 3ffff420: 4c08c872 dcb25999 814d51bd 2a59465a
03:41:54.091 -> 3ffff430: a7d64b3a fc84aa4d 059fb607 aec46bda
03:41:54.091 -> 3ffff440: eb1ec120 096641ce 554d275d efa0aa1b
03:41:54.091 -> 3ffff450: 84aa20c0 b07e6158 90d981b1 e83632ce
03:41:54.091 -> 3ffff460: 2afcbd51 8d8a412e df34bd7d 5dcfd90b
03:41:54.091 -> 3ffff470: 33630411 2450fe18 7e32d9a7 1598fddd
03:41:54.091 -> 3ffff480: 14a72aaa a407792a e9e13a96 0a314189
03:41:54.091 -> 3ffff490: 092d5362 584d74e7 cad3b144 38a78c93
03:41:54.124 -> 3ffff4a0: 5635d495 cc3b556f a1d872cc 47e89b03
03:41:54.124 -> 3ffff4b0: f92639f4 bc282124 541da816 a77761b5
03:41:54.124 -> 3ffff4c0: bb4b08e3 e4077672 a3df0556 6e01d5d4
03:41:54.124 -> 3ffff4d0: 69d6b8b3 700103e9 c4de7492 dbe1aac4
03:41:54.124 -> 3ffff4e0: 8c3fe5d9 ff530e65 0af76454 b02d1430
03:41:54.124 -> 3ffff4f0: f61f48bf ff9938b5 e3035d1e 62b2ad43
03:41:54.124 -> 3ffff500: 67857422 bb30a0c3 43846b74 48bd205e
03:41:54.158 -> 3ffff510: 44f04c9a 0236e286 331acdd3 73ea01a6
03:41:54.158 -> 3ffff520: 17fcf856 83d16dcb e9bef60a ba7807f4
03:41:54.158 -> 3ffff530: 101dddaf e6bbf377 24bb4c5a 82c03e14
03:41:54.158 -> 3ffff540: 4d9bd005 1c680807 eaaa84f2 f94adb4c
03:41:54.158 -> 3ffff550: 3cfbe635 7bb940c4 82fe307b 208938d3
03:41:54.158 -> 3ffff560: aa97e115 68745fd4 bf0ad2d0 9b79c528
03:41:54.158 -> 3ffff570: de6f02fe 70797af4 89190cde 8169940a
03:41:54.191 -> 3ffff580: 2495e250 6758cfa2 79a2dc25 886661b0
03:41:54.191 -> 3ffff590: 718fc86c 14326cf0 753f8d73 0d614bd8
03:41:54.191 -> 3ffff5a0: 4113f5b5 cf0beb9c bac05cc3 22f972d8
03:41:54.191 -> 3ffff5b0: cc4fc0e0 88e2b176 931f634e 9201e123
03:41:54.191 -> 3ffff5c0: 570b4bac f1a72cf3 d9066228 13fc90b8
03:41:54.191 -> 3ffff5d0: f8cba8bd 5bc9f8da a60682c1 e5064d75
03:41:54.191 -> 3ffff5e0: 1e41e848 d1b685d6 2cb27cec e706fbcd
03:41:54.191 -> 3ffff5f0: 477299f5 55aebb63 62a4329a 4a4ca8e6
03:41:54.224 -> 3ffff600: ae43819b 8c130af9 40278bb0 30035115
03:41:54.224 -> 3ffff610: 3ffff608 7d6c851e 920c11c8 dfe3ce58
03:41:54.224 -> 3ffff620: 6761dd5a 54d1b0e7 2184699d 078198b4
03:41:54.224 -> 3ffff630: 2d111405 00000000 aec3819b 00000100
03:41:54.224 -> 3ffff640: 00000068 00000001 40105282 3ffed648
03:41:54.224 -> 3ffff650: 3ffed5d0 fa11b37e 6761dd5a b3f3f31c
03:41:54.224 -> 3ffff660: 3ffff7a0 7d6c851e 8c130af9 920c11c8
03:41:54.257 -> 3ffff670: 40104e87 3ffed648 f3bcc908 6a09e667
03:41:54.257 -> 3ffff680: 84caa73b 401047fa 3ffed648 3c6ef372
03:41:54.257 -> 3ffff690: 5f1d36f1 a54ff53a ade682d1 510e527f
03:41:54.257 -> 3ffff6a0: 40104d91 3ffed648 3ffecbf0 00000002
03:41:54.257 -> 3ffff6b0: 0000007f 5be0cd19 748f82ee 0b61faa0
03:41:54.257 -> 3ffff6c0: 4010504c 00080000 7fffffff 00000000
03:41:54.257 -> 3ffff6d0: 40103183 00000080 00000080 40239984
03:41:54.290 -> 3ffff6e0: 00000000 3ffff7a0 53002200 4000050c
03:41:54.290 -> 3ffff6f0: 3fffc278 40103004 3fffc200 00000022
03:41:54.290 -> 3ffff700: 3ffff710 00000006 3fff4cfc 4024697d
03:41:54.290 -> 3ffff710: 4025cb14 00000030 00000000 ffffffff
03:41:54.290 -> 3ffff720: 4025cb12 3ffecb50 000000b4 00002009
03:41:54.290 -> 3ffff730: 00080240 3ffed2f0 00000000 3fffbe98
03:41:54.290 -> 3ffff740: 00000000 00000008 000000c0 3ffecb50
03:41:54.290 -> 3ffff750: 3fff0acc 00000001 3fff2a70 00000030
03:41:54.323 -> 3ffff760: c02dc014 c02ec031 c025c032 c026c029
03:41:54.323 -> 3ffff770: c004c02a c005c00e 009c000f c09cc09d
03:41:54.323 -> 3ffff780: c0a0c09d 003c00a1 002f003d c008c035
03:41:54.323 -> 3ffff790: c003c012 ae58a029 00000080 00000000
03:41:54.323 -> 3ffff7a0: 23c01a1d 49edb4c0 338e28d6 b4558f8b
03:41:54.323 -> 3ffff7b0: 65f6d585 f062e68f 4025da93 00000001
03:41:54.323 -> 3ffff7c0: ffffffff 00000000 3ffe95d1 00000008
03:41:54.356 -> 3ffff7d0: 4025dae2 3ffecbf0 3fff0acc 00000001
03:41:54.356 -> 3ffff7e0: 4025dbee 3ffecbf0 3fff0acc 3ffecbf0
03:41:54.356 -> 3ffff7f0: 00000007 00000007 00000008 3fff51f0
03:41:54.356 -> 3ffff800: 3ffe9482 4025cb97 3ffecbf0 3fff2a54
03:41:54.356 -> 3ffff810: 00000000 4024ff3f 3ffee0b8 00000008
03:41:54.356 -> 3ffff820: 00000000 00000002 00000000 3ffecbf0
03:41:54.356 -> 3ffff830: 3fff520a 401059bf 3fff2a54 3fff125c
03:41:54.356 -> 3ffff840: 3fff51d4 00000000 00000020 40101f3e
03:41:54.389 -> 3ffff850: 3ffe9482 4022d689 3fff04a4 3fff125c
03:41:54.389 -> 3ffff860: 3fff520a 00000036 3ffee0b8 6c861907
03:41:54.389 -> 3ffff870: 00000000 00000002 00000000 00000000
03:41:54.389 -> 3ffff880: 3fff08b8 3fff0880 3fff51d4 4022d90b
03:41:54.389 -> 3ffff890: 3fffb92c 3fff0880 3fff51d4 4022dcfc
03:41:54.389 -> 3ffff8a0: 3fff071c 00000000 00000005 00000000
03:41:54.389 -> 3ffff8b0: 00000002 00000000 00000020 00000100
03:41:54.422 -> 3ffff8c0: 0000006c 00000001 40105282 3ffed648
03:41:54.422 -> 3ffff8d0: 3ffed5d0 00000000 40105282 000000ff
03:41:54.422 -> 3ffff8e0: 00000005 00000000 00000020 40101f3e
03:41:54.422 -> 3ffff8f0: 00000005 00000000 00000020 40101f3e
03:41:54.422 -> 3ffff900: 00000002 00000000 00000020 40101f3e
03:41:54.422 -> 3ffff910: 3ffe9482 4010531c 3ffecbf0 401031ae
03:41:54.422 -> 3ffff920: 00000001 4010453f 3ffed648 40102e2a
03:41:54.422 -> 3ffff930: 401049a2 04a308de 3ffed8e0 40102e2a
03:41:54.456 -> 3ffff940: 3ffe9d30 00000000 00000000 00000100
03:41:54.456 -> 3ffff950: 40104486 00000021 7fffffff 00000002
03:41:54.456 -> 3ffff960: 00000121 40104282 00040000 00000001
03:41:54.456 -> 3ffff970: 40103307 00080000 00002200 4000050c
03:41:54.456 -> 3ffff980: 00000000 04a308de 00002200 4000050c
03:41:54.456 -> 3ffff990: 3fffc278 40103004 3fffc200 00000022
03:41:54.456 -> 3ffff9a0: 3ffff9b0 00000030 00000010 ffffffff
03:41:54.489 -> 3ffff9b0: 40222947 00000030 0000001c ffffffff
03:41:54.489 -> 3ffff9c0: 4022293f 00000004 00000004 3fff41ec
03:41:54.489 -> 3ffff9d0: 0000013f 00004145 00000000 fffffffe
03:41:54.489 -> 3ffff9e0: ffffffff 3fffc6fc 00000001 3ffffc00
03:41:54.489 -> 3ffff9f0: 005c7083 00000008 00000001 00000030
03:41:54.489 -> 3ffffa00: 00000000 00000218 00000860 40232e5e
03:41:54.489 -> 3ffffa10: 3fff0880 000000e3 3fff4f44 3fffb534
03:41:54.489 -> 3ffffa20: 3fff0474 000015f3 000015f3 4021c84c
03:41:54.522 -> 3ffffa30: 00000000 00000000 3fffb92c 4021cc74
03:41:54.522 -> 3ffffa40: 000000e3 00000001 3fff3f6c 40236c40
03:41:54.522 -> 3ffffa50: 3fff3f6c 00000218 3ffe854c 005c7091
03:41:54.522 -> 3ffffa60: 00000008 00000001 40219c70 3fffefa0
03:41:54.522 -> 3ffffa70: 00000008 00000001 00000064 40219d52
03:41:54.522 -> 3ffffa80: 3fff6ec9 00000000 00000064 40219d95
03:41:54.522 -> 3ffffa90: 00000000 00000000 3ffffc00 40206323
03:41:54.555 -> 3ffffaa0: 00000008 005c7091 3ffffc00 4022299e
03:41:54.555 -> 3ffffab0: 0000056f 00000005 75ab1126 00000000
03:41:54.555 -> 3ffffac0: 4023c02c 4023bfd4 3fff41ec 4023bae2
03:41:54.555 -> 3ffffad0: 3fff46ec 3fff3f44 3fff41ec 00000001
03:41:54.555 -> 3ffffae0: 00000001 00000001 3ffffc00 40222be4
03:41:54.555 -> 3ffffaf0: 3fff3f44 00000000 3ffffc00 40222dd0
03:41:54.555 -> 3ffffb00: 00000000 3ffffb60 40219c70 3fffefa0
03:41:54.555 -> 3ffffb10: 00000000 00000000 00000000 4021a8c3
03:41:54.588 -> 3ffffb20: 00000000 3fff3f6c 3ffffc00 40206d6d
03:41:54.588 -> 3ffffb30: 000001bb 00000d50 3ffffcec 00000000
03:41:54.588 -> 3ffffb40: 000001bb 3ffffc00 3fff3f44 00000000
03:41:54.588 -> 3ffffb50: 000001bb 3ffffc00 3fff3f44 40222eed
03:41:54.588 -> 3ffffb60: 40225230 5969807a 40225230 5969807a
03:41:54.588 -> 3ffffb70: 3ffe8a18 3ffffc00 3ffffccc 40216b5c
03:41:54.588 -> 3ffffb80: 3ffe8976 00000000 3ffe8975 4021c16e
03:41:54.588 -> 3ffffb90: 00000000 00000000 3ffffccc 40217820
03:41:54.621 -> 3ffffba0: 0000b80f 0000000a 3fff0164 40217d98
03:41:54.621 -> 3ffffbb0: 40273eba 0000002e 3fff244c 402180a5
03:41:54.621 -> 3ffffbc0: 3ffe8974 3fff0164 00000000 40217d83
03:41:54.621 -> 3ffffbd0: 00000000 fffffea0 3fff0164 00000001
03:41:54.621 -> 3ffffbe0: 0000b80f 3ffffea0 3fff0164 402179ba
03:41:54.621 -> 3ffffbf0: 0000b80f 3ffffea0 3fff0164 402118e8
03:41:54.621 -> 3ffffc00: 40225470 00000000 00003a98 40217ae1
03:41:54.654 -> 3ffffc10: 3ffef4f8 3fff3f6c 3fff41ec 3fff3f1c
03:41:54.654 -> 3ffffc20: 00000000 00000000 3fff41ec 00000000
03:41:54.654 -> 3ffffc30: 00000000 3fffabe4 3fff51bc 00000000
03:41:54.654 -> 3ffffc40: 00000000 3fff6a94 3fffb58c 3fff4f44
03:41:54.654 -> 3ffffc50: 3fff51a4 00000000 00000000 00000000
03:41:54.654 -> 3ffffc60: 00004145 00000255 00000000 00000000
03:41:54.654 -> 3ffffc70: 00000000 00000000 00000000 00000000
03:41:54.654 -> 3ffffc80: 00000000 00000000 3ffe0001 4022c4c0
03:41:54.687 -> 3ffffc90: 3ffffe58 00000000 7fffff37 ff000208
03:41:54.687 -> 3ffffca0: 00000000 7fffffff 00000000 00000000
03:41:54.687 -> 3ffffcb0: 00000000 00000000 00000000 40217d98
03:41:54.687 -> 3ffffcc0: 00000000 00676f6c 00318500 00000000
03:41:54.687 -> 3ffffcd0: 00000000 3ffffc00 3fff3f44 0016001f
03:41:54.687 -> 3ffffce0: ff000005 3f0001bb 3f001388 3fff4084
03:41:54.687 -> 3ffffcf0: 00aa00af ff000100 70747468 00000073
03:41:54.720 -> 3ffffd00: 00fe8976 00000000 00000000 0021c16e
03:41:54.720 -> 3ffffd10: 3fff3a04 0011001f ffff1940 00000000
03:41:54.720 -> 3ffffd20: 00000000 00000003 00000000 00000000
03:41:54.720 -> 3ffffd30: 00000000 ffffffff 00000000 4022000a
03:41:54.720 -> 3ffffd40: 00000000 00000000 00000008 00000000
03:41:54.720 -> 3ffffd50: 00000000 00000000 00000000 fffef8e5
03:41:54.720 -> 3ffffd60: 3ffef97c 3ffef99d 3fff0164 3ffffe60
03:41:54.720 -> 3ffffd70: 3ffefab8 3ffffea0 3ffef5b8 40211d41
03:41:54.753 -> 3ffffd80: 3ffffeb0 3fff3a3c 3ffffe94 0000001f
03:41:54.753 -> 3ffffd90: 70747468 2f2f3a73 2e777777 79746963
03:41:54.753 -> 3ffffda0: 72647968 6e6f706f 2e736369 482f6b68
03:41:54.753 -> 3ffffdb0: 6f726479 696e6f4d 2f726f74 74736f70
03:41:54.753 -> 3ffffdc0: 64697246 61446567 702e6174 6f702f79
03:41:54.753 -> 3ffffdd0: 72467473 65676469 61746144 6573753f
03:41:54.753 -> 3ffffde0: 6d616e72 72663d65 65676469 7026615f
03:41:54.787 -> 3ffffdf0: 77737361 3d64726f 64697266 615f6567
03:41:54.787 -> 3ffffe00: 7361705f 726f7773 6f6c2664 76656c67
03:41:54.787 -> 3ffffe10: 353d6c65 73656d26 65676173 7461573d
03:41:54.787 -> 3ffffe20: 65547265 6553706d 726f736e 2b413325
03:41:54.787 -> 3ffffe30: 666e6f63 72756769 442b6465 42383153
03:41:54.787 -> 3ffffe40: 732b3032 6f736e65 45322572 6d697426
03:41:54.787 -> 3ffffe50: 61747365 353d706d 3ffef500 40211caa
03:41:54.820 -> 3ffffe60: 40100f25 00000030 00000010 ffffffff
03:41:54.820 -> 3ffffe70: 402251c8 00000000 000003e8 0000b80d
03:41:54.820 -> 3ffffe80: 3fff0a14 3fff0a54 00000000 00000000
03:41:54.820 -> 3ffffe90: 3fff0450 00000035 00000000 ff21c16e
03:41:54.820 -> 3ffffea0: 3fff3a3c 002f002f ff655370 00000005
03:41:54.820 -> 3ffffeb0: 3fff0035 0000001a 3fff0164 40217d98
03:41:54.820 -> 3ffffec0: 0000002b 3ffffd90 00000011 00000008
03:41:54.853 -> 3ffffed0: 3ffef99d 000000dc 3ffef97c 3ffffeb0
03:41:54.853 -> 3ffffee0: 00000005 3ffef8e5 3ffef880 40218130
03:41:54.853 -> 3ffffef0: 3fff0110 3ffef5b8 3fff0164 3fffff10
03:41:54.853 -> 3fffff00: 3fff0110 3ffef5b8 3ffefab8 402121b5
03:41:54.853 -> 3fffff10: 000000ff 00000021 00000000 4021a6d9
03:41:54.853 -> 3fffff20: 40217a78 4bc6a7f0 0000b809 3fff0298
03:41:54.853 -> 3fffff30: 3fffdad0 00028b04 3ffef348 40208b4e
03:41:54.853 -> 3fffff40: 00000001 00000000 3ffef324 402106d8
03:41:54.886 -> 3fffff50: 00000000 00000000 3ffefee8 40207a07
03:41:54.886 -> 3fffff60: 3fffdad0 00000000 3ffefda0 3fff0298
03:41:54.886 -> 3fffff70: 3fffdad0 00000000 3ffef3f0 3fff0298
03:41:54.886 -> 3fffff80: 3fffdad0 00000000 3fff0268 402042f9
03:41:54.886 -> 3fffff90: 00000000 00000000 00000001 3fff0298
03:41:54.886 -> 3fffffa0: 3fffdad0 00000000 3fff0268 40219d20
03:41:54.886 -> <<<stack<<< 03:41:54.886 -> 03:41:54.886 -> last failed alloc call: 4022D552(48) 03:41:54.919 -> 03:41:54.919 -> ets Jan 8 2013,rst cause:2, boot mode:(3,6)

ecoding 120 results 0x40223024: WiFiServer::_accept(tcp_pcb, long) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/include/ClientContext.h line 41 : (inlined by) WiFiServer::_accept(tcp_pcb, long) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiServer.cpp line 167 0x402230b0: WiFiServer::_s_accept(void, tcp_pcb, long) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiServer.cpp line 181 0x40230e16: tcp_process at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_in.c line 942 : (inlined by) tcp_input at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_in.c line 438 0x4024f200: ieee80211_decap at ?? line ? 0x4021ca90: malloc at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1677 0x40235f39: ip4_input at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c line 710 0x4021c84c: _umm_free at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1304 0x4022dc75: ethernet_input_LWIP2 at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 188 0x4022daab: esp2glue_ethernet_input at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c line 441 0x40261a52: ethernet_input at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 363 0x40261a63: ethernet_input at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 371 0x4026383b: ets_snprintf at ?? line ? 0x40105440: call_user_start_local at ?? line ? 0x40105446: call_user_start_local at ?? line ? 0x4010000d: call_user_start at ?? line ? 0x40101610: cont_ret at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/cont.S line 142 0x401015bd: cont_continue at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/cont.S line 51 0x40105c19: ets_timer_disarm at ?? line ? 0x40239c26: br_sha2small_round at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2small.c line 87 (discriminator 2) 0x40239c1c: br_sha2small_round at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2small.c line 85 0x40105c19: ets_timer_disarm at ?? line ? 0x40105c19: ets_timer_disarm at ?? line ? 0x40239e58: br_sha2small_round at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2small.c line 102 (discriminator 2) 0x40239c1c: br_sha2small_round at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2small.c line 85 0x40278bb0: chip_v6_unset_chanfreq at ?? line ? 0x40105282: lmacTxFrame at ?? line ? 0x40104e87: lmacMSDUAged at ?? line ? 0x401047fa: lmacRecycleMPDU at ?? line ? 0x40104d91: lmacMSDUAged at ?? line ? 0x4010504c: lmacProcessAckTimeout at ?? line ? 0x40103183: wDev_ProcessFiq at ?? line ? 0x40239984: sha2big_update at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2big.c line 165 : (inlined by) br_sha384_update at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2big.c line 207 0x40103004: wDev_ProcessFiq at ?? line ? 0x4024697d: br_multihash_update at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/multihash.c line 141 0x4025cb14: ppTxPkt at ?? line ? 0x4025cb12: ppTxPkt at ?? line ? 0x4025da93: pp_attach at ?? line ? 0x4025dae2: pp_attach at ?? line ? 0x4025dbee: pp_attach at ?? line ? 0x4025cb97: ppTxPkt at ?? line ? 0x4024ff3f: ieee80211_output_pbuf at ?? line ? 0x401059bf: wdt_feed at ?? line ? 0x40101f3e: pp_post at ?? line ? 0x4022d689: glue2esp_linkoutput at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 299 0x4022d90b: new_linkoutput at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c line 235 0x4022dcfc: ethernet_output at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 312 0x40105282: lmacTxFrame at ?? line ? 0x40105282: lmacTxFrame at ?? line ? 0x40101f3e: pp_post at ?? line ? 0x40101f3e: pp_post at ?? line ? 0x40101f3e: pp_post at ?? line ? 0x4010531c: lmacTxFrame at ?? line ? 0x401031ae: wDev_ProcessFiq at ?? line ? 0x4010453f: lmacRecycleMPDU at ?? line ? 0x40102e2a: trc_NeedRTS at ?? line ? 0x401049a2: lmacRecycleMPDU at ?? line ? 0x40102e2a: trc_NeedRTS at ?? line ? 0x40104486: lmacProcessTxSuccess at ?? line ? 0x40104282: lmacProcessTXStartData at ?? line ? 0x40103307: wDev_ProcessFiq at ?? line ? 0x40103004: wDev_ProcessFiq at ?? line ? 0x40222947: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 452 0x4022293f: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 447 0x40232e5e: tcp_output at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_out.c line 1319 0x4021c84c: _umm_free at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1304 0x4021cc74: free at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1764 0x40236c40: mem_free at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/mem.c line 237 0x40219c70: esp_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 91 0x40219d52: yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 100 0x40219d95: optimistic_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 115 0x40206323: WiFiClient::available() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClient.cpp line 263 0x4022299e: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 510 0x4023c02c: br_ssl_hs_client_run at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/ssl/ssl_hs_client.c line 958 0x4023bfd4: pgm_read_word_inlined at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/pgmspace.h line 67 : (inlined by) br_ssl_hs_client_init_main at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/ssl/ssl_hs_client.c line 904 0x4023bae2: br_ssl_engine_hs_reset at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/ssl/ssl_engine.c line 1305 0x40222be4: BearSSL::WiFiClientSecure::_wait_for_handshake() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 547 0x40222dd0: BearSSL::WiFiClientSecure::_connectSSL(char const) at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 291 : (inlined by) BearSSL::WiFiClientSecure::_connectSSL(char const) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 1009 0x40219c70: esp_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 91 0x4021a8c3: delay at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring.cpp line 54 0x40206d6d: WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/include/ClientContext.h line 136 : (inlined by) WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClient.cpp line 170 0x40222eed: BearSSL::WiFiClientSecure::connect(char const, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 231 0x40225230: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40225230: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40216b5c: HTTPClient::connect() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 1165 0x4021c16e: uart_write at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/uart.cpp line 498 0x40217820: HTTPClient::sendRequest(char const, unsigned char, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 655 0x40217d98: HardwareSerial::write(unsigned char const, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x40273eba: sleep_reset_analog_rtcreg_8266 at ?? line ? 0x402180a5: Print::write(char const) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 60 0x40217d83: HardwareSerial::write(unsigned char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 154 0x402179ba: HTTPClient::GET() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 575 0x402118e8: HydroMonitorLogging::sendPostData(char) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 730 0x40225470: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40217ae1: EspClass::flashRead(unsigned int, unsigned int, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Esp.cpp line 639 0x4022c4c0: _vsprintf_r at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdio/vsprintf.c line 65 0x40217d98: HardwareSerial::write(unsigned char const, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x4022000a: spiffs_object_truncate at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/spiffs/spiffs_nucleus.cpp line 1727 0x40211d41: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 337 0x40211caa: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 326 0x40100f25: millis at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring.cpp line 180 0x402251c8: BearSSL::PrivateKey::getEC() const at ?? line ? 0x40217d98: HardwareSerial::write(unsigned char const*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158 0x40218130: Print::println() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.cpp line 178 0x402121b5: HydroMonitorLogging::logData() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 250 0x4021a6d9: twi_readFrom at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_si2c.cpp line 294 (discriminator 1) 0x40217a78: EspClass::getCpuFreqMHz() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Esp.cpp line 264 0x40208b4e: SoftwareSerial::available() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.cpp line 220 0x402106d8: HydroMonitorIsolatedSensorBoard::readSensor(bool) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorIsolatedSensorBoard.cpp line 33 0x40207a07: TwoWire::requestFrom(int, int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/Wire/Wire.cpp line 134 0x402042f9: loop at /home/wouter/Arduino/Williams_fridge/Fridge_control/loop.ino line 36 0x40219d20: loop_wrapper() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 125

wvmarle commented 5 years ago

Another typical thing that I observer

The GET request itself has never been logged at my server side, it didn't come through.

d-a-v commented 5 years ago

last failed alloc call: 4022D552(1480)

It seems like it is lwIP trying to allocate a packet (to send or receive, I can't tell)

The crashes are all linked to the actions as described above: while an outgoing connection is handled (during the https.GET() call - it's in the library, in HydroMonitorLogging::sendPostData(char*), file HydroMonitorLogging.cpp, is where it goes wrong), an incoming connection causes the program to crash. This I confirmed with lots of print statements that tell me exactly where in the code it is. Disabling that function (place a return 404 line at the top of it making, thus pretending the connection failed) makes the whole thing solid.

You can

I think we need to make an MCVE with TCP and/or SSL and short memory to be able to check and fix if it leads to a crash (so far I always tried to stay far from short memory).

wvmarle commented 5 years ago

It seems like it is lwIP trying to allocate a packet (to send or receive, I can't tell)

Could be both, as it's supposed to both send and receive data, but neither seems to happen. It just gets stuck.

I've added the Esp.getFreeHeap() in loop() already to see what happens to the heap in every run of loop(), printing the new value if it has changed since the previous run. Values hover around 33,000, when a request comes in it drops down by about 900 bytes, which a few runs of loop() later are freed and it returns to the previous value. This appears to be quite constant, I see the same numbers time and again. Looks like a big enough number to me, isn't it?

I found the OOM option; enabled it; recompiling. I'll try to trigger the problem again. I can't find the lwip-v2 option in the Arduino IDE.

wvmarle commented 5 years ago

I here have another decoded stack trace - appears to be related, but it's a bit different: the "last malloc call" address is in the stack trace, pointing to SPIFFS.

However my debug messages (from Serial.print() statements) show that my code continued beyond the point of that SPIFFS read (it reads the data from the log file to be sent out), implying that this call actually did work.

Then it tried to transmit the data, code got stuck for about 45 mins before continuing. My millis() counter indicated 840 seconds passed, that's just over 13 minutes. Apparently even the millis() counter got hung up here.

This was followed by a print() statement which comes from near the end of yet ANOTHER function, earlier prints of that function were missing (and it should never have executed that function in the first place): that indicates some kind of memory corruption, as execution continued at the wrong place, and the below stack dump appeared. I only posted the decoded part.

If only I had a sure-fire way of triggering this... I'd have the MVCE already.

16:41:02.965 -> last failed alloc call: 4022D60A(1480)

0x40222379: BearSSL::WiFiClientSecure::_installClientX509Validator() at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr_base.h line 986
:  (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 316
:  (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 598
:  (inlined by) ?? at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 614
:  (inlined by) BearSSL::WiFiClientSecure::_installClientX509Validator() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 877
0x40222db0: BearSSL::WiFiClientSecure::_connectSSL(char const*) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 962
0x40219d24: esp_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 91
0x4021a977: delay at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring.cpp line 54
0x40206df9: WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/include/ClientContext.h line 136
:  (inlined by) WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClient.cpp line 170
0x40222fa1: BearSSL::WiFiClientSecure::connect(char const*, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 231
0x402252e8: BearSSL::PrivateKey::getEC() const at ?? line ?
0x402252e8: BearSSL::PrivateKey::getEC() const at ?? line ?
0x40216c00: HTTPClient::connect() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 1165
0x4021c222: uart_write at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/uart.cpp line 498
0x402178c4: HTTPClient::sendRequest(char const*, unsigned char*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 655
0x40217e4c: HardwareSerial::write(unsigned char const*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158
0x40273fd6: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x40218159: Print::write(char const*) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 60
0x40217e37: HardwareSerial::write(unsigned char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 154
0x40217a5e: HTTPClient::GET() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 575
0x40211974: HydroMonitorLogging::sendPostData(char*) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 730
0x40225528: BearSSL::PrivateKey::getEC() const at ?? line ?
0x4022c578: _vsprintf_r at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdio/vsprintf.c line 65
0x40217e4c: HardwareSerial::write(unsigned char const*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158
0x40103004: wDev_ProcessFiq at ?? line ?
0x4022000a: spiffs_object_modify at ?? line ?
0x40211b8e: HydroMonitorLogging::transmitData() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 288
0x4022d60a: operator new(unsigned int) at /workdir/arena/gcc/xtensa-lx106-elf/libstdc++-v3-nox/libsupc++/../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/new_op.cc line 52
0x4021b950: SPIFFSImpl::open(char const*, fs::OpenMode, fs::AccessMode) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/spiffs_api.cpp line 53
0x4021cd28: free at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1764
0x40225280: BearSSL::PrivateKey::getEC() const at ?? line ?
0x40218159: Print::write(char const*) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 60
0x40205d88: ESP8266WiFiSTAClass::status() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp line 613
0x40212241: HydroMonitorLogging::logData() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 246
0x40225280: BearSSL::PrivateKey::getEC() const at ?? line ?
0x40225280: BearSSL::PrivateKey::getEC() const at ?? line ?
0x40207a93: TwoWire::requestFrom(int, int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/Wire/Wire.cpp line 134
0x40204309: loop at /home/wouter/Arduino/Williams_fridge/Fridge_control/loop.ino line 36
0x40219dd4: loop_wrapper() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 125
0x401015d5: cont_wrapper at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/cont.S line 81
wvmarle commented 5 years ago

There we go again: another stack trace, this time it's got a lot of things that I've never seen before, probably from the OOM option.

Exception (29):
epc1=0x4000e1c3 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000018 depc=0x00000000
(raw stack trace skipped)
last failed alloc call: 4021AEDC(192)

Decoded:

Exception 29: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores
Decoding 113 results
0x4025143a: ieee80211_alloc_proberesp at ?? line ?
0x40251358: ieee80211_alloc_proberesp at ?? line ?
0x402557d1: cnx_update_bss_more at ?? line ?
0x402514fb: ieee80211_send_proberesp at ?? line ?
0x4021cd07: umm_calloc at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1704
0x40277010: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x4021af48: calloc_loc at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/heap.cpp line 134
0x401031b6: wDev_ProcessFiq at ?? line ?
0x4024e0cc: hostap_input at ?? line ?
0x4024df9f: hostap_input at ?? line ?
0x40253fa7: sta_input at ?? line ?
0x40254012: sta_input at ?? line ?
0x4025dd6b: pp_attach at ?? line ?
0x4026d9e5: get_sar_dout at ?? line ?
0x4026e688: tx_pwctrl_cal at ?? line ?
0x40255d81: cnx_node_search at ?? line ?
0x4024d7db: hostap_input at ?? line ?
0x4026ea38: tx_pwctrl_background at ?? line ?
0x4025d32a: pp_tx_idle_timeout at ?? line ?
0x4025cc03: ppPeocessRxPktHdr at ?? line ?
0x40219cef: loop_task(ETSEventTag*) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 133
0x40105448: call_user_start_local at ?? line ?
0x4010544e: call_user_start_local at ?? line ?
0x4010000d: call_user_start at ?? line ?
0x40101618: cont_ret at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/cont.S line 142
0x401015c5: cont_continue at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/cont.S line 51
0x40279930: chip_v6_unset_chanfreq at ?? line ?
0x40239c58: sha2big_update at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2big.c line 165
:  (inlined by) br_sha384_update at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2big.c line 207
0x4023a4c3: sha2small_out at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/sha2small.c line 249
0x40279674: chip_v6_unset_chanfreq at ?? line ?
0x40246c51: br_multihash_update at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/hash/multihash.c line 141
0x4010048f: void sws_isr0>() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.cpp line 38
0x4010048f: void sws_isr0>() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.cpp line 38
0x40101161: interrupt_handler at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring_digital.cpp line 169
0x40101150: interrupt_handler at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring_digital.cpp line 165
0x40105c21: ets_timer_disarm at ?? line ?
0x40101090: interrupt_handler at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring_digital.cpp line 133
0x40101090: interrupt_handler at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring_digital.cpp line 133
0x40105315: lmacTxFrame at ?? line ?
0x40104149: lmacIsIdle at ?? line ?
0x40104149: lmacIsIdle at ?? line ?
0x4010528a: lmacTxFrame at ?? line ?
0x40101f46: pp_post at ?? line ?
0x4010533f: lmacRxDone at ?? line ?
0x40101f46: pp_post at ?? line ?
0x4010533f: lmacRxDone at ?? line ?
0x40101f46: pp_post at ?? line ?
0x40102c5d: trc_NeedRTS at ?? line ?
0x40101f46: pp_post at ?? line ?
0x40102e32: trc_NeedRTS at ?? line ?
0x40101f46: pp_post at ?? line ?
0x4010533f: lmacRxDone at ?? line ?
0x40102c5d: trc_NeedRTS at ?? line ?
0x40102e32: trc_NeedRTS at ?? line ?
0x40103272: wDev_ProcessFiq at ?? line ?
0x4010300c: wDev_ProcessFiq at ?? line ?
0x40222b83: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 447
0x40222b83: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 447
0x40233132: tcp_output at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_out.c line 1319
0x4021ca90: _umm_free at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1304
0x4021ceb8: free at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/umm_malloc/umm_malloc.cpp line 1764
0x40236f14: mem_free at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/mem.c line 237
0x40219d34: esp_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 91
0x40219e16: yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 100
0x40219e59: optimistic_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 115
0x402063af: WiFiClient::available() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClient.cpp line 263
0x40222be2: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 510
0x4023c300: br_ssl_hs_client_run at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/ssl/ssl_hs_client.c line 958
0x4023c2a8: pgm_read_word_inlined at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/pgmspace.h line 67
:  (inlined by) br_ssl_hs_client_init_main at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/ssl/ssl_hs_client.c line 904
0x4023bdb6: br_ssl_engine_hs_reset at /home/earle/Arduino/hardware/esp8266com/esp8266/tools/sdk/ssl/bearssl/src/ssl/ssl_engine.c line 1305
0x40222e28: BearSSL::WiFiClientSecure::_wait_for_handshake() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 547
0x40223014: BearSSL::WiFiClientSecure::_connectSSL(char const*) at /home/wouter/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/xtensa-lx106-elf/include/c++/4.8.2/bits/shared_ptr.h line 291
:  (inlined by) BearSSL::WiFiClientSecure::_connectSSL(char const*) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 1009
0x40219d34: esp_yield at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 91
0x4021a987: delay at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_wiring.cpp line 54
0x40206df9: WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/include/ClientContext.h line 136
:  (inlined by) WiFiClient::connect(IPAddress, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClient.cpp line 170
0x40223131: BearSSL::WiFiClientSecure::connect(char const*, unsigned short) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 231
0x40225508: BearSSL::PrivateKey::getEC() const at ?? line ?
0x40225508: BearSSL::PrivateKey::getEC() const at ?? line ?
0x40216bf4: HTTPClient::connect() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 1165
0x4021c396: uart_write at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/uart.cpp line 498
0x402178c0: HTTPClient::sendRequest(char const*, unsigned char*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 655
0x40217e48: HardwareSerial::write(unsigned char const*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158
0x402742d2: sleep_reset_analog_rtcreg_8266 at ?? line ?
0x40218155: Print::write(char const*) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.h line 60
0x40217e33: HardwareSerial::write(unsigned char) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 154
0x40217a5a: HTTPClient::GET() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp line 575
0x40211958: HydroMonitorLogging::sendPostData(char*) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 734
0x40225748: BearSSL::PrivateKey::getEC() const at ?? line ?
0x4022c798: _vsprintf_r at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdio/vsprintf.c line 65
0x40217e48: HardwareSerial::write(unsigned char const*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158
0x4022000a: spiffs_object_modify at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/spiffs/spiffs_nucleus.cpp line 1583
0x40211e09: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 342
0x4021d7a1: spiffs_hydro_read at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/spiffs/spiffs_hydrogen.cpp line 400
:  (inlined by) SPIFFS_read at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/spiffs/spiffs_hydrogen.cpp line 429
0x40211d72: HydroMonitorLogging::transmitMessages() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 331
0x402254a0: BearSSL::PrivateKey::getEC() const at ?? line ?
0x40217e48: HardwareSerial::write(unsigned char const*, unsigned int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/HardwareSerial.h line 158
0x402181e0: Print::println() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Print.cpp line 178
0x4021224d: HydroMonitorLogging::logData() at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorLogging.cpp line 250
0x40217b28: EspClass::getCpuFreqMHz() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/Esp.cpp line 264
0x40208be6: SoftwareSerial::available() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SoftwareSerial/src/SoftwareSerial.cpp line 220
0x40210770: HydroMonitorIsolatedSensorBoard::readSensor(bool) at /home/wouter/Arduino/libraries/HydroMonitor/src/HydroMonitorIsolatedSensorBoard.cpp line 33
0x40207a93: TwoWire::requestFrom(int, int) at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/Wire/Wire.cpp line 134
0x40204309: loop at /home/wouter/Arduino/Williams_fridge/Fridge_control/loop.ino line 36
0x40219de4: loop_wrapper() at /home/wouter/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/cores/esp8266/core_esp8266_main.cpp line 125
wvmarle commented 5 years ago

I see references to SoftwareSerial in that stack trace: that's indeed yet another process that is running on the same chip. Every 3 seconds a sensor sends a message with sensor readings of about 14-18 characters at 9600 bps to a SoftwareSerial instance. Rx only; the Tx is not used.

This is something that has been working worse and worse while doing more with the logging and other things. I have more and more Serial.print() statements in the code. I often get illegal characters in the transmission, and have already written my code so that this is detected and ignored. Some transmissions fail, but enough that are received successfully to not cause issues.

wvmarle commented 5 years ago

This is the function where the crash happens (I added a comment at the line that's pointed at in the stack trace). The char array postData contains a complete URL: https://host/path?key=value&...

uint16_t HydroMonitorLogging::sendPostData(char* postData) {

//  std::unique_ptr<BearSSL::WiFiClientSecure>client(new BearSSL::WiFiClientSecure);
//  client->setInsecure();                                    // Do not check for https fingerprints (insecure: allows MiM attacks).

  WiFiClientSecure client;
  client.setInsecure();                                     // Do not check for https fingerprints (insecure: allows MiM attacks).
  HTTPClient https;

  // Open a connection to the host.
  uint16_t responseCode;
  uint32_t startTransmission = millis();
  Serial.print(F("Starting transmission of "));
  Serial.print(strlen(postData));
  Serial.print(F(" bytes: "));
  Serial.println(postData);
  if (https.begin(client, postData)) {                      // HTTPS connection.
    Serial.println(F("Connected."));
    responseCode = https.GET();                             // This is the point the crash data points at.
    Serial.println(F("Got the GET request result."));
    if (responseCode > 0) {                                 // httpCode will be negative on error
      if (responseCode == HTTP_CODE_OK || responseCode == HTTP_CODE_MOVED_PERMANENTLY) { // File found at server
        String payload = https.getString();
      }
    } 
  }
  https.end();
  client.stop();
  Serial.print(F("Transmission complete. Response code: "));
  Serial.print(responseCode);
  Serial.print(F(" Time taken: "));
  Serial.print(millis() - startTransmission);
  Serial.println(F(" ms."));
  return responseCode;    
}  
earlephilhower commented 5 years ago

Wow, lots of updates since I glanced at it yesterday.

"Abort called" is the critical bit here, I think. std::shared_ptr, when it can't allocate, will throw/abort. Hence the OOM. You need ~17KB free contiguous heap to make a SSL connection, and if there are no other BearSSL objects present you also need a 5.5KB contiguous chunk for the stack.

WiFiClientSecure is also very large itself, and putting it on the stack as shown here may also end up blowing past the end of stack and corrupting heap if your stack is within a KB or so of the end.

The "last failed alloc" is also a dead giveaway for memory alloc errors. It being set means your app ran out of heap. Sometimes you can recover (if you code defensively), but most times you can't.

See the below example to see how shared_ptr fails...

#include <memory>

void setup() {
  Serial.begin(115200);
  Serial.printf("\n\nTrying to std_shared_ptr...\n");
  auto test_abort = std::shared_ptr<unsigned char>(new unsigned char[60000], std::default_delete<unsigned char[]>());
}

void loop() { }

Trying to std_shared_ptr...

Abort called

>>>stack>>>

ctx: cont
sp: 3ffffdd0 end: 3fffffc0 offset: 01b0
3fffff80:  0001c200 0000001c 3ffee244 4020ab90  
3fffff90:  3fffdad0 00000000 3ffee244 402010c5  
3fffffa0:  feefeffe 00000000 3ffee26c 402018a0  
3fffffb0:  feefeffe feefeffe 3ffe84f4 40100459  
<<<stack<<<

last failed alloc call: 4020ABBE(60000)
wvmarle commented 5 years ago

Right... That seems to have been the problem indeed. I knew already that ssl takes a lot of memory, so I've been doing my best to keep the memory use low (upon compiling almost 48 kB free - when running the free heap is given at some 32 kB). I totally didn't see that coming: still not enough space for that 17 kB.

I tried to create the WiFiClientSecure and HTTPClient globally (at the top of my sketch), then pass as reference to the library object that needs them. That reduced the free heap significantly, but far from the expected 22 kB the two would need between them. And I still got the same crashes, so that didn't work.

In the end I've basically thrown in the towel. I've allowed my server to accept http connections on that specific URL, switched to WiFiClient, declare both the WiFiClient and HTTPClient locally again in the library, and so far so good: haven't been able to trigger the above crashes in the way I did before. Apparently running both a server (w/o encryption) and ssl client at the same time is simply too much.

Not the solution I hoped for but at least it works and that's the most important now. Thanks for the help, I'm closing this issue. Any tips of running the ssl client after all are welcome. I know it's not a support forum but my posts about the same on stackexchange and the esp8266 community forum unfortunately haven't gotten any replies yet...

Ismail955 commented 5 years ago

Arduino: 1.8.9 (Windows 10), Papan:"WeMos D1 R1, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

Opsi bangun berubah, membangun kembali semuanya In file included from C:\Users\I S M A I L\OneDrive\Dokumen\Arduino\libraries\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:29:0,

             from C:\Users\I S M A I L\OneDrive\Dokumen\Arduino\libraries\ESP8266WiFi\src/WiFiClientSecure.h:41,

             from C:\Users\I S M A I L\OneDrive\Dokumen\Arduino\libraries\ESP8266WiFi\src/WiFiServerSecure.h:20,

             from C:\Users\I S M A I L\OneDrive\Dokumen\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:41,

             from C:\Users\ISMAIL~1\AppData\Local\Temp\arduino_modified_sketch_360260\FlashLED.ino:8:

C:\Users\I S M A I L\OneDrive\Dokumen\Arduino\libraries\ESP8266WiFi\src/BearSSLHelpers.h:148:34: error: 'virtual const unsigned char* BearSSL::HashSHA256::oid()' marked override, but does not override

 virtual const unsigned char *oid() override;

                              ^

C:\Users\ISMAIL~1\AppData\Local\Temp\arduino_modified_sketch_360260\FlashLED.ino: In function 'void loop()':

C:\Users\ISMAIL~1\AppData\Local\Temp\arduino_modified_sketch_360260\FlashLED.ino:102:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

if (millis() > Bot_lasttime + Bot_mtbs) {

                             ^

exit status 1 Error compiling for board WeMos D1 R1.

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.