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
_SysFatalErrorHandler not working properly for arc on quark_se_c1000_ss_devboard #8032
Comments
@vonhust can you take a look? |
The fatal error handling for ARC changed, so there could indeed be a problem. |
We're supposed to get some kind of fault for the stack overflow but it's just hanging on ARC. |
Hi @andrewboie , i can reproduce it in emsk. It works as expected, because the stack overflow will raise STACK_CHECK exception. In current ARC's code, this will hang the system as shown in the following code
There are two ways to let the test pass
Moreover, in the future, we ask TSC to make it clear which kind of exception should hang the system, which should not. @ruuddw , what's your opinion? |
Sorry, my mistake. I was trying to compare the arc/arm/x86 implementation in fatal.c and wrote "x86" by mistake. The test hangs in _SysFatalErrorHandler function in the file "arch\arc\core\fatal.c". |
ARC commit 8da51ee and 3d9ba10 changed the behavior of the default sys_fatal_error_handler to hang the system instead of killing the task and continue. Behavior is not consistent over different architectures, there is an #ifdef that enables the hang for stack errors, but conditions for the #ifdef are different. Bit strange since the error that is triggered is in all cases the same. |
Whether it should hang the system it not decided finally. But remove it here to let some tests pass. Fixes zephyrproject-rtos#8032 Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
commit 5d58f0f allows the HW stack checking to be non-fatal in the ARC default sys_fatal_handler, so this test passes again (continue after killing the offending task). |
@ruuddw can you open a new issue about default behaviour (enhancement) so we can address that for 1.13? |
The test tests/kernel/mem_protect/stackprot/ hangs after reporting "Stack Check Fail".
Arch: arc
Board: quark_se_c1000_ss_devboard
Zephyr tag: v1.12.0-rc2 - commit d93ecda.
Actual Console Log:
Expected Console Log:
Tried further debugging, the test hangs in _SysFatalErrorHandler function in the file "arch\arc\core\fatal.c".
Steps to reproduce:
The text was updated successfully, but these errors were encountered: