Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.14] Bluetooth: thread crashes when configuring a non 0 Slave Latency #32430

Closed
rolandz-setec opened this issue Feb 18, 2021 · 1 comment · Fixed by #32571
Closed

[v1.14] Bluetooth: thread crashes when configuring a non 0 Slave Latency #32430

rolandz-setec opened this issue Feb 18, 2021 · 1 comment · Fixed by #32571
Assignees
Labels
area: Bluetooth Controller area: Bluetooth bug The issue is a bug, or the PR is fixing a bug LTS Long term release branch related priority: high High impact/importance bug
Projects
Milestone

Comments

@rolandz-setec
Copy link

rolandz-setec commented Feb 18, 2021

Describe the bug
Our nRF52 peripheral device running Zephyr v1.14 accepts up to 4 connections from central devices (CONFIG_BT_MAX_CONN = 4), all go well with the default BT_PERIPHERAL_PREF_SLAVE_LATENCY = 0 config.
If we change BT_PERIPHERAL_PREF_SLAVE_LATENCY to non 0, and make 3 or above connections, the bluetooth thread crashes within minutes.

To Reproduce

  1. build and run the peripheral system with the following,
    CONFIG_BT_MAX_CONN = 4
    BT_PERIPHERAL_PREF_SLAVE_LATENCY = 2
  2. Connect 3 or more mobile devices to the peripheral.

Expected behavior
No crash of threads.

Impact
Major

Logs and console output
[00:05:33.008,941] bt_ctlr_ctrl: assert: '(ticker_status == 0) || (ticker_status == 2)' failed
***** Kernel OOPS! *****
Current thread ID = 0x200028f4
Faulting instruction address = 0x266e6
Fatal fault in thread 0x200028f4! Aborting.

Environment (please complete the following information):

  • OS: Windows 10
  • Toolchain :GNU Arm Embedded Toolchain
  • v1.14-branch, SHA-1: ffd8a91

Additional context
Reported to @cvinayak on Slack.

@rolandz-setec rolandz-setec added the bug The issue is a bug, or the PR is fixing a bug label Feb 18, 2021
@cvinayak cvinayak self-assigned this Feb 18, 2021
@cvinayak cvinayak added area: Bluetooth area: Bluetooth Controller LTS Long term release branch related priority: high High impact/importance bug labels Feb 18, 2021
@cvinayak cvinayak modified the milestones: v1.14.3, v2.6.0 Feb 18, 2021
@carlescufi carlescufi added this to the v1.14.3 milestone Feb 19, 2021
@carlescufi carlescufi changed the title Bluetooth: thread crashes when configuring a non 0 Slave Latency [v1.14] Bluetooth: thread crashes when configuring a non 0 Slave Latency Feb 19, 2021
cvinayak added a commit to cvinayak/zephyr that referenced this issue Feb 23, 2021
When ticker job is disabled inside radio events then all
advertising, scanning, and slave latency cancel ticker
operations will be deferred, requiring increased ticker
thread context operation queue count.

Relates to zephyrproject-rtos#32430.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
carlescufi pushed a commit that referenced this issue Feb 23, 2021
When ticker job is disabled inside radio events then all
advertising, scanning, and slave latency cancel ticker
operations will be deferred, requiring increased ticker
thread context operation queue count.

Relates to #32430.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
cvinayak added a commit to cvinayak/zephyr that referenced this issue Apr 6, 2021
When ticker job is disabled inside radio events then all
advertising, scanning, and slave latency cancel ticker
operations will be deferred, requiring increased ticker
thread context operation queue count.

Relates to zephyrproject-rtos#32430.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
carlescufi pushed a commit that referenced this issue Apr 13, 2021
When ticker job is disabled inside radio events then all
advertising, scanning, and slave latency cancel ticker
operations will be deferred, requiring increased ticker
thread context operation queue count.

Relates to #32430.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
cvinayak added a commit to cvinayak/zephyr that referenced this issue Apr 14, 2021
When ticker job is disabled inside radio events then all
advertising, scanning, and slave latency cancel ticker
operations will be deferred, requiring increased ticker
thread context operation queue count.

Fixes zephyrproject-rtos#32430.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Apr 25, 2021
@cvinayak cvinayak removed the Stale label Apr 26, 2021
nashif pushed a commit that referenced this issue May 21, 2021
When ticker job is disabled inside radio events then all
advertising, scanning, and slave latency cancel ticker
operations will be deferred, requiring increased ticker
thread context operation queue count.

Fixes #32430.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
@nashif nashif closed this as completed May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Controller area: Bluetooth bug The issue is a bug, or the PR is fixing a bug LTS Long term release branch related priority: high High impact/importance bug
Projects
No open projects
Bluetooth
Awaiting triage
4 participants