Skip to content
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

arch.interrupt.arm.arm_interrupt: hangs on mimxrt685_evk_cm33 #35656

Closed
hakehuang opened this issue May 26, 2021 · 9 comments · Fixed by #36225
Closed

arch.interrupt.arm.arm_interrupt: hangs on mimxrt685_evk_cm33 #35656

hakehuang opened this issue May 26, 2021 · 9 comments · Fixed by #36225
Assignees
Labels
area: ARM ARM (32-bit) Architecture bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug

Comments

@hakehuang
Copy link
Collaborator

hakehuang commented May 26, 2021

Describe the bug
test application test_arm_interrupt hangs with below
Caught system error -- reason 4
Wrong crash type got 4 expected 0

To Reproduce
Steps to reproduce the behavior:
1.cd tests/arch/arm/arm_interrupt; mkdir build; cd build
2. cmake -DBOARD=mimxrt685_evk_cm33
3. make; make flash
4. See error

all test configuration fails

arch.interrupt.arm:
filter: not CONFIG_TRUSTED_EXECUTION_NONSECURE
arch.interrupt.no_optimizations:
filter: not CONFIG_TRUSTED_EXECUTION_NONSECURE
extra_configs:
- CONFIG_NO_OPTIMIZATIONS=y
- CONFIG_IDLE_STACK_SIZE=512
- CONFIG_MAIN_STACK_SIZE=1024
arch.interrupt.extra_exception_info:
filter: not CONFIG_TRUSTED_EXECUTION_NONSECURE
extra_configs:
- CONFIG_EXTRA_EXCEPTION_INFO=y

Expected behavior
test pass

Impact
interrupt handling

Logs and console output

*** Booting Zephyr OS build v2.6.0-rc1-323-gae4fb20f6733  ***
Running test suite arm_interrupt
===================================================================
START - test_arm_null_pointer_exception
Skipped
PASS - test_arm_null_pointer_exception in 0.1 seconds
===================================================================
START - test_arm_interrupt
Available IRQ line: 59
E: >>> ZEPHYR FATAL ERROR 1: Unhandled interrupt on CPU 0
E: Current thread: 0x30180140 (test_arm_interrupt)
Caught system error -- reason 1
E: r0/a1:  0x00000003  r1/a2:  0x301831d8  r2/a3:  0x00000003
E: r3/a4:  0x30182fc0 r12/ip:  0xa0000000 r14/lr:  0x18003f0f
E:  xpsr:  0x6100004b
E: Faulting instruction address (r15/pc): 0x1800190a
E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x30180140 (test_arm_interrupt)
Caught system error -- reason 3
E: r0/a1:  0x00000004  r1/a2:  0x301831d8  r2/a3:  0x00000004
E: r3/a4:  0x30182fc0 r12/ip:  0x00000000 r14/lr:  0x18003f0f
E:  xpsr:  0x6100004b
E: Faulting instruction address (r15/pc): 0x18001928
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x30180140 (test_arm_interrupt)
Caught system error -- reason 4
ASSERTION FAIL [0] @ WEST_TOPDIR/zephyr/tests/arch/arm/arm_interrupt/src/arm_interrupt.c:216
Intentional assert
E: r0/a1:  0x00000004  r1/a2:  0x000000d8  r2/a3:  0x80000000
E: r3/a4:  0x0000004b r12/ip:  0xa0000000 r14/lr:  0x18003f0f
E:  xpsr:  0x4100004b
E: Faulting instruction address (r15/pc): 0x1800d0a0
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x30180140 (test_arm_interrupt)
Caught system error -- reason 4
ASSERTION FAIL [0] @ WEST_TOPDIR/zephyr/drivers/timer/sys_clock_init.c:23
E: r0/a1:  0x00000004  r1/a2:  0x00000017  r2/a3:  0x80000000
E: r3/a4:  0x0000000f r12/ip:  0xa0000000 r14/lr:  0xfffffffd
E:  xpsr:  0x4100000f
E: Faulting instruction address (r15/pc): 0x1800d0a0
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x30180140 (test_arm_interrupt)
Caught system error -- reason 4
Wrong crash type got 4 expected 0

Environment (please complete the following information):

  • OS: (e.g. Linux )
  • Toolchain (e.g Zephyr SDK, ...)
  • Commit SHA or Version used: v2.6.0-rc1-158-gcd9421a45e72
@hakehuang hakehuang added bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP area: ARM ARM (32-bit) Architecture labels May 26, 2021
@hakehuang
Copy link
Collaborator Author

@MaureenHelm @dleach02 , this issues exist since RC1.

@galak galak added the priority: low Low impact/importance bug label May 26, 2021
@ioannisg
Copy link
Member

Looks like a stack overflow

@mmahadevan108
Copy link
Collaborator

The test is failing the below lines
https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/arch/arm/arm_interrupt/src/arm_interrupt.c#L336-L353

The test is expecting a CPU exception and RT600 is throwing a Kernel Panic. I am not clear how to address this.

@ioannisg
Copy link
Member

I'll take a look.

@mmahadevan108
Copy link
Collaborator

@ioannisg Any guidance on this issue?

@hakehuang
Copy link
Collaborator Author

hakehuang commented Jun 23, 2021

lpcxpresso55s28 has the same problem.

*** Booting Zephyr OS build zephyr-v2.6.0-286-g46029914a7ac  ***
Running test suite arm_interrupt
===================================================================
START - test_arm_null_pointer_exception
Skipped
PASS - test_arm_null_pointer_exception in 0.1 seconds
===================================================================
START - test_arm_interrupt
Available IRQ line: 59
E: >>> ZEPHYR FATAL ERROR 1: Unhandled interrupt on CPU 0
E: Current thread: 0x30000138 (test_arm_interrupt)
Caught system error -- reason 1
E: r0/a1:  0x00000003  r1/a2:  0x300031e0  r2/a3:  0x00000003
E: r3/a4:  0x30002fc0 r12/ip:  0xa0000000 r14/lr:  0x100025f7
E:  xpsr:  0x6100004b
E: EXC_RETURN: 0x0
E: Faulting instruction address (r15/pc): 0x1000070a
E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x30000138 (test_arm_interrupt)
Caught system error -- reason 3
E: r0/a1:  0x00000004  r1/a2:  0x300031e0  r2/a3:  0x00000004
E: r3/a4:  0x30002fc0 r12/ip:  0x00000000 r14/lr:  0x100025f7
E:  xpsr:  0x6100004b
E: EXC_RETURN: 0x0
E: Faulting instruction address (r15/pc): 0x10000728
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x30000138 (test_arm_interrupt)
Caught system error -- reason 4
ASSERTION FAIL [0] @ WEST_TOPDIR/zephyr/tests/arch/arm/arm_interrupt/src/arm_interrupt.c:216
Intentional assert
E: r0/a1:  0x00000004  r1/a2:  0x000000d8  r2/a3:  0x80000000
E: r3/a4:  0x0000004b r12/ip:  0xa0000000 r14/lr:  0x100025f7
E:  xpsr:  0x4100004b
E: EXC_RETURN: 0x0
E: Faulting instruction address (r15/pc): 0x1000b9a4
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x30000138 (test_arm_interrupt)
Caught system error -- reason 4
ASSERTION FAIL [esf != ((void *)0)] @ WEST_TOPDIR/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:993
ESF could not be retrieved successfully. Shall never occur.
ASSERTION FAIL [esf != ((void *)0)] @ WEST_TOPDIR/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:993
ESF could not be retrieved successfully. Shall never occur.

@ioannisg
Copy link
Member

@hakehuang @mmahadevan108 would #36225 also fix this too?

@mmahadevan108
Copy link
Collaborator

Yes it would, thank you for looking into this.

@mmahadevan108
Copy link
Collaborator

I have tested on mimxrt685_evk. This test passes with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM ARM (32-bit) Architecture bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants