Skip to content

test: tests/kernel/mem_slab/mslab_threadsafe fails sporadically on nrf52 #13536

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

Closed
mike-scott opened this issue Feb 19, 2019 · 7 comments
Closed
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug

Comments

@mike-scott
Copy link
Contributor

Describe the bug
If you run the following test on nrf52_blenano2 (and possibly any nrf52832) it will fail with a hardware exception in a seemingly random pattern.

Painful repeated bisection leads me to this commit:
03f007e

To Reproduce
Steps to reproduce the behavior:

  1. cd tests/kernel/mem_slab/mslab_threadsafe
  2. mkdir build; cd build
  3. cmake -DBOARD=nrf52_blenano2 ..
  4. make flash
  5. 1 in say 6-7 tries (sometimes a lot more) see hardware exception

Expected behavior
Pass this test

Impact
CI fails in random ways when testing on real HW

Screenshots or console output

***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
PASS - test_mslab_threadsafe                                                                                                                                 
===================================================================                                                                                          
Test suite mslab_threadsafe succeeded                                                                                                                        
===================================================================                                                                                          
PROJECT EXECUTION SUCCESSFUL                                                                                                                                 
***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
PASS - test_mslab_threadsafe                                                                                                                                 
===================================================================                                                                                          
Test suite mslab_threadsafe succeeded                                                                                                                        
===================================================================                                                                                          
PROJECT EXECUTION SUCCESSFUL                                                                                                                                 
***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
PASS - test_mslab_threadsafe                                                                                                                                 
===================================================================                                                                                          
Test suite mslab_threadsafe succeeded                                                                                                                        
===================================================================                                                                                          
PROJECT EXECUTION SUCCESSFUL                                                                                                                                 
***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
PASS - test_mslab_threadsafe                                                                                                                                 
===================================================================                                                                                          
Test suite mslab_threadsafe succeeded                                                                                                                        
===================================================================                                                                                          
PROJECT EXECUTION SUCCESSFUL                                                                                                                                 
***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
PASS - test_mslab_threadsafe                                                                                                                                 
===================================================================                                                                                          
Test suite mslab_threadsafe succeeded                                                                                                                        
===================================================================                                                                                          
PROJECT EXECUTION SUCCESSFUL                                                                                                                                 
***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
PASS - test_mslab_threadsafe                                                                                                                                 
===================================================================                                                                                          
Test suite mslab_threadsafe succeeded                                                                                                                        
===================================================================                                                                                          
PROJECT EXECUTION SUCCESSFUL                                                                                                                                 
***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
PASS - test_mslab_threadsafe                                                                                                                                 
===================================================================                                                                                          
Test suite mslab_threadsafe succeeded                                                                                                                        
===================================================================                                                                                          
PROJECT EXECUTION SUCCESSFUL                                                                                                                                 
***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
PASS - test_mslab_threadsafe                                                                                                                                 
===================================================================                                                                                          
Test suite mslab_threadsafe succeeded                                                                                                                        
===================================================================                                                                                          
PROJECT EXECUTION SUCCESSFUL                                                                                                                                 
***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
PASS - test_mslab_threadsafe                                                                                                                                 
===================================================================                                                                                          
Test suite mslab_threadsafe succeeded                                                                                                                        
===================================================================                                                                                          
PROJECT EXECUTION SUCCESSFUL                                                                                                                                 
***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
PASS - test_mslab_threadsafe                                                                                                                                 
===================================================================                                                                                          
Test suite mslab_threadsafe succeeded                                                                                                                        
===================================================================                                                                                          
PROJECT EXECUTION SUCCESSFUL                                                                                                                                 
***** Booting Zephyr OS v1.14.0-rc1-330-gb71e1f941f *****                                                                                                    
Running test suite mslab_threadsafe                                                                                                                          
===================================================================                                                                                          
starting test - test_mslab_threadsafe                                                                                                                        
***** MPU FAULT *****                                                                                                                                        
  Data Access Violation                                                                                                                                      
  MMFAR Address: 0x0                                                                                                                                         
***** Hardware exception *****                                                                                                                               
Current thread ID = 0x20000114                                                                                                                               
Faulting instruction address = 0x4436                                                                                                                        
Fatal fault in ISR! Spinning...                                                                                                                              

Environment (please complete the following information):

  • OS: Arch Linux
  • Toolchain: Zephyr SDK
  • Master as of today (SHA: b71e1f9)
@mike-scott mike-scott added the bug The issue is a bug, or the PR is fixing a bug label Feb 19, 2019
@carlescufi carlescufi added the platform: nRF Nordic nRFx label Feb 19, 2019
@andyross
Copy link
Collaborator

Immediate things to check would be to (1) disable CONFIG_TICKLESS_KERNEL to see if we can narrow down the issue to the driver core or tickless mode, both of which changed with that commit, and (2) crank up the size of the ISR stack as a quick check to rule out simple stack overflow ("random corruption" always sounds like stack overflow to me, heh)

@mike-scott
Copy link
Contributor Author

  1. CONFIG_TICKLESS_KERNEL=n doesn't affect. I was able to reproduce immediately.

@mike-scott
Copy link
Contributor Author

  1. I bumped CONFIG_ISR_STACK_SIZE to 4096 (up from 2048) and was also able to reproduce.

@mike-scott
Copy link
Contributor Author

For more detail on the HW exception faulting instruction:
/zephyr/include/misc/dlist.h:523

@andrewboie
Copy link
Contributor

Same issue perhaps as #12559 ?

doanac added a commit to foundriesio/ci-scripts that referenced this issue Feb 20, 2019
This is flaky on nrf52_blenano2 right now:

  zephyrproject-rtos/zephyr#13536

Signed-off-by: Andy Doan <[email protected]>
@nashif nashif added the priority: medium Medium impact/importance bug label Feb 21, 2019
@andyross
Copy link
Collaborator

Yeah, this was definitely due to the issue in #13770. Just ran through 80 iterations of this test on my nrf52840_pca10056 and my finger is sore from the surprisingly sharp reset button.

@andyross andyross closed this as completed Mar 1, 2019
@andyross
Copy link
Collaborator

andyross commented Mar 1, 2019

Fixed in the tree for me. Please reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants