-
Notifications
You must be signed in to change notification settings - Fork 19
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
Stopping the loop() task execution when using mDashShadowUpdate() #22
Comments
I can confirm the same problem is happening to me on mDash v1.2.16 and Platformio ESP32 core 6.3.1 (latest). The loop() task indeed stops when mDash functions are called. I'm having random issues even with mDashConfigGet. Side note: If possible, bring back the CLI as well. Not having it breaks the device provisioning flow we had. |
Issue #20 open on this one. |
Gents, the code is wide open. Sends your PRs. |
I've temporarily commented lines 104 and 107 (xSemaphoreTakeRecursive and xSemaphoreGiveRecursive) for testing and mDash works perfectly (for as long as you don't call any mDash function while another is still running 😀). |
I have solved the issue, plz check the PR. #24 |
You just added a duplicate of notify without the locks - that's not a proper fix. I guess that the core of the issue is here: Lines 736 to 740 in 8bd6647
All functions that may be called by the mDashPoll(), for example mDashShadowUpdate(), will deadlock. |
Thankq @cpq for your suggestion, So you meant to directly remove the MutexLocks from the mDashNotify() as well as mDashPoll() functions? |
@Thermelgy-Repo from the mDashNotify only. |
Dear @cpq @novlean,
Thanks for your great efforts.
My code was running perfectly with Mdash V1.2.14 & the esp-Arduino V1.0.6.
Recently, I have upgraded the esp-Arduino version from V1.0.6 to V2.0.9 & the mDash version from V1.2.14 to V1.2.16.
Now, when I am using
mDashShadowUpdate("{%Q:{%Q:{%Q:%Q}}}","state", "reported", "Key", "Success");
. It is stopping the loop() task & the Mdash goes offline & comes back. The Mdash is working such as FS & RPC, But the execution of loop() task is stopped.Some Insights:
I have checked the mDashNotify() function, saw MDashMutexLock() initialization. I have a doubt that may be the Mutex is stopping the loop() function or some other freeRTOS related problems.
Build Logs:
Platform.ini file:
Kindly help me to solve the issue.
The text was updated successfully, but these errors were encountered: