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/kernel/obj_tracing failed on mec15xxevb_assy6853 board. #21756

Closed
chen-png opened this issue Jan 8, 2020 · 5 comments · Fixed by #22921
Closed

tests/kernel/obj_tracing failed on mec15xxevb_assy6853 board. #21756

chen-png opened this issue Jan 8, 2020 · 5 comments · Fixed by #22921
Assignees
Labels
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

chen-png commented Jan 8, 2020

To Reproduce
Steps to reproduce the behavior:

  1. programming the tests/kernel/obj_tracing to mec15xxevb_assy6853 board, according to
    https://docs.zephyrproject.org/latest/boards/arm/mec1501modular_assy6885/doc/index.html to set up.
  2. See error

Screenshots or console output
*** Booting Zephyr OS build zephyr-v2.1.0-744-g7ee5cf6a0bd1 ***

Running test suite obj_tracing
starting test - test_philosophers_tracing
SEMAPHORE REF: 0x00118628
SEMAPHORE REF: 0x00118610
SEMAPHORE REF: 0x001185f8
SEMAPHORE REF: 0x001185e0
SEMAPHORE REF: 0x001185c8
SEMAPHORE REF: 0x00118ba4
SEMAPHORE REF: 0x00118104
SEMAPHORE REF: 0x00118cc0
SEMAPHORE REF: 0x00118cdc
SEMAPHORE REF: 0x0011cd74
SEMAPHORE REF: 0x0011cd5c
SEMAPHORE QUANTITY: 5
COOP: 0x00118640 OPTIONS: 0x00, STATE: 0x40
COOP: 0x0011893c OPTIONS: 0x00, STATE: 0x02
COOP: 0x001188a4 OPTIONS: 0x00, STATE: 0x02
COOP: 0x0011880c OPTIONS: 0x00, STATE: 0x40
COOP: 0x00118774 OPTIONS: 0x00, STATE: 0x02
COOP: 0x001186dc OPTIONS: 0x00, STATE: 0x40
PREMPT: 0x00118eac OPTIONS: 0x00, STATE: 0x02
COOP: 0x00118124 OPTIONS: 0x00, STATE: 0x02
COOP: 0x00118cf4 OPTIONS: 0x01, STATE: 0x00
COOP: 0x00118d8c OPTIONS: 0x01, STATE: 0x40
THREAD QUANTITY: 10

Assertion failed at ZEPHYR_BASE/tests/kernel/obj_tracing/src/main.c:120: object_monitor: (((thread_counter == TOTAL_THREADS) && (obj_counter == TOTAL_OBJECTS)) is false)
test failed

FAIL - test_philosophers_tracing
starting test - test_obj_tracing

PASS - test_obj_tracing
Test suite obj_tracing failed.
PROJECT EXECUTION FAILED

Environment (please complete the following information):

  • OS: fedora28
  • Toolchain: zephyr-sdk-0.10.3
  • Commit ID: g7ee5cf6a0b
@chen-png chen-png added the bug The issue is a bug, or the PR is fixing a bug label Jan 8, 2020
@nashif nashif added the priority: low Low impact/importance bug label Jan 8, 2020
@nashif
Copy link
Member

nashif commented Jan 8, 2020

I am sure this is not a bug, looks like the board is enabling all kind of options that most likely have some kernel objects, so the counting does not match.

@nashif
Copy link
Member

nashif commented Jan 20, 2020

this is not a bug, the PS2 and other IPs being enabled by default add objects and the count does not match anymore, so the test fails. Boards should by default only enable the bare minimum, all optional features should only be enabled by the application using them, and not by default for every configuration

cc @albertofloyd @franciscomunoz

@albertofloyd albertofloyd removed their assignment Jan 21, 2020
@franciscomunoz
Copy link
Contributor

franciscomunoz commented Feb 14, 2020

The current number of threads "10" did not matched the expected "9". The kscan driver has a thread which is messing with the expected count. The test passes after disabling it ... I'm going to create a PR for disabling the KSCAN in the board.

starting test - test_philosophers_tracing
SEMAPHORE REF: 0x00118088
SEMAPHORE REF: 0x00118070
SEMAPHORE REF: 0x00118058
SEMAPHORE REF: 0x00118040
SEMAPHORE REF: 0x00118028
SEMAPHORE REF: 0x00118604
SEMAPHORE REF: 0x00118b50
SEMAPHORE REF: 0x00118b6c
SEMAPHORE REF: 0x00118730
SEMAPHORE REF: 0x00118718
SEMAPHORE REF: 0x0011cbf8
SEMAPHORE REF: 0x0011cbe0
SEMAPHORE QUANTITY: 5
COOP: 0x001180a0 OPTIONS: 0x00, STATE: 0x80
COOP: 0x0011839c OPTIONS: 0x00, STATE: 0x02
COOP: 0x00118304 OPTIONS: 0x00, STATE: 0x02
COOP: 0x0011826c OPTIONS: 0x00, STATE: 0x80
COOP: 0x001181d4 OPTIONS: 0x00, STATE: 0x02
COOP: 0x0011813c OPTIONS: 0x00, STATE: 0x80
PREMPT: 0x00118d3c OPTIONS: 0x00, STATE: 0x02
COOP: 0x00118b84 OPTIONS: 0x01, STATE: 0x00
COOP: 0x00118c1c OPTIONS: 0x01, STATE: 0x80
THREAD QUANTITY: 9
PASS - test_philosophers_tracing
===================================================================
starting test - test_obj_tracing
PASS - test_obj_tracing
===================================================================
Test suite obj_tracing succeeded
===================================================================
PROJECT EXECUTION SUCCESSFUL

#22816

@ashaannajoy
Copy link

This test passes by disabling KSCAN in zephyr/boards/arm/mec15xxevb_assy6853/mec15xxevb_assy6853_defconfig

@nashif
Copy link
Member

nashif commented Feb 19, 2020

#22921 has a more generic fix that should work with pre-existing conditions. Please verify.

nashif added a commit to nashif/zephyr that referenced this issue Feb 19, 2020
Count existing threads before the test has started to deal with
platforms that have some existing services.

Remove hard-coded accounting for IPM, this is now counted before the
test starts.

Fixes zephyrproject-rtos#21756

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
nashif added a commit that referenced this issue Feb 19, 2020
Count existing threads before the test has started to deal with
platforms that have some existing services.

Remove hard-coded accounting for IPM, this is now counted before the
test starts.

Fixes #21756

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
chen-png pushed a commit to chen-png/zephyr that referenced this issue Aug 28, 2020
Count existing threads before the test has started to deal with
platforms that have some existing services.

Remove hard-coded accounting for IPM, this is now counted before the
test starts.

Fixes zephyrproject-rtos#21756

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
nashif added a commit that referenced this issue Sep 4, 2020
Count existing threads before the test has started to deal with
platforms that have some existing services.

Remove hard-coded accounting for IPM, this is now counted before the
test starts.

Fixes #21756

Signed-off-by: Anas Nashif <anas.nashif@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 priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants