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.85k stars 6.61k forks source link

Bluetooth: Controller: Assert when starting periodic advertising right after extended advertising when there is a BIG #72852

Open Thalley opened 5 months ago

Thalley commented 5 months ago

Describe the bug If there is a BIG created and periodic advertising is started right after extended advertising, there is an assert in the controller that is triggered:

ASSERTION FAIL [id != ((uint8_t)((uint8_t)0 - 1))] @ WEST_TOPDIR/zephyr/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c:3218
@ WEST_TOPDIR/zephyr/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c:3218

To Reproduce Can be reproduced with https://github.com/zephyrproject-rtos/zephyr/pull/72690

Steps to reproduce the behavior:

  1. Remove the k_sleep in start_ext_adv from tests/bsim/bluetooth/host/iso/bis/src/bis_broadcaster.c
  2. Build and run tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis.sh
  3. See the above assert

Expected behavior Expect the controller to support starting periodic advertising directly after extended advertising.

Impact Big annoyance, but can be circumvented with a single k_sleep

Logs and console output See above

Environment (please complete the following information):

Additional context N/A

jori-nordic commented 3 months ago

Note for would-be issue fixers: Don't forget to grep the zephyr tree for mentions of this issue in order to remove workarounds. E.g. tests/bsim/bluetooth/host/iso/bis/src/bis_broadcaster.c and maybe others.