Skip to content

Bluetooth: controller: Assert in data length update procedure #23069

@cvinayak

Description

@cvinayak

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:

  1. mkdir build; cd build
  2. cmake -DBOARD=board\nrf52_pca10040 ../samples/bluetooth/peripheral
  3. make
  4. 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.
image

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

Metadata

Metadata

Labels

area: BluetoothbugThe issue is a bug, or the PR is fixing a bugpriority: highHigh impact/importance bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions