xQueueReceiveFromISR triggers task watchdog after long testing period

RichPiano
Posts: 123
Joined: Mon May 18, 2020 2:51 pm

xQueueReceiveFromISR triggers task watchdog after long testing period

Postby RichPiano » Mon Jul 04, 2022 6:03 am

We're running tests decoding a downloaded security token from our webserver. Now for testing purposes we're downloading a new token every minute. After about 2 days the device stops working because of a watchdog failure. The task in question runs on CPU1 and is called access_token_task. The point is however that I've included vTaskDelay(1) inside the loop body to feed the watchdog. But as I'm getting this is not where the error is from anyway. Apparently it stems from xQueueReceiveFromISR that is triggered internally. The task uses the http_client lib to download a token (i suspect this is where the ISR queue is used). Can anyone put me on the right path here? I suspect it could also be a concurrency problem as I'm waiting for a queue in my loop body, so this could get in the way of the xQueueReceiveFromISR() but only if RTOS queues contain a bug.

Code: Select all

E (135900754) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (135900754) task_wdt:  - IDLE (CPU 1)
E (135900754) task_wdt: Tasks currently running:
E (135900754) task_wdt: CPU 0: IDLE
E (135900754) task_wdt: CPU 1: access_token_ta
E (135900754) task_wdt: Print CPU 0 (current core) backtrace


Backtrace:0x400EFC6F:0x3FFB0B800x40082AB5:0x3FFB0BB0 0x40191353:0x3FFCD770 0x400D40F5:0x3FFCD790 0x400896A2:0x3FFCD7B0 
0x400efc6f: esp_event_send_internal at C:/dev/esp/esp-idf/components/esp_event/event_send.c:186

0x40082ab5: _xt_coproc_exc at C:/dev/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1028

0x40191353: _svfwprintf_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vfwprintf.c:1284 (discriminator 44)

0x400d40f5: esp_panic_handler at C:/dev/esp/esp-idf/components/esp_system/panic.c:224

0x400896a2: xQueueReceiveFromISR at C:/dev/esp/esp-idf/components/freertos/queue.c:1946


E (135900754) task_wdt: Print CPU 1 backtrace


Backtrace:0x40084CD1:0x3FFB11900x40082AB5:0x3FFB11B0 0x40118EA3:0x3FFBEFA0 0x40118FA9:0x3FFBEFD0 0x4011955D:0x3FFBEFF0 0x40124FCD:0x3FFBF020 0x4012522E:0x3FFBF050 0x40122E13:0x3FFBF0E0 0x401241D9:0x3FFBF110 0x40124285:0x3FFBF140 0x401214E2:0x3FFBF170 0x401211A1:0x3FFBF1B0 0x40115A8D:0x3FFBF1E0 0x4011397E:0x3FFBF2A0 0x401139A0:0x3FFBF2C0 0x401139C6:0x3FFBF2E0 0x4010BCD9:0x3FFBF300 0x4010B741:0x3FFBF320 0x4010BA8B:0x3FFBF3A0 0x4010CE60:0x3FFBF3D0 0x40191CB1:0x3FFBF400 0x4010EBD2:0x3FFBF420 0x4010FA7D:0x3FFBF440 0x400D95BB:0x3FFBF460 0x400DA251:0x3FFBFD20 0x400D9C3A:0x3FFBFD50 0x400D793A:0x3FFC0830 
0x40084cd1: get_buffer_malloc at C:/dev/esp/esp-idf/components/spi_flash/spi_flash_os_func_app.c:170

0x40082ab5: _xt_coproc_exc at C:/dev/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1028

0x40118ea3: ssl_write_new_session_ticket at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_srv.c:4253

0x40118fa9: ssl_write_server_hello at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_srv.c:2528

0x4011955d: ssl_write_certificate_request at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_srv.c:2850

0x40124fcd: mbedtls_rsa_rsaes_oaep_decrypt at ??:?

0x4012522e: mbedtls_rsa_rsassa_pss_sign at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/rsa.c:1878

0x40122e13: ecdsa_verify_wrap at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/pk_wrap.c:511

0x401241d9: rsa_prepare_blinding at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/rsa.c:852 (discriminator 2)

0x40124285: mgf_mask at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/rsa.c:1163

0x401214e2: gcm_mult at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/gcm.c:286 (discriminator 2)

0x401211a1: mbedtls_ecp_group_load at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/ecp_curves.c:826

0x40115a8d: ssl_decrypt_buf at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_tls.c:2120

0x4011397e: tls1_prf at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_tls.c:473 (discriminator 4)

0x401139a0: tls1_prf at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_tls.c:477

0x401139c6: tls1_prf at C:/dev/esp/esp-idf/components/mbedtls/mbedtls/library/ssl_tls.c:488

0x4010bcd9: http_parser_execute at C:/dev/esp/esp-idf/components/nghttp/port/http_parser.c:1999

0x4010b741: http_parser_execute at C:/dev/esp/esp-idf/components/nghttp/port/http_parser.c:1873 (discriminator 1)

0x4010ba8b: http_parser_execute at C:/dev/esp/esp-idf/components/nghttp/port/http_parser.c:1935 (discriminator 2)

0x4010ce60: esp_tls_low_level_conn at C:/dev/esp/esp-idf/components/esp-tls/esp_tls.c:382 (discriminator 3)

0x40191cb1: _svfwprintf_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vfwprintf.c:1438

0x4010ebd2: ssl_get_context_data at C:/dev/esp/esp-idf/components/tcp_transport/transport_ssl.c:63
 (inlined by) ssl_connect at C:/dev/esp/esp-idf/components/tcp_transport/transport_ssl.c:107

0x4010fa7d: esp_transport_ws_set_subprotocol at C:/dev/esp/esp-idf/components/tcp_transport/transport_ws.c:638

Who is online

Users browsing this forum: awegel, Baidu [Spider], Barkonet, scerush and 136 guests