Closed tbarri closed 5 months ago
I am only able to replicate this issue when using this BLE client
Can you reproduce it with the nrf connect app? (desktop or mobile).
If you can't we will need more info to debug this:
.config
Can you reproduce it with the nrf connect app? (desktop or mobile).
No, I was not able to reproduce the issue with the NRF connect app (I tried with both desktop + mobile).
I have, however, prepared an example repository that should hopefully allow you to reproduce the issue: https://github.com/tbarri/ble-zephyr-experiment
A packet trace is included in the packet-trace-data folder.
I used the peripheral_hr
sample project. The .config
for this can be found here.
Please let me know if you need any additional details.
Tried to reproduce locally but the rust program ran the 100 loops to completion without any errors.
Environment
ble-zephyr-experiment on main is 📦 v0.1.0 via 🦀 v1.75.0
❯ uname -r
6.5.0-14-generic
ble-zephyr-experiment on main is 📦 v0.1.0 via 🦀 v1.75.0
❯ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
@jori-nordic and I used the hci_uart
sample as the controller attached to BlueZ like so:
# monitor with btmon
sudo btmon &
# attach zephyr controller
sudo btattach -B /dev/ttyACM3 -S 1000000
We used the same commit that you mention in the example repo: 9569e4410475fb62125e769a13222882902d8c75
@theob-pro could you try capturing the hci trace on a few working iterations and compare with the trace provided in the sample repo?
Could you also try with the latest zephyr revision?
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.
Closing due to inactivity. @tbarri please reopen if still applicable.
Describe the bug
I seem to have run into a buffer exhaustion issue within the BLE stack.
To Reproduce
Then, in a for loop:
00002A37-0000-1000-8000-00805F9B34FB
After the 3rd iteration, the device refuses to respond to any further notifications:
The number of iterations required to hit the buffer issue seems to match the value of
CONFIG_BT_ATT_TX_COUNT
I am only able to replicate this issue when using this BLE client: https://github.com/alexmoon/bluest.
I did perform a git bisect, and discovered that the issue is first introduced with commit bd9c35b4966bf56d908c3416ab2c192781f37ed8.
I repeated for the commit immediatly proceeding (530e845f927caa7c2f19aa172f2dbafbf1c731a7), and instead received exceptions. The device, however, remains operable.
Expected behavior A repeatedly disconnected BLE client should not be able to cause buffer exhaustion.
Impact I am not sure how impactful this issue is. It is not present in zephyr-v3.5.0.
Additional Notes
I realise that the issue was introduced with a revert, possibly introducing the same issue as https://github.com/zephyrproject-rtos/zephyr/pull/60309. I unfortunately lack too much context to know.
Many thanks in advance!