-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Bluetooth: Deadlock with TX of ACL data and HCI commands (command blocked by data) #25917
Comments
Anylsis: |
is this fixed? |
@galak No. |
I ran into this issue and my workaround was to do the sending from a workqueue thread with a lower priority. |
@xudongzheng Could you elaborate on your workaround? What exactly did you move to the workqueue? Sending of data, or sending of the command? |
I was occasionally getting the "Unable to allocate TX context" error when calling I haven't looked into the details of this specific bug but it's possible that https:/cvinayak/zephyr/blob/a2289565363a210e33b8956eac46df55e19a790a/samples/bluetooth/peripheral/src/main.c#L476 or one of the other calls is running into the same issue. |
@xudongzheng That behavior is documented here: https:/zephyrproject-rtos/zephyr/blob/main/include/bluetooth/gatt.h#L927L930 That is however not the same as is happening in this case, you haven't encountered this issue. |
I'm seeing the same thing when I spam bt_gatt_notify. This seems like a dangerous bug since there's no way to really know if you'll exceed the threshold for overflow. Much better would be to simply return an error that could optionally be ignored for non-critical notifications. @galak can you comment on why you feel this is low priority? |
I can't understand this, can you point out the relevant code? |
@joerchan Why we |
Related Nordic Devzone thread: https://devzone.nordicsemi.com/f/nordic-q-a/89888/ncs-nordic-uart-service-bt-rx-hci-timeout |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Is it still worked on ? Its still having the same issue.. Im on Zephyr 3.2.0 |
@klapro this is supposed to be fixed. Could you open a new bug report with all the relevant details (how to reproduce etc) ? Maybe it's something different. |
Describe the bug
Performing GATT write commands from a peripheral and a central as fast as possible from the main loop while the peer central is performing security procedure to bond, causes the following assertion fail on both the peripheral and central device
In peripheral:
In central_hr:
To Reproduce
Use the branch: cvinayak@a228956
Steps to reproduce the behavior:
Build and flash peripheral
Build and flash central_hr
5. mkdir -p build/central_hr; cd build/central_hr
6. cmake -GNinja -DBOARD=nrf52dk_nrf52832 ../../samples/bluetooth/central_hr
7. ninja
8. ninja flash
minicom -D /dev/ttyACMx
Expected behavior
peripheral and central_hr should connect, transfer write commands, perform SMP pairing, be encrypted and continue to transder write commands.
Impact
showstopper
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: