Watchdog triggering on esp_rmaker_param_update_and_report

chmoore889
Posts: 2
Joined: Sat Dec 26, 2020 12:50 am

Watchdog triggering on esp_rmaker_param_update_and_report

Postby chmoore889 » Sat Jul 10, 2021 6:41 pm

Following an update to ESP IDF version 4.3 from some older version (4.1 or 4.2 can't quite remember) and pulling the latest version of ESP Rainmaker, a particular call to esp_rmaker_param_update_and_report started triggering the watchdog and showing the following error, which traces back to the following code. My whole application was working in the older versions of IDF and Rainmaker that I was using. I saw nothing in the changelogs that indicated breaking changes related to this function. I've tried disabling the watchdog just to see if it was taking too long, but it just blocks forever instead of the watchdog triggering.

Is there something I missing in terms of restrictions when this function can be called? Is this a bug?
I (31349) app_driver: Here
I (31349) esp_rmaker_param: Reporting params: {"quick_run":{"prog":[600,600,600,600,600,600,600,600,600,600]}}
E (36339) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (36339) task_wdt: - IDLE (CPU 0)
E (36339) task_wdt: Tasks currently running:
E (36339) task_wdt: CPU 0: esp_timer
E (36339) task_wdt: Print CPU 0 (current core) backtrace


Backtrace:0x400C98A7:0x3FFCA200 0x4002671E:0x3FFCA220 0x40114D3C:0x3FF9F7C0 0x400E7B21:0x3FF9F7E0 0x400E7D8B:0x3FF9F800 0x400E8676:0x3FF9F880 0x400E9FEE:0x3FF9F8B0 0x400EA0BA:0x3FF9F910 0x400EA133:0x3FF9F930 0x400DD9BD:0x3FF9F9B0 0x400D5E19:0x3FF9F9F0 0x400D601D:0x3FF9FA80 0x400D668D:0x3FF9FAA0 0x400D66C1:0x3FF9FAC0 0x400D671D:0x3FF9FAE0 0x400D7ACB:0x3FF9FB00 0x400CDAF8:0x3FF9FB20 0x400CEBA8:0x3FF9FB40 0x40136DA5:0x3FF9FB70 0x400A0D66:0x3FF9FB90 0x400A298B:0x3FF9FBC0 0x400A0215:0x3FF9FC10 0x4008E009:0x3FF9FC30 0x4008B41D:0x3FF9FC50 0x4008B81C:0x3FF9FC70 0x4008B845:0x3FF9FC90 0x40089EA1:0x3FF9FCC0 0x400885B9:0x3FF9FD20 0x400885E2:0x3FF9FD50 0x40030609:0x3FF9FD70
0x400c98a7: task_wdt_isr at C:/esp/esp-idf/components/esp_common/src/task_wdt.c:189

0x4002671e: _xt_lowint1 at C:/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1105

0x40114d3c: aes_ll_get_state at C:/esp/esp-idf/components/hal/esp32s2/include/hal/aes_ll.h:140 (discriminator 1)
(inlined by) aes_hal_wait_done at C:/esp/esp-idf/components/hal/aes_hal.c:92 (discriminator 1)

0x400e7b21: esp_aes_dma_wait_complete at C:/esp/esp-idf/components/mbedtls/port/aes/dma/esp_aes.c:205

0x400e7d8b: esp_aes_process_dma at C:/esp/esp-idf/components/mbedtls/port/aes/dma/esp_aes.c:409

0x400e8676: esp_aes_crypt_ctr at C:/esp/esp-idf/components/mbedtls/port/aes/dma/esp_aes.c:1001

0x400e9fee: esp_aes_gcm_update at C:/esp/esp-idf/components/mbedtls/port/aes/esp_aes_gcm.c:454

0x400ea0ba: esp_aes_gcm_crypt_and_tag_partial_hw at C:/esp/esp-idf/components/mbedtls/port/aes/esp_aes_gcm.c:536

0x400ea133: esp_aes_gcm_crypt_and_tag at C:/esp/esp-idf/components/mbedtls/port/aes/esp_aes_gcm.c:569

0x400dd9bd: mbedtls_cipher_auth_encrypt at C:/esp/esp-idf/components/mbedtls/mbedtls/library/cipher.c:1073

0x400d5e19: ssl_encrypt_buf at C:/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_tls.c:1624

0x400d601d: mbedtls_ssl_write_record at C:/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_tls.c:3492

0x400d668d: ssl_write_real at C:/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_tls.c:8750

0x400d66c1: ssl_write_split at C:/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_tls.c:8780

0x400d671d: mbedtls_ssl_write at C:/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_tls.c:8828

0x400d7acb: __wrap_mbedtls_ssl_write at C:/esp/esp-idf/components/mbedtls/port/dynamic/esp_ssl_tls.c:75 (discriminator 62)

0x400cdaf8: esp_mbedtls_write at C:/esp/esp-idf/components/esp-tls/esp_tls_mbedtls.c:185 (discriminator 15)

0x400ceba8: esp_tls_conn_write at C:/esp/esp-idf/components/esp-tls/esp_tls.h:476
(inlined by) ssl_write at C:/esp/esp-idf/components/tcp_transport/transport_ssl.c:147

0x40136da5: esp_transport_write at C:/esp/esp-idf/components/tcp_transport/transport.c:178

0x400a0d66: mqtt_write_data at C:/esp/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c:868

0x400a298b: esp_mqtt_client_publish at C:/esp/esp-idf/components/mqtt/esp-mqtt/mqtt_client.c:1719

0x400a0215: esp_mqtt_glue_publish at C:/esp/esp-rainmaker/components/rmaker_common/src/esp-mqtt/esp-mqtt-glue.c:144 (discriminator 15)

0x4008e009: esp_rmaker_mqtt_publish at C:/esp/esp-rainmaker/components/esp_rainmaker/src/mqtt/esp_rmaker_mqtt.c:88

0x4008b41d: esp_rmaker_report_param_internal at C:/esp/esp-rainmaker/components/esp_rainmaker/src/core/esp_rmaker_param.c:224

0x4008b81c: esp_rmaker_param_report at C:/esp/esp-rainmaker/components/esp_rainmaker/src/core/esp_rmaker_param.c:659

0x4008b845: esp_rmaker_param_update_and_report at C:/esp/esp-rainmaker/components/esp_rainmaker/src/core/esp_rmaker_param.c:667

0x40089ea1: timer_cb at c:\users\christopher\desktop\sprinkler\firmware\build/../main/app_driver.c:79

0x400885b9: timer_process_alarm at C:/esp/esp-idf/components/esp_timer/src/esp_timer.c:330

0x400885e2: timer_task at C:/esp/esp-idf/components/esp_timer/src/esp_timer.c:349 (discriminator 1)

0x40030609: vPortTaskWrapper at C:/esp/esp-idf/components/freertos/port/xtensa/port.c:168
  1. ESP_LOGI(TAG, "Here");
  2. esp_rmaker_param_update_and_report(info->run_prog_param, esp_rmaker_array(json));
  3. ESP_LOGI(TAG, "Her");

ESP_Piyush
Posts: 309
Joined: Wed Feb 20, 2019 7:02 am

Re: Watchdog triggering on esp_rmaker_param_update_and_report

Postby ESP_Piyush » Thu Jul 29, 2021 7:24 pm

Answered here: https://github.com/espressif/esp-rainmaker/issues/86

Root cause wasn't found, but replacing esp_timer with freeRTOS timer worked.

Who is online

Users browsing this forum: No registered users and 61 guests