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

tests: benchmarks: sched: qemu_riscv assertion fail #81050

Open
ycsin opened this issue Nov 7, 2024 · 0 comments
Open

tests: benchmarks: sched: qemu_riscv assertion fail #81050

ycsin opened this issue Nov 7, 2024 · 0 comments
Assignees
Labels
area: Benchmarks area: Kernel area: RISCV RISCV Architecture (32-bit & 64-bit) bug The issue is a bug, or the PR is fixing a bug

Comments

@ycsin
Copy link
Member

ycsin commented Nov 7, 2024

Describe the bug
qemu_riscv hits assertion when running the tests/benchmarks/sched. The benchmark works if #80027 is reverted.

To Reproduce
Steps to reproduce the behavior:

  1. Check out current main
  2. west build -b qemu_riscv64 -p auto -t run zephyr/tests/benchmarks/sched
  3. See error

Expected behavior
The benchmark should run without asserting

Impact
Can't run the sched benchmark

Logs and console output

*** Booting Zephyr OS build v4.0.0-rc2-115-gc3466b14d09b ***
Running 0x8000c0a8
ASSERTION FAIL [arch_irq_unlocked(key) || _kernel.cpus[0].current->base.thread_state & (((1UL << (0))) | ((1UL << (3))))] @ WEST_TOPDIR/zephyr/kernel/include/kswap.h:99
        Context switching while holding lock!
E: 
E:  mcause: 11, Environment call from M-mode
E:   mtval: 0
E:      a0: 0000000000000004    t0: 0000000000000000
E:      a1: 0000000000000063    t1: 000000000000004c
E:      a2: 000000008000f628    t2: 0000000000000044
E:      a3: 000000008000c3b0    t3: 000000000000002a
E:      a4: 0000000000000000    t4: 000000000000002e
E:      a5: 000000008000c528    t5: 000000000000007f
E:      a6: 0000000000000009    t6: 0000000000000010
E:      a7: 0000000000000009
E:      sp: 000000008000f660
E:      ra: 0000000080002966
E:    mepc: 0000000080000926
E: mstatus: 0000000a00021800
E: 
E:      s0: 000000008000c048    s6: 000000008000a488
E:      s1: 000000008000c528    s7: 000000008000c098
E:      s2: 0000000000000000    s8: 000000000000000a
E:      s3: 000000008000c3b0    s9: 0000000000000000
E:      s4: 000000008000c0a8   s10: 0000000a00020088
E:      s5: 00000000000003f2   s11: 0000000000000000
E: 
E: call trace:
E:       0: sp: 000000008000f660 ra: 0000000080000926 [assert_post_action+0x8]
E:       1: sp: 000000008000f690 ra: 00000000800005d4 [main+0x14e]
E:       2: sp: 000000008000f6e0 ra: 0000000080003264 [z_thread_timeout+0x0]
E:       3: sp: 000000008000f700 ra: 0000000080002250 [bg_thread_main+0x124]
E:       4: sp: 000000008000f718 ra: 000000008000212c [bg_thread_main+0x0]
E:       5: sp: 000000008000f730 ra: 000000008000212c [bg_thread_main+0x0]
E:       6: sp: 000000008000f740 ra: 0000000080000916 [z_thread_entry+0x22]
E: 
E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Current thread: 0x8000c3b0 (main)
E: Halting system

Environment (please complete the following information):

  • OS: MacOS
  • Toolchain (e.g Zephyr SDK, ...): 0.16.8
  • Commit SHA or Version used: v4.0.0-rc2-115-gc3466b14d09b
@ycsin ycsin added bug The issue is a bug, or the PR is fixing a bug area: Kernel area: RISCV RISCV Architecture (32-bit & 64-bit) area: Benchmarks labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Benchmarks area: Kernel area: RISCV RISCV Architecture (32-bit & 64-bit) bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

2 participants