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

samples/scheduler/metairq_dispatch: Regression after 30916 (sched: timeout: Do not miss slice timeouts) #31789

Closed
erwango opened this issue Jan 29, 2021 · 4 comments · Fixed by #31891
Assignees
Labels
area: ARC ARC Architecture bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@erwango
Copy link
Member

erwango commented Jan 29, 2021

Describe the bug
Following merge of 6b17f2f, sample samples/scheduler/metairq_dispatch is now failed on 2 platforms: nucleo_wb55rg and nucleo_f091rc.
Sample works correctly on other boards. Likely the common characteristic is they are the slowest in our bench.

To Reproduce
twister

Expected behavior
Sample should run w/o error

Logs and console output

*** Booting Zephyr OS build v2.5.0-rc1-106-g2712d74cdcbf  ***
I: Starting Thread0 at priority -2
I: Starting Thread1 at priority -1
I: Starting Thread2 at priority 0
I: Starting Thread3 at priority 1
ERROR: Queue full, event dropped!
ERROR: Queue full, event dropped!
ERROR: Queue full, event dropped!
ERROR: Queue full, event dropped!

Environment (please complete the following information):

  • OS: Linux
  • Toolchain Zephyr SDK
  • Commit SHA or Version used: From 6b17f2f
@erwango erwango added the bug The issue is a bug, or the PR is fixing a bug label Jan 29, 2021
@erwango erwango added the priority: medium Medium impact/importance bug label Jan 29, 2021
@erwango erwango changed the title samples/scheduler/metairq_dispatch: Regression after 6b17f2fb2a75f2dab7dc8ef19c67555df742fb22 samples/scheduler/metairq_dispatch: Regression after 30916 (sched: timeout: Do not miss slice timeouts) Jan 29, 2021
@erwango
Copy link
Member Author

erwango commented Jan 29, 2021

I'm seeing the same effect with `tests/kernel/semaphore/semaphore (only on nucleo_f091rc this time)

 : START - test_sem_measure_timeouts

    Assertion failed at ../../src/main.c:990: test_sem_measure_timeouts: ((en)
time missmatch - expected 1, got 1
 FAIL - test_sem_measure_timeouts

@erwango
Copy link
Member Author

erwango commented Jan 29, 2021

@ceolin I'm available for testing fixes if needed (well, starting monday :-))

@nashif
Copy link
Member

nashif commented Feb 2, 2021

@andyross FYI

@andyross
Copy link
Contributor

andyross commented Feb 2, 2021

Can you try #31841 ? That fixes an edge case where a pre-existing bug with slice timeouts got exposed by the fix you bisected to. I was seeing that fail with non-standard clock rates on a renode riscv platform and the tickless_context test. But it's not impossible it's the root cause here too.

andyross pushed a commit to andyross/zephyr that referenced this issue Feb 2, 2021
Fix an edge case that snuck in with the recent fix: if timeslicing is
enabled, the CPU's slice_ticks will be zero, and thus match a timeout
object's dticks value of zero, and thus get suppressed (because "we
already have a timeout scheduled for that") incorrectly.

Fixes zephyrproject-rtos#31789

Signed-off-by: Andy Ross <[email protected]>
@evgeniy-paltsev evgeniy-paltsev added the area: ARC ARC Architecture label Feb 2, 2021
nashif pushed a commit that referenced this issue Feb 2, 2021
Fix an edge case that snuck in with the recent fix: if timeslicing is
enabled, the CPU's slice_ticks will be zero, and thus match a timeout
object's dticks value of zero, and thus get suppressed (because "we
already have a timeout scheduled for that") incorrectly.

Fixes #31789

Signed-off-by: Andy Ross <[email protected]>
kkasperczyk-no pushed a commit to kkasperczyk-no/zephyr that referenced this issue Mar 3, 2021
Fix an edge case that snuck in with the recent fix: if timeslicing is
enabled, the CPU's slice_ticks will be zero, and thus match a timeout
object's dticks value of zero, and thus get suppressed (because "we
already have a timeout scheduled for that") incorrectly.

Fixes zephyrproject-rtos#31789

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
area: ARC ARC Architecture bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants