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

intel_adsp_cavs15: run tests/kernel/smp/ failed on ADSP #34152

Closed
KangJianX opened this issue Apr 9, 2021 · 3 comments · Fixed by #35239
Closed

intel_adsp_cavs15: run tests/kernel/smp/ failed on ADSP #34152

KangJianX opened this issue Apr 9, 2021 · 3 comments · Fixed by #35239
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: Intel ADSP Intel Audio platforms priority: low Low impact/importance bug
Milestone

Comments

@KangJianX
Copy link
Collaborator

Describe the bug
run this testcase failed on ADSP

To Reproduce
Steps to reproduce the behavior:

  1. twister -p intel_adsp_cavs15 --device-testing -T tests/kernel/smp/ --west-flash="/home/ztest/work/zephyrproject/zephyr/boards/xtensa/intel_adsp_cavs15/tools/flash.sh,/home/ztest/work/zephyrproject/modules/audio/sof/keys/otc_private_key.pem,/home/ztest/work/zephyrproject/modules/audio/sof/zephyr/ext/rimage/config,/home/ztest/work/zephyrproject/modules/audio/sof/zephyr/ext/rimage/build/rimage" --device-serial-pty="/home/ztest/work/zephyrproject/zephyr/boards/xtensa/intel_adsp_cavs15/tools/adsplog.py,--no-history"

Logs and console output

Running test suite smp
===================================================================
START - test_smp_coop_threads
PASS - test_smp_coop_threads in 0.563 seconds
===================================================================
START - test_cpu_id_threads
PASS - test_cpu_id_threads in 1.1 seconds
===================================================================
START - test_coop_resched_threads
PASS - test_coop_resched_threads in 0.301 seconds
===================================================================
START - test_preempt_resched_threads
PASS - test_preempt_resched_threads in 0.512 seconds
===================================================================
START - test_yield_threads
PASS - test_yield_threads in 0.301 seconds
===================================================================
START - test_sleep_threads
PASS - test_sleep_threads in 1.1 seconds
===================================================================
START - test_wakeup_threads
PASS - test_wakeup_threads in 0.201 seconds
===================================================================
START - test_smp_ipi
cpu num=2 PASS - test_smp_ipi in 0.301 seconds
===================================================================
START - test_get_cpu
PASS - test_get_cpu in 0.51 seconds
===================================================================
START - test_fatal_on_smp
@ WEST_TOPDIR/zephyr/tests/kernel/smp/src/main.c:654
PASS - test_fatal_on_smp in 0.1 seconds
===================================================================
START - test_workq_on_smp
wrong error reason
Assertion failed at WEST_TOPDIR/zephyr/tests/kernel/smp/src/main.c:711: test_workq_on_smp: k_work_busy_get(&work) not equal to 0
FAIL - test_workq_on_smp in 0.51 seconds
===================================================================
Test suite smp failed.
===================================================================
PROJECT EXECUTION FAILED

Environment (please complete the following information):
OS: Fedora28
Toolchain: Zephyr-sdk-0.12.3
Commit id: 5f42a3d

@KangJianX KangJianX added the bug The issue is a bug, or the PR is fixing a bug label Apr 9, 2021
@yingmingx
Copy link
Collaborator

It seems that the testcase is OK, in passed on up_squared platform. It is very likely that there is a problem with the ADSP platform. We need an expert in this field to have a look.

@yingmingx yingmingx removed their assignment Apr 12, 2021
@galak galak added the priority: low Low impact/importance bug label Apr 13, 2021
@nashif
Copy link
Member

nashif commented May 11, 2021

failure confirmed

@KangJianX
Copy link
Collaborator Author

KangJianX commented May 12, 2021

@andyross @nashif
This issue still can be reproduced on latest commit 8e69daf.
DEBUG - DEVICE: START - test_workq_on_smp
DEBUG - DEVICE: Caught system error -- reason 0 0
DEBUG - DEVICE: Fatal error was unexpected, aborting...
DEBUG - DEVICE:
DEBUG - DEVICE: Assertion failed at WEST_TOPDIR/zephyr/tests/kernel/smp/src/main.c:716: test_workq_on_smp: k_work_busy_get(&work) not equal to 0
DEBUG - DEVICE:
DEBUG - DEVICE: FAIL - test_workq_on_smp in 0.51 seconds

Then twister will timeout.

@nashif nashif added this to the v2.6.0 milestone May 12, 2021
@LeiW000 LeiW000 added the platform: Intel ADSP Intel Audio platforms label May 13, 2021
andyross pushed a commit to andyross/zephyr that referenced this issue May 13, 2021
A few mistakes in recent changes to this test:

There was a "LOCK_NO" (i.e. no locking!) case being exercised in
test_inc_concurrency, where three threads would race against each
other incrementing and decrementing a single count without
synchronization.  And... it failed on cAVS.  Because there was no
synchronization.  Just remove.

The LOCK_IRQ (irq_un/lock()) case of the same test was was casting
taking a pointer to an integer (that stored the irq_lock() result) and
casting the pointer value to an integer instead of dereferencing it.

Also the workq test had a work item on the stack, which is forbidden
when KERNEL_COHERENCE=y

Fixes zephyrproject-rtos#34152

Signed-off-by: Andy Ross <[email protected]>
nashif pushed a commit that referenced this issue May 14, 2021
A few mistakes in recent changes to this test:

There was a "LOCK_NO" (i.e. no locking!) case being exercised in
test_inc_concurrency, where three threads would race against each
other incrementing and decrementing a single count without
synchronization.  And... it failed on cAVS.  Because there was no
synchronization.  Just remove.

The LOCK_IRQ (irq_un/lock()) case of the same test was was casting
taking a pointer to an integer (that stored the irq_lock() result) and
casting the pointer value to an integer instead of dereferencing it.

Also the workq test had a work item on the stack, which is forbidden
when KERNEL_COHERENCE=y

Fixes #34152

Signed-off-by: Andy Ross <[email protected]>
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 platform: Intel ADSP Intel Audio platforms priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants