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

Timing tests are unstable on NRF51_DK #4612

Closed
0xc0170 opened this issue Jun 22, 2017 · 5 comments
Closed

Timing tests are unstable on NRF51_DK #4612

0xc0170 opened this issue Jun 22, 2017 · 5 comments

Comments

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 22, 2017

Description

  • Type: Bug
  • Priority: Blocker

Bug

Target
NRF51_DK

Toolchain:
any

meed-os sha:
latest master

The test that is failing tests-mbedmicro-rtos-mbed-basic , it fails randomly, so might be harder to reproduce.

This is one #4601 (comment) and another one #4599 (comment)

different compilers, same issue. The result from the log

mbedgt: test on hardware with target id: 110000005032312036393738323032313231303497969903
mbedgt: test suite 'tests-mbedmicro-rtos-mbed-basic' ................................................. TIMEOUT in 261.48 sec
	test case: 'tests-mbedmicro-rtos-mbed-basic' ................................................. ERROR in 261.48 sec

Test timeouts. There are some reports for nrf51 dk and its timers, are they relevant?

cc @nvlsianpu @anangl @pan- @c1728p9

@pan-
Copy link
Member

pan- commented Jun 22, 2017

It might be linked to #4108 but I cannot reproduce the issue locally.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 22, 2017

I got NRF51 DK working, and can reproduce the problem. Every second time (first run is OK) I run the rtos basic test , I get this


[1498142884.62][HTST][INF] Device base time 72000
[1498142884.62][HTST][INF] sleeping for 9.08000946045 to measure drift accurately
[1498142884.62][SERI][TXD] {{final_time;0}}
[1498142884.76][CONN][RXD] {{final_time;CMSIS-RTOS error: Stack underflow (status: 0x1, task ID: 0x200055CC, task name: (null))

I've been testing this with #4599 that should improve timer testing.

Update: Seems it is random anyway, got 2x OK, then Error with stack underflow

@c1728p9
Copy link
Contributor

c1728p9 commented Jun 22, 2017

I looked at a similar problem with @studavekar and we found the cause to be a stack overflow because the 768 byte stack in the basic rtos test was too small. It intermittently failed in development builds because the stack would only overflow if an interrupt pushed more registers onto the thread stack at the right time. Rebuilding as debug caused the overflow to occur always since it used more stack space. @studavekar is updating the stack size in #4599 so this should fix the underflow in tests-mbedmicro-rtos-mbed-basic.

Also of note, the above stack overflow was not nrf51 specific, and has been occurring on other platforms.

@nvlsianpu
Copy link
Contributor

@xc0170, @c1728p9 Is this issue is still valid?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 27, 2017

I believe this was resolved earlier with updating ticker tests at the host side plus above the stack overflow.

@0xc0170 0xc0170 closed this as completed Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants