-
Notifications
You must be signed in to change notification settings - Fork 635
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
OTA_Shutdown() not releasing resources #1910
Comments
Leaving this here until someone has a look: I have solved the issue and recommend modifying the otaThread function in the example to:
Otherwise the resources allocated to the thread will not be released. |
Restarting OTA is the next issue after releasing the resources : the system gets caught here on the second start up pass:
in OTA_Init |
@coratron Thanks for the bug report. Would you mind opening a Pull Request with your suggested fix? |
Related to aws#1910 Modify `otaThread` function in `demos/ota/ota_demo_core_http/ota_demo_core_http.c` to release resources properly. * Add `pthread_detach(pthread_self());` to detach the thread. * Add `pthread_exit(NULL);` to exit the thread.
I am using the following:
The problem:
The OTA task consumes about 10kB of RAM. Calling OTA_Shutdown() should release the resources but it is not.
Confirmed with logs by checking the RAM before and after, as well as verbose logging which ends in
I (100117) AWS_OTA: OTA Agent stopped.
I am basing my code on the OTA example. In other words, the result should be reproducible by measuring the RAM watermark before aws_iot_ota() and at the end of it.
The text was updated successfully, but these errors were encountered: