Page 1 of 1

A stack overflow in task msg_send has been detected.

Posted: Sun Sep 26, 2021 1:36 pm
by zsd0101
I`m using esp-idf-v4.2.1.
I got this message when calling esp_wifi_start():
[Codebox]***ERROR*** A stack overflow in task msg_send has been detected.

Backtrace:0x40087127:0x3ffd2370 0x400877d1:0x3ffd2390 0x400897ed:0x3ffd23b0 0x4008807e:0x3ffd2430 0x40089a4c:0x3ffd2450 0x40089a02:0x00000000 |<-CORRUPTED[/Codebox]

I parsed the backtrace infomation, as below:
[Codebox]panic_abort at esp-idf-v4.2.1/components/esp_system/panic.c:330
esp_system_abort at esp-idf-v4.2.1/components/esp_system/system_api.c:106
vApplicationStackOverflowHook at esp-idf-v4.2.1/components/freertos/xtensa/port.c:436
vTaskSwitchContext at esp-idf-v4.2.1/components/freertos/tasks.c:2770
_frxt_dispatch at esp-idf-v4.2.1/components/freertos/xtensa/portasm.S:431[/Codebox]

Form all the information above, I can't locate the problem. I guess "msg_send" is a task name or somthing, but when searching the keywords I can`t find any result matching in the esp-idf source code.
Also I tried to increase some values in menuconfig, but still didn`t work(ie CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM, CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM, CONFIG_LWIP_TCP_SND_BUF_DEFAULT, CONFIG_LWIP_TCPIP_TASK_STACK_SIZE).

Could anyone give me some help? Thanks a lot!

Re: A stack overflow in task msg_send has been detected.

Posted: Mon Sep 27, 2021 12:50 pm
by doglike
What's the stack size of the task, that is calling esp_wifi_start() ?

Re: A stack overflow in task msg_send has been detected.

Posted: Mon Sep 27, 2021 2:33 pm
by chegewara
zsd0101 wrote:
Sun Sep 26, 2021 1:36 pm
I guess "msg_send" is a task name or somthing, but when searching the keywords I can`t find any result matching in the esp-idf source code.
Thats correct, it is task name. Are you sure it is not part of your code?