You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Through pure brute force, we narrowed it down to an adverse interaction between some combination of the following:
The very latest toolchain with pthreads support
The very latest ESP-IDF
The very latest Arduino-ESP32
Working with semaphores
Only some boards
The problem does not appear to manifest in the same logic in ESP-IDF. See the above defect for all the history and conclusions made so far. In summary, at this point ... we have found that calling a FreeRTOS Semaphore release without following it with a 10msec delay causes one set of results and a crash while if we introduce a 10msec delay after the Semaphore release, all works. The errors manifest themselves in internals code rather than in user code.
A circumvention has been added to the BLE libraries to pause for 10msecs after releasing a semaphore. This isn't ideal but works. Ideally we can put our heads together and see if we can gain some additional insight into the puzzle. I am able to recreate on a board in my environment but only on one board (so far).
The text was updated successfully, but these errors were encountered:
is currently purely to get the user base working until we can resolve the puzzle properly to determine where the race condition is coming from. There is every likelihood that it is a BLE C++ code issue ... but my goal is to get it working for the community and then we can polish from there. As found in issue 121, it seems to be a good one occurring on only some boards and not others.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
We have been hunting a BLE library problem for a while which can be read about in great depth here:
nkolban/esp32-snippets#121
Through pure brute force, we narrowed it down to an adverse interaction between some combination of the following:
The problem does not appear to manifest in the same logic in ESP-IDF. See the above defect for all the history and conclusions made so far. In summary, at this point ... we have found that calling a FreeRTOS Semaphore release without following it with a 10msec delay causes one set of results and a crash while if we introduce a 10msec delay after the Semaphore release, all works. The errors manifest themselves in internals code rather than in user code.
A circumvention has been added to the BLE libraries to pause for 10msecs after releasing a semaphore. This isn't ideal but works. Ideally we can put our heads together and see if we can gain some additional insight into the puzzle. I am able to recreate on a board in my environment but only on one board (so far).
The text was updated successfully, but these errors were encountered: