MrBuddyCasino / ESP32_Alexa

An Alexa Smart Speaker project for the ESP32.
Mozilla Public License 2.0
264 stars 72 forks source link

Random resets panic crash #13

Open mano1979 opened 6 years ago

mano1979 commented 6 years ago

about every 10 to 15 minutes the code crashes and the esp32 is rebooted. Te histerical laugh almost giving me a heartattack. Crash report is below:

Guru Meditation Error: Core  1 panic'ed (LoadStoreError)
. Exception was unhandled.
Register dump:
PC      : 0x401b4443  PS      : 0x00060c30  A0      : 0x80128af9  A1      : 0x3ffcff70  
A2      : 0x40000000  A3      : 0x3ffd0170  A4      : 0x000000a2  A5      : 0x3aa50aa2  
A6      : 0x0a050a02  A7      : 0x32210210  A8      : 0x56fbc95f  A9      : 0x0000001f  
A10     : 0x6aa56f12  A11     : 0xf0f0f0f0  A12     : 0xf3ed8a9d  A13     : 0x0a050f02  
A14     : 0x030d0a0d  A15     : 0x060b090f  SAR     : 0x00000010  EXCCAUSE: 0x00000003  
EXCVADDR: 0x40000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff  

Backtrace: 0x401b4443:0x3ffcff70 0x40128af6:0x3ffcff90 0x401280e9:0x3ffd01e0 0x40128336:0x3ffd0210 0x401b42d1:0x3ffd0250 0x40125f83:0x3ffd0280 0x401263b9:0x3ffd02a0 0x40123e25:0x3ffd02c0 0x40123e55:0x3ffd0310 0x40122733:0x3ffd0330 0x401227a1:0x3ffd0350 0x40121892:0x3ffd0370 0x4010ca13:0x3ffd03a0

Rebooting...
ets Jun  8 2016 00:22:57
MrBuddyCasino commented 6 years ago

I understand, thx.

chegewara commented 6 years ago

I dont want to open new issue just to show how it works (video on YT) and it is related to this issue(crash). Over 8 hours and still working:

E (29403294) alexa: PING
:status: 204
access-control-allow-origin: *
x-amzn-requestid: 021038fffed1de70-00002533-0008e088-71657edca9c72c00-f934d19a-23

E (29700295) alexa: PING
:status: 204
access-control-allow-origin: *
x-amzn-requestid: 021038fffed1de70-00002533-0008e088-71657edca9c72c00-f934d19a-25

The issue is memory leaking on access token refresh:

W (3037612) asio: 96: - RAM left 28808
........
W (23687034) asio: 96: - RAM left 17544
W (26752667) asio: 96: - RAM left 13992
chegewara commented 6 years ago

New ping version looks and works way better than last one and which is most important does not cause memory leak. I will try to find time and prepare clean PR with it. Here is how it looks like:

nghttp2_session *session = alexa_session->stream_events->http2_session->h2_session;
nghttp2_submit_ping(session, NGHTTP2_FLAG_NONE, NULL);
chegewara commented 6 years ago

Like i promissed there is refactored ping event. PR is ready to merge.