-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
nrf5 examples stop responding while attempting thread join #2187
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
Fault stack: Level,Function,Stack Frame,Source,PC,Return Address,Stack Used |
This is a timer task stack overflow. The timer task uses 1k stack by default. Enabling configCHECK_FOR_STACK_OVERFLOW diagnoses this issue. |
@bukepo I believe we should move all of the code from In the meantime I will post a patch to increase the stack size. |
As of b15c292 ("[nrf5-lock] start joiner role on boot (project-chip#1962)"), we are using too much stack space in timer task. The timer task has a 1k stack and logging along uses a 256 byte stack buffer. The code in GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::OnJoinerTimer should be moved off the timer task. In the meantime increase the stack size to avoid overruns in the thread joiner. Also enable the option configCHECK_FOR_STACK_OVERFLOW, and while we're here also enable configUSE_MALLOC_FAILED_HOOK. These diagnostic options are invaluable for saving debugging time. Since logging uses significant stack space, try to catch stack overflows in the platform LogV(). This fires reliably in OnJoinerTimer prior to enlarging the stack. Depends on project-chip#2185 Fixes project-chip#2187
As of b15c292 ("[nrf5-lock] start joiner role on boot (project-chip#1962)"), we are using too much stack space in timer task. The timer task has a 1k stack and logging along uses a 256 byte stack buffer. The code in GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::OnJoinerTimer should be moved off the timer task. In the meantime increase the stack size to avoid overruns in the thread joiner. Also enable the option configCHECK_FOR_STACK_OVERFLOW, and while we're here also enable configUSE_MALLOC_FAILED_HOOK. These diagnostic options are invaluable for saving debugging time. Since logging uses significant stack space, try to catch stack overflows in the platform LogV(). This fires reliably in OnJoinerTimer prior to enlarging the stack. Fixes project-chip#2187
* nrf5: Enlarge stack to fix thread join overruns As of b15c292 ("[nrf5-lock] start joiner role on boot (#1962)"), we are using too much stack space in timer task. The timer task has a 1k stack and logging along uses a 256 byte stack buffer. The code in GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::OnJoinerTimer should be moved off the timer task. In the meantime increase the stack size to avoid overruns in the thread joiner. Also enable the option configCHECK_FOR_STACK_OVERFLOW, and while we're here also enable configUSE_MALLOC_FAILED_HOOK. These diagnostic options are invaluable for saving debugging time. Since logging uses significant stack space, try to catch stack overflows in the platform LogV(). This fires reliably in OnJoinerTimer prior to enlarging the stack. Fixes #2187 * Reduce timer task memory to 2k * Fix the stack size in EFR32 as well
* -Include the correct FreeRTOS Cortex files in the EFR32 makefiles correspoding to the defined MCU family (MG12 vs MG21) -Init all IRQs priority to a lower priority valid for FreeRTOS API. An IRQ in the gecko radio libs with the default priority 0 (highest) was causing a assert failure in FreeRTOS * Add the IRQ priority init for all EFR32 boards init Restyle some file headers and copyright mentions * Fix build script * Fix sources for EFR32 platform * Set mbedtls to external source * Fix compilation with ninja * Add BoltLockManager to manage the lock and unlock request and state Add DataModelHandler to handle bolt actions from the cluster messages Add Gen folder with the files for silicon lab cluster implementation Strt a server session for UDP messages Include some mbedtls sources files from gsdk 2.7 in gni . TO BE FIX * merge upstream * Added Openthread to the example * nrf5: Enlarge stack to fix thread join overruns As of b15c292 ("[nrf5-lock] start joiner role on boot (#1962)"), we are using too much stack space in timer task. The timer task has a 1k stack and logging along uses a 256 byte stack buffer. The code in GenericThreadStackManagerImpl_FreeRTOS<ImplClass>::OnJoinerTimer should be moved off the timer task. In the meantime increase the stack size to avoid overruns in the thread joiner. Also enable the option configCHECK_FOR_STACK_OVERFLOW, and while we're here also enable configUSE_MALLOC_FAILED_HOOK. These diagnostic options are invaluable for saving debugging time. Since logging uses significant stack space, try to catch stack overflows in the platform LogV(). This fires reliably in OnJoinerTimer prior to enlarging the stack. Fixes #2187 * Reduce timer task memory to 2k * Fix the stack size in EFR32 as well * Add BoltLockManager to manage the lock and unlock request and state Add DataModelHandler to handle bolt actions from the cluster messages Add Gen folder with the files for silicon lab cluster implementation Start a server session for UDP messages Include some mbedtls sources files from gsdk 2.7 in gni . TO BE FIX merge upstream * Add support for Silabs dev board BRD4163A and BRD4164A Merge Upstream into branch Add BoltLockManager to manage the lock and unlock request and state Add DataModelHandler to handle bolt actions from the cluster messages Add Gen folder with the files for silicon lab cluster implementation Strt a server session for UDP messages Include some mbedtls sources files from gsdk 2.7 in gni . TO BE FIX merge upstream Add the IRQ priority init for all EFR32 boards init Restyle some file headers and copyright mentions * Restyled by whitespace * Fix submodules * Format GN files * Clean up & enable Thread on EFR32 * Fix initial thread stack overrun * Fix entropy provider * Restyled by clang-format * Fix openthread commit * Reformat build files gn format $(git ls-files HEAD '*.gn' '*.gni') git add $(git ls-files HEAD '*.gn' '*.gni') Hopefully the last time now that restyled is working. * Format GN files * Apply fixes from master Co-authored-by: jmartinez-silabs <[email protected]> Co-authored-by: jfpenven <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: jmartinez-silabs <[email protected]>
As of openthread/openthread#5299 thread joiner initiated at boot results in unresponsive device. It takes several join attempts for this to occur.
Repro (fails):
Boot and just wait. Device hangs after a few join attempts.
No Repro: (stable)
Boot and just wait. Device stable.
Log:
@lanyuwen @bukepo
The text was updated successfully, but these errors were encountered: