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

mec15xxevb_assy6853: multiple tests failed due to assertion failure at kernel/sched.c:841 #33727

Closed
s-kelvin opened this issue Mar 26, 2021 · 4 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@s-kelvin
Copy link
Collaborator

Describe the bug
There are four testcases failing: tests/drivers/adc/adc_api/, tests/drivers/gpio/gpio_api_1pin/, tests/kernel/mem_slab/mslab_api/, tests/subsys/power/power_mgmt_soc/.
All show the following same assertion failure in the log

ASSERTION FAIL [!arch_is_in_isr()] @ WEST_TOPDIR/zephyr/kernel/sched.c:841
E: r0/a1:  0x00000004  r1/a2:  0x00000349  r2/a3:  0x001184f0
E: r3/a4:  0x000e1a3d r12/ip:  0xa0000000 r14/lr:  0x000e5427
E:  xpsr:  0x4100005e
E: Faulting instruction address (r15/pc): 0x000e783a
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x1184f0 (idle 00)
E: Halting system

To Reproduce
Steps to reproduce the behavior:

  1. west build -b mec15xxevb_assy6853 -p auto
    e.g. west build -b mec15xxevb_assy6853 -p auto tests/drivers/adc/adc_api/
  2. west flash
  3. See error

Expected behavior
Test should pass.

Logs and console output
Log from tests/drivers/adc/adc_api/

*** Booting Zephyr OS build zephyr-v2.5.0-1523-ge1b840c4ab52  ***
Running test suite adc_basic_test
===================================================================
START - test_adc_sample_one_channel
Samples read: 0x0af6 0xffff8000 0xffff8000 0xffff8000 0xffff8000 0xffff8000 
PASS - test_adc_sample_one_channel in 0.7 seconds
===================================================================
START - test_adc_sample_two_channels
Samples read: 0x0af6 0x0af3 0xffff8000 0xffff8000 0xffff8000 0xffff8000 
PASS - test_adc_sample_two_channels in 0.7 seconds
===================================================================
START - test_adc_asynchronous_call
Samples read: 0x0af6 0x0af0 0x0af0 0x0af0 0x0af0 0xffff8000 
PASS - test_adc_asynchronous_call in 0.6 seconds
===================================================================
START - test_adc_sample_with_interval
sample_with_interval_callback: sampling 0
sample_with_interval_callback: sampling 1
sample_with_interval_callback: sampling 2
sample_with_interval_callback: sampling 3
sample_with_interval_callback: sampling 4
Samples read: 0x0af0 0x0af0 0x0af6 0x0aef 0x0aee 0xffff8000 
PASS - test_adc_sample_with_interval in 0.410 seconds
===================================================================
START - test_adc_repeated_samplings
repeated_samplings_callback: done 1
Samples read: 0x0af6 0x0af3 0xffff8000 0xffff8000 0xffff8000 0xffff8000 
repeated_samplings_callback: done 2
Samples read: 0x0af6 0x0af3 0x0af6 0x0af3 0xffff8000 0xffff8000 
repeated_samplings_callback: done 3
Samples read: 0x0af6 0x0af3 0x0af6 0x0af3 0xffff8000 0xffff8000 
repeated_samplings_callback: done 4
Samples read: 0x0af6 0x0af3 0x0af0 0x0af3 0xffff8000 0xffff8000 
repeated_samplings_callback: done 5
Samples read: 0x0af6 0x0af3 0x0af6 0x0af3 0xffff8000 0xffff8000 
repeated_samplings_callback: done 6
Samples read: 0x0af6 0x0af3 0x0af6 0x0af2 0xffff8000 0xffff8000 
repeated_samplings_callback: done 7
Samples read: 0x0af6 0x0af3 0x0aee 0x0af1 0xffff8000 0xffff8000 
repeated_samplings_callback: done 8
Samples read: 0x0af6 0x0af3 0x0aef 0x0af3 0xffff8000 0xffff8000 
ASSERTION FAIL [!arch_is_in_isr()] @ WEST_TOPDIR/zephyr/kernel/sched.c:841
E: r0/a1:  0x00000004  r1/a2:  0x00000349  r2/a3:  0x001184f0
E: r3/a4:  0x000e1a3d r12/ip:  0xa0000000 r14/lr:  0x000e5427
E:  xpsr:  0x4100005e
E: Faulting instruction address (r15/pc): 0x000e783a
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x1184f0 (idle 00)
E: Halting system

Log from tests/drivers/gpio/gpio_api_1pin/

*** Booting Zephyr OS build zephyr-v2.5.0-1523-ge1b840c4ab52  ***
Running test suite gpio_api_1pin_test
===================================================================
START - test_gpio_pin_configure_push_pull
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_pin_configure_push_pull in 0.6 seconds
===================================================================
START - test_gpio_pin_configure_single_ended
Running test on port=GPIO140_176, pin=14
When configured as input test pin value is high
Open Source configuration or Pull Up pin bias is not supported
PASS - test_gpio_pin_configure_single_ended in 0.114 seconds
===================================================================
START - test_gpio_pin_set_get_raw
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_pin_set_get_raw in 0.7 seconds
===================================================================
START - test_gpio_pin_set_get
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_pin_set_get in 0.7 seconds
===================================================================
START - test_gpio_pin_set_get_active_high
Running test on port=GPIO140_176, pin=14
Step 1: Set logical, get logical and physical pin value
Step 2: Set physical, get logical and physical pin value
PASS - test_gpio_pin_set_get_active_high in 0.18 seconds
===================================================================
START - test_gpio_pin_set_get_active_low
Running test on port=GPIO140_176, pin=14
Step 1: Set logical, get logical and physical pin value
Step 2: Set physical, get logical and physical pin value
PASS - test_gpio_pin_set_get_active_low in 0.18 seconds
===================================================================
START - test_gpio_pin_toggle
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_pin_toggle in 0.5 seconds
===================================================================
START - test_gpio_port_set_masked_get_raw
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_port_set_masked_get_raw in 0.7 seconds
===================================================================
START - test_gpio_port_set_masked_get
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_port_set_masked_get in 0.7 seconds
===================================================================
START - test_gpio_port_set_masked_get_active_high
Running test on port=GPIO140_176, pin=14
Step 1: Set logical, get logical and physical port value
Step 2: Set physical, get logical and physical port value
PASS - test_gpio_port_set_masked_get_active_high in 0.20 seconds
===================================================================
START - test_gpio_port_set_masked_get_active_low
Running test on port=GPIO140_176, pin=14
Step 1: Set logical, get logical and physical port value
Step 2: Set physical, get logical and physical port value
PASS - test_gpio_port_set_masked_get_active_low in 0.20 seconds
===================================================================
START - test_gpio_port_set_bits_clear_bits_raw
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_port_set_bits_clear_bits_raw in 0.6 seconds
===================================================================
START - test_gpio_port_set_bits_clear_bits
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_port_set_bits_clear_bits in 0.6 seconds
===================================================================
START - test_gpio_port_set_clr_bits_raw
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_port_set_clr_bits_raw in 0.6 seconds
===================================================================
START - test_gpio_port_set_clr_bits
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_port_set_clr_bits in 0.5 seconds
===================================================================
START - test_gpio_port_toggle
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_port_toggle in 0.5 seconds
===================================================================
START - test_gpio_int_edge_rising
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_int_edge_rising in 0.9 seconds
===================================================================
START - test_gpio_int_edge_falling
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_int_edge_falling in 0.9 seconds
===================================================================
START - test_gpio_int_edge_both
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_int_edge_both in 0.9 seconds
===================================================================
START - test_gpio_int_edge_to_active
Step 1: Configure pin as active high
Running test on port=GPIO140_176, pin=14
Step 2: Configure pin as active low
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_int_edge_to_active in 0.24 seconds
===================================================================
START - test_gpio_int_edge_to_inactive
Step 1: Configure pin as active high
Running test on port=GPIO140_176, pin=14
Step 2: Configure pin as active low
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_int_edge_to_inactive in 0.24 seconds
===================================================================
START - test_gpio_int_level_high
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_int_level_high in 0.9 seconds
===================================================================
START - test_gpio_int_level_low
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_int_level_low in 0.9 seconds
===================================================================
START - test_gpio_int_level_active
Step 1: Configure pin as active high
Running test on port=GPIO140_176, pin=14
Step 2: Configure pin as active low
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_int_level_active in 0.24 seconds
===================================================================
START - test_gpio_int_level_inactive
Step 1: Configure pin as active high
Running test on port=GPIO140_176, pin=14
Step 2: Configure pin as active low
Running test on port=GPIO140_176, pin=14
PASS - test_gpio_int_level_inactive in 0.24 seconds
===================================================================
START - test_gpio_pin_toggle_visual
Running test on port=GPIO140_176, pin=14
LED ON
ASSERTION FAIL [!arch_is_in_isr()] @ WEST_TOPDIR/zephyr/kernel/sched.c:841
E: r0/a1:  0x00000004  r1/a2:  0x00000349  r2/a3:  0x00118638
E: r3/a4:  0x000e3749 r12/ip:  0xa0000000 r14/lr:  0x000e70b3
E:  xpsr:  0x4100007f
E: Faulting instruction address (r15/pc): 0x000e89ec
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x118638 (idle 00)
E: Halting system

Log from tests/kernel/mem_slab/mslab_api/

*** Booting Zephyr OS build zephyr-v2.5.0-1523-ge1b840c4ab52  ***
Running test suite mslab_api
===================================================================
START - test_mslab_kinit
PASS - test_mslab_kinit in 0.1 seconds
===================================================================
START - test_mslab_kdefine
PASS - test_mslab_kdefine in 0.1 seconds
===================================================================
START - test_mslab_kdefine_extern
PASS - test_mslab_kdefine_extern in 0.1 seconds
===================================================================
START - test_mslab_alloc_free_thread
PASS - test_mslab_alloc_free_thread in 0.1 seconds
===================================================================
START - test_mslab_alloc_align
PASS - test_mslab_alloc_align in 0.1 seconds
===================================================================
START - test_mslab_alloc_timeout
ASSERTION FAIL [!arch_is_in_isr()] @ WEST_TOPDIR/zephyr/kernel/sched.c:841
E: r0/a1:  0x00000004  r1/a2:  0x00000349  r2/a3:  0x00118508
E: r3/a4:  0x000e17f9 r12/ip:  0xa0000000 r14/lr:  0x000e536f
E:  xpsr:  0x4100007f
E: Faulting instruction address (r15/pc): 0x000e6c60
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x118508 (idle 00)
E: Halting system

Log from tests/subsys/power/power_mgmt_soc/

*** Booting Zephyr OS build zephyr-v2.5.0-1523-ge1b840c4ab52  ***
Running test suite test_power_mgmt
===================================================================
START - test_pm_dummyinit
I: PM dummy single-thread test started for one cycle
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 1.503 seconds
I: About to enter deep Sleep
PM >
ASSERTION FAIL [!arch_is_in_isr()] @ WEST_TOPDIR/zephyr/kernel/sched.c:841
E: r0/a1:  0x00000004  r1/a2:  0x00000349  r2/a3:  0x001185a0
E: r3/a4:  0x000e1a2d r12/ip:  0xa0000000 r14/lr:  0x000e537f
E:  xpsr:  0x4100007f
E: Faulting instruction address (r15/pc): 0x000e6d48
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x1185a0 (idle 00)
E: Halting system

Environment (please complete the following information):

  • Linux Ubuntu 18.04.4 LTS
  • Toolchain zephyr-sdk-0.12.3
  • zephyr-v2.5.0-1523-ge1b840c4ab52
@s-kelvin s-kelvin added the bug The issue is a bug, or the PR is fixing a bug label Mar 26, 2021
@s-kelvin s-kelvin changed the title mec15xxevb_assy6853: multiple tests failed due to assertion failure at WEST_TOPDIR/zephyr/kernel/sched.c:841 mec15xxevb_assy6853: multiple tests failed due to assertion failure at kernel/sched.c:841 Mar 29, 2021
@galak galak added the priority: low Low impact/importance bug label Mar 30, 2021
@scottwcpg
Copy link
Collaborator

Reproduced on EVB. Issue related to power management. Disable PM by CONFIG_SOC_POWER_MANAGEMENT=n in the board config and the test passes. Any power management changes recently?

@albertofloyd
Copy link
Collaborator

@nashif @ceolin does SoC module need to be adjusted after recent changes into PM subsystem?

@ceolin
Copy link
Member

ceolin commented Mar 30, 2021

@nashif @ceolin does SoC module need to be adjusted after recent changes into PM subsystem?

Can you test again with upstream code ? This issue seems to be fixed in 58a0ba6

@scottwcpg
Copy link
Collaborator

That fixed it! Test runs to completion with all PASS.

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 priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants