Skip to content

ESP-IDF: Removed explicit esp_task_wdt_reset call #3330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vikramdattu
Copy link

Why is esp_task_wdt_reset needed?:

  • If the task is running for longer without yielding, this leads to the task watchdog to trigger, then one should reset the task watchdog with the mentioned API.

Points under consideration while removing the call:

  • lws_service() function call is not unyielding, meaning, it does wait on socket select. Even if this function is called in a loop, it should be the caller's responsibility to yield or call esp_task_wdt_reset.
  • Rightly so, the examples here do yield calling taskYIELD
  • Calling esp_task_wdt_reset without calling esp_task_wdt_add has no real use and only leads benign errors.

lws-team and others added 3 commits January 22, 2025 10:10
Google's fuzzer platform blows a warning

/src/libwebsockets/lib/plat/unix/unix-sockets.c:497:21: warning: implicit conversion loses integer precision: 'uint32_t' (aka 'unsigned int') to '__be16' (aka 'unsigned short') [-Wimplicit-int-conversion]
  497 |         sll.sll_protocol = (uint32_t)(htons((uint16_t)0x800));
 - Also removed some esp_wdt specific unnecessary header includes
@vikramdattu
Copy link
Author

cc @Harshal5

@glmfe
Copy link

glmfe commented Mar 24, 2025

@lws-team the libwebsockets library has been added as a managed component of esp-protocols, and merging this PR is crucial for us to move forward with adding other example codes, such as a server instance.

@lws-team
Copy link
Member

Can I suggest you take a more sensitive approach to what is already there than randomly ripping it out?

It's not like what is there is so golden it must last a thousand years, but, there are users of the existing code such as Amazon. since it is enabled on AMAZON_FREERTOS currently, I think that should remain so for them.

If you want to avoid what it is doing, then use a cmake define to override, defeating it or somesuch, rather than act like esp is the only user of it.

@lws-team lws-team force-pushed the main branch 23 times, most recently from 14e29e7 to 1b15995 Compare April 25, 2025 06:31
@lws-team lws-team force-pushed the main branch 2 times, most recently from 3742e46 to 028931a Compare April 30, 2025 06:16
@lws-team lws-team force-pushed the main branch 2 times, most recently from 1ac7da6 to be45e59 Compare May 18, 2025 04:09
@lws-team lws-team force-pushed the main branch 10 times, most recently from 4a18968 to c199714 Compare June 19, 2025 05:18
@lws-team lws-team force-pushed the main branch 9 times, most recently from aca2548 to 20263de Compare July 9, 2025 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants