Skip to content

Prevent use of deleted ticker in Ticker test #5255

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

Merged
merged 1 commit into from
Oct 9, 2017

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Oct 4, 2017

In test_case_2x_callbacks two tickers are setup to repeatedly reschedule each other. When these tickers are deleted this rescheduling is still occurring and can lead to a deleted ticker being scheduled.

When this happens the following error message is displayed:
Thread 0x0 error -6: Not allowed in ISR context

Note - this problem was not detected by CI since the test reported the correct results back to the host test and only experienced this error on tear down.

This problem can be reproduced on an nrf51 by first building the ticker
test with:

> mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker --compile -DMBED_TRAP_ERRORS_ENABLED=1 -DMBED_HEAP_STATS_ENABLED=1 -DMBED_STACK_STATS_ENABLED=1

And then running testing with:

> mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker --run"

In test_case_2x_callbacks two tickers are setup to repeatedly
reschedule each other. When these tickers are deleted this
rescheduling is still occurring and can lead to a deleted ticker
being scheduled.

When this happens the following error message is displayed:
Thread 0x0 error -6: Not allowed in ISR context

Note - this problem was not detected by CI since the test reported
the correct results back to the host test and only experienced this
error on tear down.

This problem can be reproduced on an nrf51 by first building the ticker
test with:
"mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker
--compile -DMBED_TRAP_ERRORS_ENABLED=1
-DMBED_HEAP_STATS_ENABLED=1 -DMBED_STACK_STATS_ENABLED=1"

And then running testing with:
"mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker --run"
@c1728p9
Copy link
Contributor Author

c1728p9 commented Oct 4, 2017

Created issue #5256 for not detecting the failure.

@theotherjimmy
Copy link
Contributor

@tommikas It looks like pr-head is lost. Could you take a look?

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 7, 2017

/morph test-nightly

@mbed-bot
Copy link

mbed-bot commented Oct 7, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 1540

All builds and test passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants