-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
tests: kernel tests hardfault on nucleo_l073rz #37119
Comments
Analysis
Hardfault analysis:
It is asm function "arch_cpu_idle" (arch/arm/core/aarch32/cpu_idel.s) I also found that adding asm instruction:
Note when debugging step by step, I could not reproduce the Hardfault, so it is very difficult to get to the root cause of the issue. (maybe due to something linked to interrupt enabling ??) @andyross, @ioannisg, |
Looks like there is no arch_irq_lock() in some place where it should be present. |
My bad, arch_irq_lock will disable interrupts (set primask). I updated my description
Yes #22078 looks very similar, thanks for point this. The fix #23511
which I don't understand (I don't have enough zephyr kernel knowledge) |
@ioannisg I've set the issue to medium, don't hesitate to raise to high if requested |
@ABOSTM What I can't understand is why your bisection points to the commit that disables interrupts, while your experiment shows that disabling interrupts by adding "cpsid i" helps. |
Also it could be related with idle API fragility discussed in #24255. |
^^ @stephanosio |
closed by mistake |
@ioannisg, @andyross would you have time answering questions in this comment #37119 (comment) ? |
Since commit e0bed3b, a similar hardfault occurs when testing the stm32g071rb nucleo board with "test suite timer_api" :
This hardfault is definitely linked to the USERSPACE and that PR "Cortex-R MPU support" #28231 applied on a cortex M0+ with MPU devices like stm32g071 or stm32l073 |
@FRASTM, Hardfault on stm32g071rb nucleo board is not link to the current issue (see issue 38421) |
Enabling DBGMCU bits Sleep/Stop/Standby on STM32L0 causes Hardfault. See zephyrproject-rtos#37119 As a workaround, force those bits to 0 Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
On STM32L0, there are some hardfault when DBGMCU bit Sleep, Stop or Standby are enabled. See zephyrproject-rtos#37119 For unclear reason, enabling DMA clock fixes this issue. (similarly than zephyrproject-rtos#38561, DMA clock comes with DBGMCU bits) Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
On STM32L0, there are some hardfault when DBGMCU bit Sleep, Stop or Standby are enabled. See zephyrproject-rtos#37119 For unclear reason, enabling DMA clock fixes this issue. (similarly than zephyrproject-rtos#38561, DMA clock comes with DBGMCU bits) Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
Describe the bug
Hardfault occurs on nucleo_l073rz, while executing some tests on automatic test bench.
Mainly kernel tests, but not exclusively.
HardFault is reproducible easily under some circumstances (see analysis below).
List of faulty tests
To Reproduce
Steps to reproduce the behavior:
Logs and console output
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: