-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Describe the bug
Seen (both on real phone and in simulation) that the LLCP system can crash if a connection event was lost due to scheduling conflicts.
A slave device that both advertises and has a connection with a master phone. On the connection the master makes a PHY update followed by the save doing a length update. After the PHY update instant the master does a new length update. Unfortunately the master length update is placed at the connection event right after the PHY update, but the connection event that the PHY update is to take place is lost on the slave due to scheduling conflict with the advertiser role. Due to the lost event the LLCP machine has not been run prior to handling the length update on the slave and the LLCP machine is now in the wrong state.
ull_conn.c:4635 ull_conn_rx ASSERT(pdu_rx -->llctrl.opcode == PDU_DATA_LLCTRL_TYPE_LENGTH_RSP)
To Reproduce
(assuming the below build process, as the issue is reported by someone else)
Steps to reproduce the behavior:
- mkdir build; cd build
- cmake -DBOARD=board\nrf52_pca10040 ../samples/bluetooth/peripheral
- make
- See error
Expected behavior
No assertion
Impact
showstopper
Screenshots or console output
If applicable, add a screenshot (drag-and-drop an image), or console logs
(cut-and-paste text and put a code fence (```) before and after, to help
explain the issue.
Environment (please complete the following information):
- OS: Linux
- Toolchain: Zephyr SDK
- Commit SHA or Version used: 58908aa
Additional context
Add any other context about the problem here. None