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

semaphore and condvar_api tests fails after ARM64 FPU context switch commit on qemu_cortex_a53_smp #34777

Closed
dcpleung opened this issue May 3, 2021 · 0 comments · Fixed by #34778
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@dcpleung
Copy link
Member

dcpleung commented May 3, 2021

After commit f1f63dd (arm64: FPU context switch support), I am getting timeout in twister for tests/kernel/semaphore/semaphore/kernel.semaphore and tests/kernel/condvar/condvar_api/kernel.condvar.

The error from semaphore test:

START - test_sem_take_multiple
E: 0x40031180 k_thread in use
E: syscall z_vrfy_k_thread_create failed check: access denied
E: ELR_ELn: 0x0000000040006ce8
E: ESR_ELn: 0x000000001fe00000
E:   EC:  0x7 (Trapped access to SVE, Advanced SIMD, or floating-point functionality)
E:   IL:  0x1
E:   ISS: 0x1e00000
E: TPIDRRO: 0x0100000040033590
E: x0:  0x0000000040031180  x1:  0x0000000040093000
E: x2:  0x0000000000000a00  x3:  0x0000000040002150
E: x4:  0x0000000000000000  x5:  0x0000000040096f28
E: x6:  0x000000000000000c  x7:  0x0000000000000000
E: x8:  0x00000000000000ad  x9:  0x0000000000000000
E: x10: 0x0000000000000000  x11: 0x0000000000000000
E: x12: 0x0000000000000000  x13: 0x0000000000000000
E: x14: 0x0000000000000000  x15: 0x0000000000000000
E: x16: 0x0000000000000000  x17: 0x0000000000000000
E: x18: 0x0000000000000000  x30: 0x000000004000300c
E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 1
E: Current thread: 0x40032680 (ztest_thread)
Caught system error -- reason 3 0
Fatal error was unexpected, aborting...

The error from the condvar_api test:

START - test_multiple_condvar_wait_wake
E: thread 0x40030880 (7) does not have permission on k_condvar 0x40031da0
E: permission bitmap
E: 00 00                   |..      
E: syscall z_vrfy_k_condvar_broadcast failed check: access denied
E: ELR_ELn: 0x0000000040005038
E: ESR_ELn: 0x000000001fe00000
E:   EC:  0x7 (Trapped access to SVE, Advanced SIMD, or floating-point functionality)
E:   IL:  0x1
E:   ISS: 0x1e00000
E: TPIDRRO: 0x0100000040031ea0
E: x0:  0x0000000040031da0  x1:  0x0000000000000073
E: x2:  0x0000000040019d1e  x3:  0x0000000000000159
E: x4:  0x000000004001a1d0  x5:  0x0000000040019d85
E: x6:  0x0000000000000000  x7:  0x0000000000000000
E: x8:  0x0000000000000073  x9:  0x0000000000000000
E: x10: 0x0000000000000000  x11: 0x0000000000000000
E: x12: 0x0000000000000000  x13: 0x0000000000000000
E: x14: 0x0000000000000000  x15: 0x0000000000000000
E: x16: 0x0000000000000000  x17: 0x0000000000000000
E: x18: 0x0000000000000000  x30: 0x00000000400012c0
E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 1
E: Current thread: 0x40030880 (unknown)
Caught system error -- reason 3 0
Fatal error was unexpected, aborting...

These faults were not there on the commit just before f1f63dd.

@dcpleung dcpleung added the bug The issue is a bug, or the PR is fixing a bug label May 3, 2021
dcpleung added a commit to dcpleung/zephyr that referenced this issue May 3, 2021
The permission to use multiple_condvar is not granted to test
test_condvar_multiple_threads_wait_wake, which results in
bunch or permission error messages, and actually not testing
the conditional variables. This grants the permission to
the those conditional variables to the test threads. Also,
replace the k_yield() with k_msleep() to allow all created
threads time to run. A simply k_yield() might let a few to
run before the next batch of "waking" threads start to run,
resulting in some conditional variables not being initialized
but trying to wake.

Fixes zephyrproject-rtos#34777

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
@dcpleung dcpleung self-assigned this May 3, 2021
nashif pushed a commit that referenced this issue May 3, 2021
The permission to use multiple_condvar is not granted to test
test_condvar_multiple_threads_wait_wake, which results in
bunch or permission error messages, and actually not testing
the conditional variables. This grants the permission to
the those conditional variables to the test threads. Also,
replace the k_yield() with k_msleep() to allow all created
threads time to run. A simply k_yield() might let a few to
run before the next batch of "waking" threads start to run,
resulting in some conditional variables not being initialized
but trying to wake.

Fixes #34777

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant