Skip to content
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

Soft WDT: detect deliberate infinite loop at Postmortem #8918

Merged
merged 2 commits into from
Apr 30, 2023

Conversation

mhightower83
Copy link
Contributor

@mhightower83 mhightower83 commented Apr 30, 2023

A popular method of handling an unrecoverable state is to reboot. The SDK does this in many places by printing a cryptic debug message followed by something equivalent to while(true){}, which compiles down to loop: j loop, creating a Soft WDT reset.

This change calls attention to these deliberate WDT resets at Postmortem. In the one case that I examined closer, the SDK responded this way after an OOM event.

For SDK 3.0.5, I found this many "deliberate infinite loops":

Library count
libpp.a 81
libmain.a 8
libespnow.a 6

@mcspr mcspr merged commit 57fa6cd into esp8266:master Apr 30, 2023
@mhightower83 mhightower83 deleted the pr-infinite branch April 30, 2023 23:17
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.

2 participants