OTA firmware update not resetting keepalive timer when run on ESP32 Core 1

I have a situation where if I run the Wifi off Core1 of an ESP32S3, and try to do a firmware update, it runs into a condition where the keepalive timer is not being reset.

Setup: ESP32S3, ESP-IDF v5.2.1, Golioth SDK v0.12.2

I’m running the Wifi on Core 1 because other processes have used up the available interrupts on Core 0, and enabling the Wifi would trigger an error.

I am running the Wifi on Core 1 using the Kconfig option of CONFIG_ESP_WIFI_TASK_PINNED_TO_CORE_1

Is there something I need to do to get the OTA working when using Wifi on Core 1?

W (294356) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (294556) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (294766) golioth_coap_client_libcoap: Failed to reset keepalive timer
E (294966) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (294966) task_wdt:  - IDLE0 (CPU 0)
E (294966) task_wdt: Tasks currently running:
E (294966) task_wdt: CPU 0: user_input_task
E (294966) task_wdt: CPU 1: IDLE1
E (294966) task_wdt: Print CPU 0 (current core) backtrace


Backtrace: 0x4202774F:0x3FC9CCA0 0x40377425:0x3FC9CCD0 0x400559DD:0x3FCB5290 0x4037E9FA:0x3FCB52A0 0x4037D420:0x3FCB52C0 0x4037D8AE:0x3FCB5300 0x420419C6:0x3FCB5340 0x42009853:0x3FCB5380
0x4202774f: task_wdt_timeout_handling at /home/seth/esp/v5.2/esp-idf/components/esp_system/task_wdt/task_wdt.c:441
 (inlined by) task_wdt_isr at /home/seth/esp/v5.2/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
0x40377425: _xt_lowint1 at /home/seth/esp/v5.2/esp-idf/components/xtensa/xtensa_vectors.S:1240
0x400559dd: _xtos_set_intlevel in ROM
0x4037e9fa: vPortClearInterruptMaskFromISR at /home/seth/esp/v5.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:564
 (inlined by) vPortExitCritical at /home/seth/esp/v5.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:504
0x4037d420: prvReceiveGeneric at /home/seth/esp/v5.2/esp-idf/components/esp_ringbuf/ringbuf.c:876
0x4037d8ae: xRingbufferReceiveUpTo at /home/seth/esp/v5.2/esp-idf/components/esp_ringbuf/ringbuf.c:1178
0x420419c6: adc_continuous_read at /home/seth/esp/v5.2/esp-idf/components/esp_adc/adc_continuous.c:449
0x42009853: user_input_task at /home/seth/dev/charlie-io/main/charlie_io_input/charlie_io_input.c:160


W (294966) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (295076) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (295176) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (295276) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (295486) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (297716) golioth_coap_client_libcoap: CoAP message retransmitted
W (298556) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (298756) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (299166) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (299476) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (299686) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (299786) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (299886) golioth_coap_client_libcoap: Failed to reset keepalive timer
E (299966) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (299966) task_wdt:  - IDLE0 (CPU 0)
E (299966) task_wdt: Tasks currently running:
E (299966) task_wdt: CPU 0: user_input_task
E (299966) task_wdt: CPU 1: IDLE1
E (299966) task_wdt: Print CPU 0 (current core) backtrace


Backtrace: 0x4202774F:0x3FC9CCA0 0x40377425:0x3FC9CCD0 0x400559DD:0x3FCB5290 0x4037E9FA:0x3FCB52A0 0x4037D420:0x3FCB52C0 0x4037D8AE:0x3FCB5300 0x420419C6:0x3FCB5340 0x42009853:0x3FCB5380
0x4202774f: task_wdt_timeout_handling at /home/seth/esp/v5.2/esp-idf/components/esp_system/task_wdt/task_wdt.c:441
 (inlined by) task_wdt_isr at /home/seth/esp/v5.2/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
0x40377425: _xt_lowint1 at /home/seth/esp/v5.2/esp-idf/components/xtensa/xtensa_vectors.S:1240
0x400559dd: _xtos_set_intlevel in ROM
0x4037e9fa: vPortClearInterruptMaskFromISR at /home/seth/esp/v5.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:564
 (inlined by) vPortExitCritical at /home/seth/esp/v5.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:504
0x4037d420: prvReceiveGeneric at /home/seth/esp/v5.2/esp-idf/components/esp_ringbuf/ringbuf.c:876
0x4037d8ae: xRingbufferReceiveUpTo at /home/seth/esp/v5.2/esp-idf/components/esp_ringbuf/ringbuf.c:1178
0x420419c6: adc_continuous_read at /home/seth/esp/v5.2/esp-idf/components/esp_adc/adc_continuous.c:449
0x42009853: user_input_task at /home/seth/dev/charlie-io/main/charlie_io_input/charlie_io_input.c:160


W (299986) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (300086) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (302956) golioth_coap_client_libcoap: CoAP message retransmitted
W (303876) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (303986) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (304186) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (304286) golioth_coap_client_libcoap: Failed to reset keepalive timer
W (304596) golioth_coap_client_libcoap: Failed to reset keepalive timer

type or paste code here

Hey Seth, thanks for reporting, we’ll look into this.