-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
esp_bluedroid_init crashes (deep in call stack) (IDFGH-7997) #9507
Comments
The new implementation of BTU_StartUp creates a thread with workqueue length zero: No idea what the purpose of creating the btu_thread with size zero is. The idf 4.4 does this: |
OK, I was mistaken. In another part the zero size queue get set to default length. But, the problem is here: For a queue array of 2 initializing only one is an error. |
That change does get things working again in my app. Thanks a bunch! |
sure, let's hope this thread gets picked up by officials and fixed in the branch quickly. |
@aircable Thank you very much. We will fix this ASAP. |
…luedroid There should be only one workqueue for BTU task. The queue length for the second workqueue of BTU can be uninitialized and caused memory overflow and corruption. Closes #9507
I've applied the patch from the commit referenced, and that also works for me. I hope this makes it into the main & 5.0 branches soon. |
Confirmed working from the master branch as well. Thanks. |
…luedroid There should be only one workqueue for BTU task. The queue length for the second workqueue of BTU can be uninitialized and caused memory overflow and corruption. Closes #9507
…luedroid There should be only one workqueue for BTU task. The queue length for the second workqueue of BTU can be uninitialized and caused memory overflow and corruption. Closes #9507
Environment
Problem Description
My program crashes in esp_bluedroid_init in the latest version of esp-idf, but did not as recently as two weeks ago.
In testing my program with esp-idf (v5.0-dev-4379-g36f49f361c) from the master branch, the BLE stack worked just fine. In the latest version of the esp-idf (v5.0-dev-4723-g30e8f19f5a), the program crashes.
I based my code on the examples/bluetooth/bluedroid/ble/gatt_server program. Seeing as that example has not materially changed, I have not modified my program except for changing the different esp-idf versions.
Expected Behavior
esp_bluedroid_init() returns to the calling function
Actual Behavior
The console displays the messages shown below under "Debug Logs" when esp_bluedroid_init is called.
I've checked the values in
sdkconfig
and there aren't any obvious looking changes from the gatt_server example. I've increased a few stack size settings (to no change):Steps to reproduce
Code to reproduce this issue
Unfortunately, I don't have a small test case which reproduces this. The gatt_server example works with either SDK version. I'm still trying to develop a standalone test case.
Debug Logs
An extremely similar stack trace can be seen on ESP32-S3:
Other items if possible
build
folder (note this may contain all the code details and symbols of your project.)A binary for the ESP32 is at:
esp_bluedroid_init-bugreport.zip
The text was updated successfully, but these errors were encountered: