-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeat esp_mqtt_client_start/esp_mqtt_client_stop calls hit Load access fault panic (IDFGH-10652) #11883
Comments
Here is another panic log, this just can happen sometimes. (Sometimes it takes much longer time to reproduce).
|
@euripedesrocha |
Hi @AxelLin I'm trying to reproduce. Just to be sure, you are using the esp-mqtt version pointed by IDF, right? |
Yes, v5.2-dev-1709-g4fc2e5cb95. |
It's not clear to me about the meaning of unassignment by espressif-bot. |
@AxelLin I was able to reproduce the issue, but it's not related to the mqtt client. The issue was moved to the correct team and should have someone assigned soon. |
@euripedesrocha We have face some problens in the Mbed tls handshake in the past versions, it seens that this is realted to it or the lwip area, right? |
Hi @Dazza0 |
@filzek |
@AxelLin We've traced root cause of the issue as a race condition caused by non-thread safe task list access in In the mean time, if you want to give the fix a try, you can try applying the following patch on v5.2-dev-1709-g4fc2e5cb95: Patch
|
Answers checklist.
IDF version.
v5.2-dev-1709-g4fc2e5cb95
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32C3
Power Supply used.
USB
What is the expected behavior?
Test using mqtt/tcp example code.
Below is the modified code to reproduce this issue.
What is the actual behavior?
W (1591867) MQTT_EXAMPLE: count = 2648
I (1591867) MQTT_EXAMPLE: Other event id:7
I (1591907) MQTT_EXAMPLE: MQTT_EVENT_CONNECTED
I (1591907) MQTT_EXAMPLE: sent publish successful, msg_id=54938
I (1591917) MQTT_EXAMPLE: sent subscribe successful, msg_id=5151
I (1591917) MQTT_EXAMPLE: sent subscribe successful, msg_id=57498
I (1591927) MQTT_EXAMPLE: sent unsubscribe successful, msg_id=11696
W (1592437) MQTT_EXAMPLE: count = 2649
I (1592437) MQTT_EXAMPLE: Other event id:7
I (1592477) MQTT_EXAMPLE: MQTT_EVENT_CONNECTED
I (1592477) MQTT_EXAMPLE: sent publish successful, msg_id=23433
I (1592487) MQTT_EXAMPLE: sent subscribe successful, msg_id=9000
I (1592487) MQTT_EXAMPLE: sent subscribe successful, msg_id=29009
I (1592497) MQTT_EXAMPLE: sent unsubscribe successful, msg_id=32861
Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled.
Stack dump detected
Core 0 register dump:
MEPC : 0x403896e6 RA : 0x40388352 SP : 0x3fca9890 GP : 0x3fc91000
0x403896e6: uxListRemove at /home/axel/esp/esp-idf/components/freertos/FreeRTOS-Kernel/list.c:195
0x40388352: xTaskResumeAll at /home/axel/esp/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:2607
TP : 0x3fc846cc T0 : 0x4005890e T1 : 0x40383224 T2 : 0x00000001
0x4005890e: memset in ROM
0x40383224: mutex_unlock_wrapper at /home/axel/esp/esp-idf/components/esp_wifi/esp32c3/esp_adapter.c:197
S0/FP : 0x00000000 S1 : 0x3fc9a950 A0 : 0x00000018 A1 : 0x3fc9a950
A2 : 0x00000021 A3 : 0x3fc97000 A4 : 0x00000005 A5 : 0x3fc93210
A6 : 0x00000001 A7 : 0x00000000 S2 : 0x3fca7454 S3 : 0xffffffff
S4 : 0x00000000 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x0017baed T5 : 0x00000000 T6 : 0x00000000
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000005 MTVAL : 0x00000028
0x40380001: _vector_table at ??:?
MHARTID : 0x00000000
Backtrace:
uxListRemove (pxItemToRemove=pxItemToRemove@entry=0x18) at /home/axel/esp/esp-idf/components/freertos/FreeRTOS-Kernel/list.c:195
195 List_t * const pxList = pxItemToRemove->pxContainer;
#0 uxListRemove (pxItemToRemove=pxItemToRemove@entry=0x18) at /home/axel/esp/esp-idf/components/freertos/FreeRTOS-Kernel/list.c:195
#1 0x40388352 in xTaskResumeAll () at /home/axel/esp/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:2606
#2 0x40389a00 in xEventGroupSetBits (xEventGroup=0x3fca7448, uxBitsToSet=uxBitsToSet@entry=1) at /home/axel/esp/esp-idf/components/freertos/FreeRTOS-Kernel/event_groups.c:647
#3 0x4200ae48 in esp_mqtt_task (pv=0x3fca7224, pv@entry=) at /home/axel/esp/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c:1662
#4 0x40389140 in vPortTaskWrapper (pxCode=, pvParameters=) at /home/axel/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/port.c:213
ELF file SHA256: 3becfaa04e69dbc0
Rebooting...
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xf (SPI_FAST_FLASH_BOOT)
Saved PC:0x40380616
0x40380616: esp_restart_noos at /home/axel/esp/esp-idf/components/esp_system/port/soc/esp32c3/system_internal.c:108 (discriminator 1)
Steps to reproduce.
Just run examples/protocols/mqtt/tcp example code with above modification.
Debug Logs.
No response
More Information.
No response
The text was updated successfully, but these errors were encountered: