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

up_squared:tests/portability/cmsis_rtos_v2 failed. #25507

Closed
chen-png opened this issue May 21, 2020 · 6 comments · Fixed by #28490 or #30621
Closed

up_squared:tests/portability/cmsis_rtos_v2 failed. #25507

chen-png opened this issue May 21, 2020 · 6 comments · Fixed by #28490 or #30621
Assignees
Labels
area: Tests Issues related to a particular existing or missing test area: X86 x86 Architecture (32-bit) bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@chen-png
Copy link
Collaborator

To Reproduce
Steps to reproduce the behavior:

  1. west build -b up_squared -p auto tests/portability/cmsis_rtos_v2
  2. west flash ~/up_squared.sh
  3. See error

Screenshots or console output

*** Booting Zephyr OS build v2.3.0-rc1-210-gac898bc49ea8 ***
Running test suite test_cmsis_v2_apis

starting test - test_kernel_apis
PASS - test_kernel_apis

starting test - test_delay
PASS - test_delay

starting test - test_thread_apis
PASS - test_thread_apis
...
starting test - test_mempool_dynamic
PASS - test_mempool_dynamic

starting test - test_messageq
E: Page fault at address 0xd25ff8 (error code 0x3)
E: Access violation: supervisor thread not allowed to write

E: PML4E: 0x0000000000d15827 Writable, User, Execute Enabled
E: PDPTE: 0x0000000000d14827 Writable, User, Execute Enabled
E: PDE: 0x0000000000d0d023 Writable, Supervisor, Execute Enabled
E: PTE: 0x8000000000d25001 Read-only, Supervisor, Execute Disable
E: RAX: 0x00000000001a4c04 RBX: 0x0000000000d1cd60 RCX: 0x000000000000000c RDX: 0x0000000000d26020
E: RSI: 0x0000000000d1cd60 RDI: 0x0000000000d1dbc8 RBP: 0x0000000000d26090 RSP: 0x0000000000d26000
E: R8: 0x0000000000d26020 R9: 0x0000000000d4d280 R10: 0x0000000000000000 R11: 0x0000000000000000
E: R12: 0x0000000000d26020 R13: 0x0000000000d1dbc8 R14: 0x0000000000d1dbc8 R15: 0x0000000000000000
E: RSP: 0x0000000000d26000 RFLAGS: 0x0000000000010003 CS: 0x0018 CR3: 0x0000000000115000
E: RIP: 0x0000000000103f87
E: >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
E: Current thread: 0x0000000000d18f90 (send_thread)

E: Halting system

Environment (please complete the following information):

  • OS: Fedora28
  • Toolchain: Zephyr-sdk-0.11.2
  • Commit ID: ac898bc
@chen-png chen-png added bug The issue is a bug, or the PR is fixing a bug area: Tests Issues related to a particular existing or missing test labels May 21, 2020
@carlescufi carlescufi added the area: X86 x86 Architecture (32-bit) label May 21, 2020
@chen-png chen-png added the priority: low Low impact/importance bug label May 25, 2020
@github-actions
Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Jul 25, 2020
@nashif nashif removed the Stale label Jul 25, 2020
@nashif nashif assigned nashif and unassigned andrewboie Jul 25, 2020
@Zhaoningx Zhaoningx changed the title tests/portability/cmsis_rtos_v2 failed on up_squared. up_squared:tests/portability/cmsis_rtos_v2 failed. Aug 19, 2020
@nashif nashif assigned aasthagr and unassigned nashif Sep 9, 2020
@nashif
Copy link
Member

nashif commented Sep 16, 2020

get around the stack overflow with

diff --git a/tests/portability/cmsis_rtos_v2/prj.conf b/tests/portability/cmsis_rtos_v2/prj.conf
index ccdf0628a9..bebe7530e0 100644
--- a/tests/portability/cmsis_rtos_v2/prj.conf
+++ b/tests/portability/cmsis_rtos_v2/prj.conf
@@ -14,3 +14,5 @@ CONFIG_CMSIS_V2_MEM_SLAB_MAX_DYNAMIC_SIZE=128
 CONFIG_CMSIS_V2_THREAD_MAX_COUNT=23
 CONFIG_CMSIS_V2_THREAD_DYNAMIC_MAX_COUNT=10
 CONFIG_TIMEOUT_64BIT=n
+CONFIG_CMSIS_V2_THREAD_MAX_STACK_SIZE=1024
+CONFIG_CMSIS_V2_THREAD_DYNAMIC_STACK_SIZE=1024

But then there is a test assert..

@nashif
Copy link
Member

nashif commented Sep 16, 2020

START - test_thread_join
 - Creating thread B...
 - Creating thread A...
 * Thread B started.
 - Waiting for thread B to join...
 + Thread A started.
 * Thread B joining...
 - Thread B joined.
 + Thread A joining...
 - Waiting for thread A to join...

    Assertion failed at WEST_TOPDIR/zephyr/tests/portability/cmsis_rtos_v2/src/thread_apis.c:305: test_thread_join: (status not equal to osOK)
osThreadJoin thread A failed!
 FAIL - test_thread_join

@aasthagr
Copy link
Collaborator

aasthagr commented Oct 14, 2020

This bug is only partially resolved by the fix tests: cmsis_rtos_v2: Fix race condition #28490. There are still assertion errors to this testcase.

@aasthagr aasthagr reopened this Oct 14, 2020
@dcpleung dcpleung assigned dcpleung and unassigned aasthagr Dec 10, 2020
@jenmwms
Copy link
Collaborator

jenmwms commented Dec 10, 2020

Can you please help me understand why we are reporting this issue? I see that up_squared is excluded for this test case, so are we trying to resolve something in order to include it in testing? https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/portability/cmsis_rtos_v2/testcase.yaml

@nashif
Copy link
Member

nashif commented Dec 10, 2020

Can you please help me understand why we are reporting this issue?

the issue was reported before testcase.yaml was changed :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Tests Issues related to a particular existing or missing test area: X86 x86 Architecture (32-bit) bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
8 participants