zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.98k stars 6.69k forks source link

Bluetooth: `BT_HCI_EVT_DATA_BUF_OVERFLOW` is unhandled #70495

Open alwa-nordic opened 8 months ago

alwa-nordic commented 8 months ago

The handler exists, but it just prints a warning.

https://github.com/zephyrproject-rtos/zephyr/blob/5f3a69fada1a52700d9bc00d93a2b00d81c3ab57/subsys/bluetooth/host/hci_core.c#L557-L562

Deficiencies to address:

jeffwelder-ellenbytech commented 1 month ago

Hitting this log message in my application.

We're using an nRF53 central/peripheral with LL_SW_SPLIT (mitigating missing disconnect issue in softdevice), and have come across this after a prolonged connections coming and going.

As a possible mitigation we added:

#ifndef CONFIG_BT_ASSERT
    LOG_WRN("Data buffer overflow (link type 0x%02x)", evt->link_type);
#else
    // https://github.com/zephyrproject-rtos/zephyr/issues/70495
    BT_ASSERT_MSG(false, "Data buffer overflow (link type 0x%02x)", evt->link_type);
#endif