mcspr on pr8140-redo
HTTPUpdateServer Allow external… Merge branch 'master' into pr81… (compare)
mcspr on pr8140-redo
fix 8139 netbios in AP mode Merge branch 'master' into mast… Merge branch 'master' into mast… and 2 more (compare)
d-a-v on master
HTTPUpdateServer Allow external… (compare)
mcspr on master
Update documentation (#8619) (compare)
Hi, could someone help me understand this crash please?
Exception (29):
epc1=0x402117af epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000010 depc=0x00000000
StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores
epc1=0x402117af in Stream::sendGeneric(Print*, int, int, unsigned int) at ??:?
We log memory usage immediately before:[TRACE] TRACER: Free Stack 2372, Free DRAM 31368, Biggest DRAM Block 27632, Free IRAM 20328, Connection 1
It happens when I call HttpClient::getString()
[HTTP-Client][begin] host: iop-monitor-server.tk port: 4001 url: /v1/user/login
[HTTP-Client][end] tcp is closed
[String] Reallocating large String(143 -> 155 bytes) 'Content-Ty ... K: '
[String] Reallocating large String(155 -> 175 bytes) 'Content-Ty ... C: '
[String] Reallocating large String(175 -> 219 bytes) 'Content-Ty ... NG: '
[String] Reallocating large String(219 -> 236 bytes) 'Content-Ty ... .tk:4001'
[HTTP-Client][sendRequest] type: 'POST' redirCount: 0
[HTTP-Client] connect: HTTPClient::begin was not called or returned error
[HTTP-Client][returnError] error(-1): connection failed
[DEBUG] _client.get() is nullptr
Fatal exception 29(StoreProhibitedCause):
epc1=0x4021bcb2, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000010, depc=0x00000000
ESP8266WiFiGenericClass::hostByName
from WiFiClientSecureCtx::connect("iop-monitor-server.tk", 4001)
[INFO] NETWORK: Free Stack 724, Free DRAM 36672, Biggest DRAM Block 35784, Free IRAM 36672, Connection 1
[hostByName] request IP for: iop-monitor-server.tk
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Soft WDT reset
>>>stack>>>
ctx: sys
sp: 3ffff0d0 end: 3fffffb0 offset: 01a0
...
0x4022126c in __esp_delay at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/cores/esp8266/core_esp8266_main.cpp:152
0x402212c5 in esp_try_delay(unsigned int, unsigned int, unsigned int) at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/cores/esp8266/core_esp8266_main.cpp:171
0x40214288 in esp_delay<ESP8266WiFiGenericClass::hostByName(char const*, IPAddress&, uint32_t)::<lambda()> > at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/cores/esp8266/coredecls.h:66
(inlined by) ESP8266WiFiGenericClass::hostByName(char const*, IPAddress&, unsigned int) at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp:626
0x40204f76 in iop::logMemory(iop::Log const&) at src/core/log.cpp:253
0x40101354 in check_poison_block at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/cores/esp8266/umm_malloc/umm_poison.c:96
0x40214308 in ESP8266WiFiGenericClass::hostByName(char const*, IPAddress&) at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp:598
0x40217df0 in BearSSL::WiFiClientSecureCtx::connect(char const*, unsigned short) at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp:222
0x401010d0 in put_poison at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/cores/esp8266/umm_malloc/umm_poison.c:37
0x40224ff8 in std::_Function_base::~_Function_base() at ??:?
0x4029a130 in system_get_sdk_version at ??:?
0x402095ed in driver::HTTPClient::begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) at src/driver/client.cpp:161
0x40100b30 in heap_pvPortMalloc at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/cores/esp8266/heap.cpp:278
0x40220034 in String::init() at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/cores/esp8266/WString.h:283
(inlined by) String::String() at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/cores/esp8266/WString.h:55
(inlined by) operator+(String&&, String&&) at /home/no/.platformio/packages/framework-arduinoespressif8266@src-9e6d7244c46d325024685829a1341b58/cores/esp8266/WString.cpp:453
0x4022dfbf in std::__cxx11::basic_string<char, std::char_traits<char>
Hi Max Prokhorov, you mean something like this?
template <typename T>
inline void esp_delay(const uint32_t timeout_ms, T&& blocked, const uint32_t intvl_ms) {
const auto start_ms = millis();
while (!esp_try_delay(start_ms, timeout_ms, intvl_ms) && blocked()) {
std::cout << timeout_ms << " " << start_ms << " " << intvl_ms << " " << blocked() << "\n";
}
}
bool esp_try_delay(const uint32_t start_ms, const uint32_t timeout_ms, const uint32_t intvl_ms) {
uint32_t expired = millis() - start_ms;
std::cout << expired << std::endl;
if (expired >= timeout_ms) {
return true;
}
esp_delay(std::min((timeout_ms - expired), intvl_ms));
return false;
}
Logs:
10000 5330 1 1
2729
... // Dozens more that are very similar
10000 5330 1 1
2731
10000 5330 1 1
2733
10000 5330 1 1
2735
10000 5330 1 1
2736
10000 5330 1 1
2738
10000 5330 1 1
27
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Soft WDT reset
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v000dd7e0
~ld
why is .c set to have -fno-inline-functions?
I think it is historical and probably meant to save space back then.
.c
files were converted to .cpp
files quite a time ago.
volatile int32_t lastmu = 0; // read only outside
void IRAM_ATTR isr(void) {
static int32_t currentmu = 0;
// do something with currentmu... not shown
if (somecondition) {
lastmu = currentmu;
currentmu = 0;
}
}
void init() {
attachInterrupt(digitalPinToInterrupt(somepin), isr, RISING);
}
void fetch() {
int32_t data = lastmu;
}
not shown
code
int32_t aaa = somevar;
might not be, depending on where somevar is stored
aaa
will be changed in a single cycle
somevar
[hostByName] request IP for: iop-monitor-server.tk
[hostByName] Host: iop-monitor-server.tk IP: 104.236.4.125
:ref 1
BSSL:_connectSSL: start connection
_iobuf_in: 0x3fff441c
_iobuf_out: 0x3fff8574
_iobuf_in_size: 16709
_iobuf_out_size: 597
[TRACE] TRACER: Entering new scope, at line 59, in function virtual void iop::CertStore::installCertStore(br_x509_minimal_context*), at file cert_store.cpp
[TRACE] TRACER: Free Stack 1988, Free DRAM 11552, Biggest DRAM Block 11280, Connection 1
[TRACE] TRACER: Leaving scope, at line 59, in function virtual void iop::CertStore::installCertStore(br_x509_minimal_context*), at file cert_store.cpp
BSSL:Installed certstore
:wr 226 0
:wrc 226 226 0
:ack 226
:rn 536
:rd 5, 536, 0
:rdi 536, 5
:rch 536, 536
:rd 85, 1072, 5
:rdi 531, 85
:rch 1072, 536
:rch 1608, 536
:rd 5, 2144, 90
:rdi 446, 5
:rd 2049, 2144, 95
:rdi 441, 441
:c 441, 536, 2144
:rdi 536, 536
:c 536, 536, 1608
:rdi 536, 536
:c 536, 536, 1072
:rdi 536, 536
:c0 536, 536
:rn 536
:rd 536, 536, 0
:rdi 536, 536
:c0 536, 536
:rn 536
:rd 536, 536, 0
:rdi 536, 536
:c0 536, 536
:rn 536
:rch 536, 536
:rd 914, 1072, 0
:rdi 536, 536
:c 536, 536, 1072
:rdi 536, 378
BSSL:_run_until: closed
BSSL:_wait_for_handshake: failed
BSSL:Couldn't connect. Error = 'Certificate is expired or not yet valid.'