espressif / ESP8266_RTOS_SDK

Latest ESP8266 SDK based on FreeRTOS, esp-idf style.
http://bbs.espressif.com
Apache License 2.0
3.34k stars 1.57k forks source link

Unexpected Crash (GIT8266O-486) #913

Open sky9971 opened 4 years ago

sky9971 commented 4 years ago

Environment

Problem Description

Firmware is crashing unexpectedly after updating to the latest 3.2 RTOS SDK In the previous version it used to work well. but now it throws the wdt on mqtt task.

Make monitor Output

Stack canary watchpoint triggered (mqtt_task)

Backtrace: 0x40100373:0x3fff3970
0x40100373: _xt_user_entry1 at C:/msys32/home/PC3/esp/ESP8266_RTOS_SDK/co
mponents/freertos/port/esp8266/xtensa_vectors.S:667

Note: the crash is not consistent that is it only occurs 1 out of 4 times.

nsfilho commented 4 years ago

An important tip is to provide some logs as in your make monitor. Without that, no one can found where is the bug.....

Best regards, NS.

sky9971 commented 4 years ago

@nsfilho Thanks for your suggestion. I have updated the following information, please check.

nsfilho commented 4 years ago

Please, let me suggest you something: mqtt protocol use a async function to control the messages id. Sometimes our application send or receive a lot of messages simultaneous and could be faster than this async function happens.

What I do in my case, if I need send more than 1 message, I use a delay between then, approximately 100ms between each of them.

You can see a sample in my code mqtt.c in firmware https://github.com/nsfilho/E12AIO3

Please let me know after you use some delays what happens. Because this async loop timer you can't control. All you can do is control how rush you send or receive :)

Best regards, NS.