-
Notifications
You must be signed in to change notification settings - Fork 1.3k
samples: wifi: provisioning: ble: Fix stack overflow #22529
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
base: main
Are you sure you want to change the base?
Conversation
Increase bluetooth RX stack size to prevent stack overflow. Fixes SHEL-3623. Signed-off-by: Triveni Danda <[email protected]>
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 72ec6f505b8f8d125e57729f840847029b820b16 more detailssdk-nrf:
Github labels
List of changed files detected by CI (1)
Outputs:ToolchainVersion: 4aa3467a6d Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
@@ -80,7 +80,7 @@ CONFIG_BT_BUF_ACL_RX_SIZE=151 | |||
CONFIG_BT_L2CAP_TX_MTU=147 | |||
CONFIG_BT_BUF_ACL_TX_SIZE=151 | |||
|
|||
CONFIG_BT_RX_STACK_SIZE=5120 | |||
CONFIG_BT_RX_STACK_SIZE=5400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see max of 5120 in the NCS, so, a few queries:
- What was the max usage?
- Is this platform dependent?
- Do we understand why the increase?
- Do we need to update any other samples (not just Wi-Fi)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Will check and update the PR with required maximum value.
- No, we are seeing issue on all supported platforms.
- Looks like the issue is seen after the recent upmerge.
- No, the change is required only for this sample.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I guess !4 is more important to understand, why does this sample cause BT Rx thread stack to increase? IIUC, it should apply for any Wi-Fi/BLE combo case as the thread is part of HCI which is sample independent and I see no other sample bumping this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR increases the Bluetooth RX stack size in the BLE provisioning sample to prevent stack overflow (SHEL-3623).
- Increased CONFIG_BT_RX_STACK_SIZE from 5120 to 5400 in the BLE WiFi provisioning sample.
@@ -80,7 +80,7 @@ CONFIG_BT_BUF_ACL_RX_SIZE=151 | |||
CONFIG_BT_L2CAP_TX_MTU=147 | |||
CONFIG_BT_BUF_ACL_TX_SIZE=151 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Add a comment explaining why the RX stack size was increased to 5400 (e.g., based on profiling or safe margins) to help future maintainers understand the rationale.
# Increased RX stack size to 5400 based on profiling results to ensure sufficient buffer space for Bluetooth RX operations. |
Copilot uses AI. Check for mistakes.
Increase bluetooth RX stack size to prevent stack overflow.
Fixes SHEL-3623.