esp-idf: [CRASH][v4.4.3][ESP32-S3] "Timed out waiting for completion of AES Interrupt" (IDFGH-9264)
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.
v4.4.
Operating System used.
macOS
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3 Dev Kit C
Power Supply used.
USB
What is the expected behavior?
AES CBC should complete.
What is the actual behavior?
Hits AES timeout.
/* Wait for AES hardware block operation to complete */
static void esp_aes_dma_wait_complete(bool use_intr, lldesc_t *output_desc)
{
#if defined (CONFIG_MBEDTLS_AES_USE_INTERRUPT)
if (use_intr) {
if (!xSemaphoreTake(op_complete_sem, 2000 / portTICK_PERIOD_MS)) {
/* indicates a fundamental problem with driver */
ESP_LOGE("AES", "Timed out waiting for completion of AES Interrupt");
abort();
}
#ifdef CONFIG_PM_ENABLE
esp_pm_lock_release(s_pm_cpu_lock);
esp_pm_lock_release(s_pm_sleep_lock);
#endif // CONFIG_PM_ENABLE
}
#endif
Steps to reproduce.
I’ve never hit this before. Might be tempermental.
Debug Logs.
0x40376487: panic_abort at /esp-idf/components/esp_system/panic.c:429
0x40383581: esp_system_abort at /esp-idf/components/esp_system/esp_system.c:128
0x4038daab: abort at /esp-idf/components/newlib/abort.c:46
0x4211057e: esp_aes_dma_wait_complete at /esp-idf/components/mbedtls/port/aes/dma/esp_aes.c:215
(inlined by) esp_aes_process_dma at /esp-idf/components/mbedtls/port/aes/dma/esp_aes.c:435
0x421109a3: esp_aes_crypt_cbc at /esp-idf/components/mbedtls/port/aes/dma/esp_aes.c:729
0x4207f297: pd_ota_session_write(unsigned long long, pd_buf_t, pd_error_t*) at /jamcorder-firmware/jamcorder_common/jcommon/ota/pd_ota_session.cpp:467
(inlined by) pd_ota_session_write(unsigned long long, pd_buf_t, pd_error_t*) at /jamcorder-firmware/jamcorder_common/jcommon/ota/pd_ota_session.cpp:672
More Information.
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (10 by maintainers)
Commits related to this issue
- fix(aes): correct the linking of the DMA descriptors For certain data lengths, the last input descriptor was not getting appended correctly and hence the EOF flag in the DMA descriptor link list was ... — committed to espressif/esp-idf by mahavirj 10 months ago
- fix(aes): correct the linking of the DMA descriptors For certain data lengths, the last input descriptor was not getting appended correctly and hence the EOF flag in the DMA descriptor link list was ... — committed to espressif/esp-idf by mahavirj 10 months ago
- fix(aes): correct the linking of the DMA descriptors For certain data lengths, the last input descriptor was not getting appended correctly and hence the EOF flag in the DMA descriptor link list was ... — committed to espressif/esp-idf by mahavirj 10 months ago
- fix(aes): correct the linking of the DMA descriptors For certain data lengths, the last input descriptor was not getting appended correctly and hence the EOF flag in the DMA descriptor link list was ... — committed to CommanderRedYT/esp-idf by mahavirj 10 months ago
- fix(aes): correct the linking of the DMA descriptors For certain data lengths, the last input descriptor was not getting appended correctly and hence the EOF flag in the DMA descriptor link list was ... — committed to espressif/esp-idf by mahavirj 10 months ago
- sphinx-key: disable hardware aes acceleration we otherwise hit the error below, when parsing mainnet block 812548: Timed out waiting for completion of AES Interrupt https://github.com/espressif/esp-... — committed to stakwork/sphinx-key by irriden 7 months ago
Update:
We have added few fixes in the AES DMA port layer recently, following are pointers for v4.4 branch
First one is the fix for heap corruption issue that may occur with specific AES dma lengths and second is specific to incorrect DMA descriptor setup. Please have a look at them, they are relevant to this issue. If you could not recreate “AES timeout” issue on latest
release/v4.4branch then we can close this tracker.Thanks.