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/lib/ringbuffer failed on ARC boards #37861

Closed
IRISZZW opened this issue Aug 23, 2021 · 5 comments
Closed

tests/lib/ringbuffer failed on ARC boards #37861

IRISZZW opened this issue Aug 23, 2021 · 5 comments
Assignees
Labels
area: ARC ARC Architecture bug The issue is a bug, or the PR is fixing a bug platform: X86 x86 and x86-64 priority: medium Medium impact/importance bug
Milestone

Comments

@IRISZZW
Copy link
Contributor

IRISZZW commented Aug 23, 2021

Describe the bug
tests/lib/ringbuffer failed on ARC boards: hsdk, qemu_arc_hs, nsim_hs_smp

To Reproduce
Steps to reproduce the behavior:

  1. west build -b hsdk -d build tests/lib/ringbuffer
  2. west -v flash -r mdb-hw --cores=4
  3. See error

Logs and console output

*** Booting Zephyr OS build zephyr-v2.6.0-2360-gc94e53c9f5b6  ***
Running test suite test_ringbuffer_api
===================================================================
START - test_ringbuffer_init
 PASS - test_ringbuffer_init in 0.1 seconds
===================================================================
START - test_ringbuffer_declare_pow2
 PASS - test_ringbuffer_declare_pow2 in 0.1 seconds
===================================================================
START - test_ringbuffer_declare_size
 PASS - test_ringbuffer_declare_size in 0.1 seconds
===================================================================
START - test_ringbuffer_put_get_thread
 PASS - test_ringbuffer_put_get_thread in 0.4 seconds
===================================================================
START - test_ringbuffer_put_get_isr
 PASS - test_ringbuffer_put_get_isr in 0.1 seconds
===================================================================
START - test_ringbuffer_put_get_thread_isr
 PASS - test_ringbuffer_put_get_thread_isr in 0.1 seconds
===================================================================
START - test_ringbuffer_put_get_discard
 PASS - test_ringbuffer_put_get_discard in 0.1 seconds
===================================================================
START - test_ringbuffer_pow2_put_get_thread_isr
 PASS - test_ringbuffer_pow2_put_get_thread_isr in 0.1 seconds
===================================================================
START - test_ringbuffer_size_put_get_thread_isr
 PASS - test_ringbuffer_size_put_get_thread_isr in 0.1 seconds
===================================================================
START - test_ringbuffer_array_perf
 PASS - test_ringbuffer_array_perf in 0.1 seconds
===================================================================
START - test_ringbuffer_partial_putting
 PASS - test_ringbuffer_partial_putting in 0.1 seconds
===================================================================
START - test_ringbuffer_partial_getting
 PASS - test_ringbuffer_partial_getting in 0.1 seconds
===================================================================
START - test_ring_buffer_main
 PASS - test_ring_buffer_main in 0.1 seconds
===================================================================
START - test_ringbuffer_raw
 PASS - test_ringbuffer_raw in 0.1 seconds
===================================================================
START - test_ringbuffer_alloc_put
 PASS - test_ringbuffer_alloc_put in 0.1 seconds
===================================================================
START - test_byte_put_free
 PASS - test_byte_put_free in 0.1 seconds
===================================================================
START - test_ringbuffer_equal_bufs
 PASS - test_ringbuffer_equal_bufs in 0.1 seconds
===================================================================
START - test_capacity
 PASS - test_capacity in 0.1 seconds
===================================================================
START - test_size
 PASS - test_size in 0.1 seconds
===================================================================
START - test_peek
 PASS - test_peek in 0.1 seconds
===================================================================
START - test_reset
 PASS - test_reset in 0.1 seconds
===================================================================
START - test_ringbuffer_performance
1 byte put-get, avg cycles: 264
4 byte put-get, avg cycles: 310
1 byte put claim-finish, avg cycles: 217
5 byte put claim-finish, avg cycles: 261
5 byte get claim-finish, avg cycles: 258
 PASS - test_ringbuffer_performance in 0.19 seconds
===================================================================
START - test_ringbuffer_concurrent

    Assertion failed at WEST_TOPDIR/zephyr/tests/lib/ringbuffer/src/concurrent.c:72: data_read: memcmp(outpu0

 FAIL - test_ringbuffer_concurrent in 0.14 seconds
===================================================================
START - test_ringbuffer_shpsc
preempted: 1152

    Assertion failed at WEST_TOPDIR/zephyr/tests/lib/ringbuffer/src/concurrent.c:373: thread_entry_spsc: (pr)
If thread operation was not preempted multiple times then we cannot have confidance that it validated the moe
 FAIL - test_ringbuffer_shpsc in 5.27 seconds
===================================================================
START - test_ringbuffer_spshc
preempted: 1734
 PASS - test_ringbuffer_spshc in 5.2 seconds
===================================================================
START - test_ringbuffer_cpy_shpsc
preempted: 2552
 PASS - test_ringbuffer_cpy_shpsc in 5.2 seconds
===================================================================
START - test_ringbuffer_cpy_spshc
preempted: 3076
 PASS - test_ringbuffer_cpy_spshc in 5.1 seconds
===================================================================
START - test_ringbuffer_item_shpsc
preempted: 3595
 PASS - test_ringbuffer_item_shpsc in 5.1 seconds
===================================================================
START - test_ringbuffer_item_spshc
preempted: 3948
 PASS - test_ringbuffer_item_spshc in 5.1 seconds
===================================================================
Test suite test_ringbuffer_api failed.
===================================================================
PROJECT EXECUTION FAILED

Environment (please complete the following information):

  • OS: (Linux)
  • Toolchain (Zephyr SDK)
  • Commit SHA (c94e53c)
@IRISZZW IRISZZW added bug The issue is a bug, or the PR is fixing a bug area: ARC ARC Architecture labels Aug 23, 2021
@IRISZZW IRISZZW added this to the v2.7.0 milestone Aug 23, 2021
@IRISZZW IRISZZW changed the title tests/lib/ringbuffer failed on ARC hsdk board tests/lib/ringbuffer failed on ARC boards Aug 23, 2021
@nashif nashif added the priority: medium Medium impact/importance bug label Aug 24, 2021
@yerabolu
Copy link
Contributor

fails on up_square, EHL_CRB and Microchip as well.

@yerabolu yerabolu added the platform: X86 x86 and x86-64 label Aug 24, 2021
@enjiamai
Copy link
Collaborator

fails on ACRN ehl_crb as well.

@evgeniy-paltsev
Copy link
Collaborator

As I can see from verification it fails (sporadically) on qemu_x86 as well:

tests/lib/ringbuffer/libraries.data_structures     FAILED Timeout (qemu)

@IRISZZW
Copy link
Contributor Author

IRISZZW commented Aug 30, 2021

relative issues #38093 #37768

tejlmand added a commit to tejlmand/zephyr that referenced this issue Sep 24, 2021
Fixes: zephyrproject-rtos#38591, zephyrproject-rtos#38207, zephyrproject-rtos#37861

The commit 65a2de8 aligned the data
linker symbol for sections and regions.

The data region symbol start has been placed outside the sections thus
being defined as the address of the region before alignment of the first
section in the data region, usually the `datas` section.

The symbol defining the start address of the data section is after
section alignment.
In most cases the address of the data region start and datas section
start will be identical, but not always.
The data region symbol is a new linker symbol and existing code has
been depending on the old data section start symbol.
Thus, the update to the use of the data region start symbol instead of
data ram start symbol thus results in a different address when the
section is aligned to a different address.

To ensure the original behavior in all cases, the data region start
address is now moved inside the data section.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
cfriedt pushed a commit that referenced this issue Sep 24, 2021
Fixes: #38591, #38207, #37861

The commit 65a2de8 aligned the data
linker symbol for sections and regions.

The data region symbol start has been placed outside the sections thus
being defined as the address of the region before alignment of the first
section in the data region, usually the `datas` section.

The symbol defining the start address of the data section is after
section alignment.
In most cases the address of the data region start and datas section
start will be identical, but not always.
The data region symbol is a new linker symbol and existing code has
been depending on the old data section start symbol.
Thus, the update to the use of the data region start symbol instead of
data ram start symbol thus results in a different address when the
section is aligned to a different address.

To ensure the original behavior in all cases, the data region start
address is now moved inside the data section.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
@evgeniy-paltsev
Copy link
Collaborator

Fixed by #38817

Rushybrook pushed a commit to Rushybrook/zephyr that referenced this issue Oct 21, 2021
Fixes: zephyrproject-rtos#38591, zephyrproject-rtos#38207, zephyrproject-rtos#37861

The commit 65a2de8 aligned the data
linker symbol for sections and regions.

The data region symbol start has been placed outside the sections thus
being defined as the address of the region before alignment of the first
section in the data region, usually the `datas` section.

The symbol defining the start address of the data section is after
section alignment.
In most cases the address of the data region start and datas section
start will be identical, but not always.
The data region symbol is a new linker symbol and existing code has
been depending on the old data section start symbol.
Thus, the update to the use of the data region start symbol instead of
data ram start symbol thus results in a different address when the
section is aligned to a different address.

To ensure the original behavior in all cases, the data region start
address is now moved inside the data section.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARC ARC Architecture bug The issue is a bug, or the PR is fixing a bug platform: X86 x86 and x86-64 priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants