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.69k stars 6.53k forks source link

tests: kernel: mem_protect: mem_protect fails after reset on stm32wb55 nucleo #42599

Closed FRASTM closed 2 years ago

FRASTM commented 2 years ago

Describe the bug the test case tests/kernel/mem_protect/mem_protect/ fails after press on the reset button Only seen with nucleo_wb55rg board and that testcase

To Reproduce Steps to reproduce the behavior:

  1. west build -p auto -b nucleo_wb55rg tests/kernel/mem_protect/mem_protect/
  2. west flash with openocd
  3. after test execution push reset button after 1st test execution
  4. See error

Expected behavior test ends successfully each time the reset button is pressed

Impact error during the Test Campaign of stm32wb55

Logs and console output

START - test_kobject_access_grant_error_user                                    
E: (nil) is not a valid k_thread                                                
E: address is not a known kernel object                                         
E: syscall z_vrfy_k_object_access_grant failed check: access denied             
E: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x00000000                   
E: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x00000000                   
E:  xpsr:  0x00000000                                                           
E: Faulting instruction address (r15/pc): 0xfaa6f008                            
E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0                               
E: Current thread: 0x20001150 (test_kobject_access_grant_error)                 
Caught system error -- reason 3 1                                               
fatal error expected as part of test case                                       
ASSERTION FAIL [chunk_used(h, c)] @ WEST_TOPDIR/zephyr/lib/os/heap.c:164        
        unexpected heap state (double-free?) for memory at 0x2000958c           
E: r0/a1:  0x00000004  r1/a2:  0x000000a4  r2/a3:  0x00000010                   
E: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x0800df6f                   
E:  xpsr:  0x41000200                                                           
E: Faulting instruction address (r15/pc): 0x0800df88                            
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0                              
E: Current thread: 0x20001150 (test_kobject_access_grant_error)                 
Caught system error -- reason 4 0                                               
fatal error was unexpected, aborting 

Environment (please complete the following information):

Additional context In case of flash erase and program with the stm32Cubeprogrammer : the test execution supports reset (reset button press)

FRASTM commented 2 years ago

test passed on d356280b5432cad tests/kernel/mem_protect/mem_protect/kernel.memory_protection,arm,nucleo_wb55rg,passed,,na,7.06876015663147,0,0