Skip to content

tests/kernel/gen_isr_table failed on hsdk and nsim_hs_smp sometimes #31298

@IRISZZW

Description

@IRISZZW

Describe the bug
tests/kernel/gen_isr_table failed on hsdk and nsim_hs_smp sometimes,
when test case test_run_time_interrupt run in slave cores.

To Reproduce
Steps to reproduce the behavior:

  1. add extra config in prj.conf file CONFIG_ARC_FIRQ_STACK=y and CONFIG_TEST_HW_STACK_PROTECTION=n (see testcase.yaml)
  2. west build -d build -b hsdk .\tests\kernel\gen_isr_table
  3. west run
  4. See error

Logs and console output

*** Booting Zephyr OS build zephyr-v2.4.0-3009-gfc1b5de4c307  ***
START - Test gen_isr_tables
IRQ configuration (total lines 88):
Running test suite context
===================================================================
START - test_build_time_direct_interrupt
isr1 isr=0x900005e8 irq=87
isr2 isr=0x90000758 irq=86
Checking _irq_vector_table entry 71 for irq 87
triggering irq 87
isr1 ran
Checking _irq_vector_table entry 70 for irq 86
triggering irq 86
isr2 ran
 PASS - test_build_time_direct_interrupt
===================================================================
START - test_build_time_interrupt
_sw_isr_table at location 0x9000bc00
isr3 isr=0x90000548 irq=85 param=0xb01dface
Checking _sw_isr_table entry 69 for irq 85
triggering irq 85
isr3 ran with parameter 0xb01dface
isr4 isr=0x90000570 irq=84 param=0xca55e77e
Checking _sw_isr_table entry 68 for irq 84
triggering irq 84
isr4 ran with parameter 0xca55e77e
 PASS - test_build_time_interrupt
===================================================================
START - test_run_time_interrupt
ASSERTION FAIL [!arch_irq_is_enabled(irq)] @ WEST_TOPDIR/zephyr/arch/common/sw_isr_common.c:84
        IRQ 83 is enabled
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 2
E: Current thread: 0x90007bfc (ztest_thread)
E: Halting system

Environment (please complete the following information):

  • OS: (Linux)
  • Toolchain (Zephyr SDK)
  • master branch( zephyr-v2.4.0-3009-gfc1b5de4c307)

Additional context

ASSERTION FAIL [!arch_irq_is_enabled(irq)] @ WEST_TOPDIR/zephyr/arch/common/sw_isr_common.c:84
        IRQ 83 is enabled

z_isr_install assert whether irq_is_enabled, and slave cores never call initial code to disable the unused interrupt lines.

void z_isr_install(unsigned int irq, void (*routine)(const void *),
const void *param)
{
unsigned int table_idx;
/*
* Do not assert on the IRQ enable status for ARM GIC since the SGI
* type interrupts are always enabled and attempting to install an ISR
* for them will cause the assertion to fail.
*/
#ifndef CONFIG_GIC
__ASSERT(!irq_is_enabled(irq), "IRQ %d is enabled", irq);
#endif /* !CONFIG_GIC */

Metadata

Metadata

Labels

area: ARCARC Architecturearea: SMPSymmetric multiprocessingbugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions