-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Answers checklist.
- I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
- I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
- I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
v5.5.1
Espressif SoC revision.
ESP32-S3
Operating System used.
macOS
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32S3WRM1UN8R2 on a custom PCB
Power Supply used.
External 5V
What is the expected behavior?
If an incoming MQTT shadow message is received during a Flash Read/Write operation, the system should not crash.
What is the actual behavior?
During LittleFS or flash read/write operations (e.g. reading a file from memory from a .tar file, processing an esp_ota_write chunk, if MQTT is active and an incoming packet is received, the device crashes with Guru Meditation Error: Core / panic'ed (Cache error). Dcache sync parameter configuration error
This worked perfectly in 5.4.1 so it appears to be a new issue with 5.5.1.
Steps to reproduce.
Boot the device and allow it to connect to Wifi. Create MQTT connection using esp_mqtt_client_init and subscribe to topics esp_mqtt_client_subscribe.
Start an OTA update process, which downloads a .tar file from an AWS S3 bucket, extract the .bin file from tar and start to update the firmware using the esp_ota_begin, esp_ota_write etc.
At any point during the .tar file extraction or ota_write functions, update the AWS shadow data remotely, which immediately causes a crash.
Following exactly the same process with the same firmware other than the IDF update on a v5.4.1 device works perfectly.
Debug Logs.
2025-12-17 20:47:08 Guru Meditation Error: Core / panic'ed (Cache error).
2025-12-17 20:47:08 Dcache sync parameter configuration error
2025-12-17 20:47:08
2025-12-17 20:47:08 Core 0 register dump:
2025-12-17 20:47:08 PC : 0x4004e555 PS : 0x00060c34 A0 : 0x8004e65c A1 : 0x3fce5790
2025-12-17 20:47:08 A2 : 0x3c390000 A3 : 0x00000008 A4 : 0x00060023 A5 : 0x00000000
2025-12-17 20:47:08 A6 : 0x3fce5940 A7 : 0x3fcb7940 A8 : 0x600c4028 A9 : 0x00000008
2025-12-17 20:47:08 A10 : 0x600c4030 A11 : 0x0000002c A12 : 0x00000000 A13 : 0x3fce5940
2025-12-17 20:47:08 A14 : 0x3fce2c10 A15 : 0x3fcb7d04 SAR : 0x00000014 EXCCAUSE: 0x00000007
2025-12-17 20:47:08 EXCVADDR: 0x00000000 LBEG : 0x400570e8 LEND : 0x400570f3 LCOUNT : 0x00000000
2025-12-17 20:47:08
2025-12-17 20:47:08
2025-12-17 20:47:09 Backtrace: 0x4004e552:0x3fce5790 0x4004e659:0x3fce57b0 0x4004ea11:0x3fce57e0 0x4038a899:0x3fce5810 0x4037e2fd:0x3fce5840 0x4037e3f0:0x3fce5860 0x4206dc82:0x3fce5890 0x4206df62:0x3fce58e0 0x4206b96d:0x3fce5920 0x4206b9f0:0x3fce5940 0x42063153:0x3fce5970 0x4206361e:0x3fce59a0 0x4206409b:0x3fce59d0 0x42064f51:0x3fce5a00 0x42067d25:0x3fce5a20 0x420629e7:0x3fce5a40 0x42124ba2:0x3fce5a70 0x420fa4cb:0x3fce5a90 0x420fa00a:0x3fce5ab0 0x420f9a02:0x3fce5ad0 0x420f9a85:0x3fce5b00 0x4205c816:0x3fce5b20 0x4211292f:0x3fce5b40 0x4205ca72:0x3fce5b60 0x4201c7cc:0x3fce5c60 0x42120272:0x3fce5da0
2025-12-17 20:47:09 --- 0x4038a899: cache_ll_invalidate_addr at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/hal/esp32s3/include/hal/cache_ll.h:360
--- (inlined by) cache_hal_invalidate_addr at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/hal/cache_hal.c:249
--- 0x4037e2fd: s_do_cache_invalidate at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/esp_mm/esp_mmu_map.c:407
--- 0x4037e3f0: s_do_mapping at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/esp_mm/esp_mmu_map.c:452
--- 0x4206dc82: esp_mmu_map at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/esp_mm/esp_mmu_map.c:574
--- 0x4206df62: spi_flash_op_lock at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/spi_flash/cache_utils.c:75
--- 0x4206b96d: esp_partition_erase_range at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/esp_partition/partition_target.c:131
--- 0x4206b9f0: esp_partition_munmap at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/esp_partition/partition_target.c:181
--- 0x42063153: littlefs_esp_part_read at /Users/PaulNeedler/Documents/iParcelBox/3-FIRMWARE/iParcelBox_firmware_v3/managed_components/joltwallet__littlefs/src/littlefs_esp_part.c:43
--- 0x4206361e: lfs_bd_read at /Users/PaulNeedler/Documents/iParcelBox/3-FIRMWARE/iParcelBox_firmware_v3/managed_components/joltwallet__littlefs/src/littlefs/lfs.c:114
--- 0x4206409b: lfs_file_flushedread at /Users/PaulNeedler/Documents/iParcelBox/3-FIRMWARE/iParcelBox_firmware_v3/managed_components/joltwallet__littlefs/src/littlefs/lfs.c:3521
--- 0x42064f51: lfs_file_flush at /Users/PaulNeedler/Documents/iParcelBox/3-FIRMWARE/iParcelBox_firmware_v3/managed_components/joltwallet__littlefs/src/littlefs/lfs.c:3420
--- 0x42067d25: lfs_file_close at /Users/PaulNeedler/Documents/iParcelBox/3-FIRMWARE/iParcelBox_firmware_v3/managed_components/joltwallet__littlefs/src/littlefs/lfs.c:6191
--- 0x420629e7: vfs_littlefs_read at /Users/PaulNeedler/Documents/iParcelBox/3-FIRMWARE/iParcelBox_firmware_v3/managed_components/joltwallet__littlefs/src/esp_littlefs.c:1633
--- 0x42124ba2: esp_vfs_lseek at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/vfs/vfs.c:995
--- 0x420fa4cb: _sscanf_r at /builds/idf/crosstool-NG/.build/xtensa-esp-elf/src/newlib/newlib/libc/stdio/sscanf.c:468
--- 0x420fa00a: __srefill_r at /builds/idf/crosstool-NG/.build/xtensa-esp-elf/src/newlib/newlib/libc/stdio/refill.c:84
--- 0x420f9a02: fputs at /builds/idf/crosstool-NG/.build/xtensa-esp-elf/src/newlib/newlib/libc/stdio/fputs.c:141
--- 0x420f9a85: _fread_r at /builds/idf/crosstool-NG/.build/xtensa-esp-elf/src/newlib/newlib/libc/stdio/fread.c:239
--- 0x4205c816: file_read at /Users/PaulNeedler/Documents/iParcelBox/3-FIRMWARE/iParcelBox_firmware_v3/components/microtar/microtar.c:180
--- 0x4211292f: is_packable_type at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/protobuf-c/protobuf-c/protobuf-c/protobuf-c.c:2882
--- 0x4205ca72: mtar_read_data at /Users/PaulNeedler/Documents/iParcelBox/3-FIRMWARE/iParcelBox_firmware_v3/components/microtar/microtar.c:346
--- 0x4201c7cc: ota_process_update_worker_task at /Users/PaulNeedler/Documents/iParcelBox/3-FIRMWARE/iParcelBox_firmware_v3/components/ipb_ota/ipb_ota.c:1747
--- 0x42120272: vPortTCBPreDeleteHook at ??:?
2025-12-17 20:47:09
2025-12-17 20:47:09 Core 1 register dump:
2025-12-17 20:47:09 PC : 0x4004e5e5 PS : 0x00060834 A0 : 0x8004e65c A1 : 0x3fce1850
2025-12-17 20:47:09 A2 : 0x3c1b0e00 A3 : 0x00000008 A4 : 0x3fce6f10 A5 : 0x00000a59
2025-12-17 20:47:09 A6 : 0x00000000 A7 : 0x00000640 A8 : 0x600c4028 A9 : 0x00000008
2025-12-17 20:47:09 A10 : 0x600c4030 A11 : 0x3c1b0df5 A12 : 0x00000640 A13 : 0x00000640
2025-12-17 20:47:09 A14 : 0x00000000 A15 : 0x3c1b9d3c SAR : 0x00000020 EXCCAUSE: 0x00000007
2025-12-17 20:47:09 EXCVADDR: 0x00000000 LBEG : 0x40056f5c LEND : 0x40056f72 LCOUNT : 0xffffffff
2025-12-17 20:47:09
2025-12-17 20:47:09
2025-12-17 20:47:09 Backtrace: 0x4004e5e2:0x3fce1850 0x4004e659:0x3fce1870 0x4004eaa9:0x3fce18a0 0x403858db:0x3fce18d0 0x4038a8c1:0x3fce1900 0x40383bf5:0x3fce1930 0x40383e0f:0x3fce1950 0x420b5cb0:0x3fce1990 0x420b6041:0x3fce19f0 0x420b5d3e:0x3fce1a30 0x420b0d32:0x3fce1a90 0x420b29d2:0x3fce1ac0 0x420b2ac6:0x3fce1b30 0x420b2b31:0x3fce1b70 0x420b2b65:0x3fce1bb0 0x420a7f8d:0x3fce1c00 0x420a87c6:0x3fce1c30 0x420a03f1:0x3fce1c70 0x420a072f:0x3fce1d40 0x420a0f06:0x3fce1d60 0x420a0f84:0x3fce1da0 0x420a1096:0x3fce1dc0 0x42096f63:0x3fce1de0 0x42113e79:0x3fce1e00 0x42098f30:0x3fce1e20 0x4211404d:0x3fce1e50 0x4205e5a1:0x3fce1e70 0x4205ed47:0x3fce1eb0 0x4205f590:0x3fce1ee0 0x4212
2025-12-17 20:47:09 --- 0x403858db: Cache_WriteBack_Addr at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/esp_rom/patches/esp_rom_cache_esp32s2_esp32s3.c:150
--- 0x4038a8c1: cache_ll_writeback_addr at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/hal/esp32s3/include/hal/cache_ll.h:403
--- (inlined by) cache_hal_writeback_addr at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/hal/cache_hal.c:264
--- 0x40383bf5: s_c2m_ops at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/esp_mm/esp_cache_msync.c:56
--- 0x40383e0f: esp_cache_msync at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/esp_mm/esp_cache_msync.c:135
--- 0x420b5cb0: esp_aes_process_dma at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/port/aes/dma/esp_aes_dma_core.c:989
--- 0x420b6041: esp_aes_process_dma_ext_ram at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/port/aes/dma/esp_aes_dma_core.c:265
--- 0x420b5d3e: esp_aes_process_dma at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/port/aes/dma/esp_aes_dma_core.c:1012
--- 0x420b0d32: esp_aes_crypt_ctr at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/port/aes/dma/esp_aes.c:495
--- 0x420b29d2: esp_aes_gcm_update at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/port/aes/esp_aes_gcm.c:517
--- 0x420b2ac6: esp_aes_gcm_finish at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/port/aes/esp_aes_gcm.c:584
--- 0x420b2b31: esp_aes_gcm_crypt_and_tag_partial_hw at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/port/aes/esp_aes_gcm.c:645
--- 0x420b2b65: esp_aes_gcm_crypt_and_tag at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/port/aes/esp_aes_gcm.c:665
--- 0x420a7f8d: mbedtls_cipher_aead_encrypt at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/mbedtls/library/cipher.c:1461
--- 0x420a87c6: mbedtls_cipher_auth_encrypt_ext at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/mbedtls/library/cipher.c:1597
--- 0x420a03f1: mbedtls_ssl_decrypt_buf at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:1579
--- 0x420a072f: mbedtls_ssl_decrypt_buf at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:1517
--- 0x420a0f06: ssl_parse_record_header at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:3963
--- 0x420a0f84: ssl_get_next_record at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:5127
--- 0x420a1096: mbedtls_ssl_read at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:5959
--- 0x42096f63: esp_tls_get_and_clear_last_error at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/esp-tls/esp_tls.c:802
--- 0x42113e79: http_message_needs_eof at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/http_parser/http_parser.c:2127
--- 0x42098f30: ssl_write at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/tcp_transport/transport_ssl.c:233
--- 0x4211404d: esp_transport_get_default_parent at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/tcp_transport/transport.c:28
--- 0x4205e5a1: mqtt_message_receive at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c:1256
--- 0x4205ed47: mqtt_process_receive at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c:1360
--- 0x4205f590: esp_mqtt_task at /Users/PaulNeedler/esp/v5.5.1/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c:1723
0272:0x3fce1f20
2025-12-17 20:47:09
2025-12-17 20:47:09
2025-12-17 20:47:09
2025-12-17 20:47:09
2025-12-17 20:47:09 ELF file SHA256: 22fac5e2aa8b4192
--- Warning: Checksum mismatch between flashed and built applications. Checksum of built application is a8e24062bacd690522ca4e67313eb75f4e9ad3c630de72a498acb6235eb412a0
2025-12-17 20:47:09
2025-12-17 20:47:09 I (9142) esp_core_dump_flash: Save core dump to flash...
2025-12-17 20:47:09 I (9147) esp_core_dump_common: Backing up stack @ 0x3fce55f0 and use core dump stack @ 0x3fcafb00
2025-12-17 20:47:09 D (9156) esp_core_dump_elf: ================= Calc data size ===============
2025-12-17 20:47:09 D (9163) esp_core_dump_elf: ================ Processing task registers ================
Diagnostic report archive.
No response
More Information.
I have tried temporarily unsubscribing from a particular topic during the OTA process. Sending a shadow update then fails to be received by the device so the OTA update continues OK. Sending a shadow update to a different topic continues to cause the crash mentioned above. Although in theory I could disable MQTT during OTA updates, this appears to be a much wider issue of MQTT/TLS doing AES DMA which conflicts with flash operations. This will be a much wider issue than just OTA, as the device often does other LittleFS operations such as reading/writing to config and it's not practical to unsubscribe /resubscribe from MQTT every time we need to read/write from flash.