-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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/threads/no-multithreading/: Single/Repeated delay boot banner #14454
Comments
The loop on the SAM E70 board is due to the watchdog. The interrupts are not served anymore, so the watchdog fires. Note that the test passes when not using a delayed boot. |
@aurel32 the delay takes place in init's bg_thread_main(), before it calls application main(). interrupts are not locked when this is happening. why would busy-looping here cause the watchdog to fail? what kicks the dog? is there some high-priority watchdog thread that needs to be started? |
@andrewboie The watchdog is not the cause of the issue, it triggers after ~15 seconds. I was just trying to explain the difference between the two boards. Adding this 1 second delay causes other parts of the code to enter in an endless loop and prevents the watchdog ISR to be serviced. Disabling the watchdog on the SAM E70 boards doesn't fix the issue it just makes both boards to hang with a similar behavior. |
Out of curiosity, What is supposed to service it? Eventually the watchdog resets the system. But this always happens, if I don't enable the boot delay I just see the test succeed, then reset, and run again, succeed, reset, ad nauseum. Interrupts aren't locked. My feeling is that with watchdog enabled, unless there is a thread created to service it, the test will reset after 15 seconds no matter what is happening. Since this is a test with no threads we should disable the watchdog for this test. Or is it the driver that is supposed to service the watchdog? Having said all that, watchdog aside, I think the real bug here is that k_busy_wait() is supposed to return after 1000ms and it just sits there forever instead. |
Yeah k_busy_wait() is broken, with this debug printout:
I get output:
k_cycle_get_32() seems to wrap around at some upper bound far less than what is needed for the loop to ever break. |
I noticed that when CONFIG_MULTITHREADING=n, I get no timer interrupts. This doesn't seem right. No wonder things aren't working. What's happening is the main thread is running with interrupts disabled. @andyross fixed this: #9668 And then later it was reverted along with a bunch of other stuff by @nashif : The tree is now in a bad state. We still support disabling multithreading, but a lot of work towards fixing it was taken out, and the feature is essentially broken. We need to restore them, or finish removing the feature. |
After much discussion on slack, it seems clear that several people are strongly opposed to disabling this for 1.14, even temporarily. @cinlyooi-intel @inakypg @nashif Is CONFIG_BOOT_BANNER a hard requirement for hardware testing? |
It is highly desirable, because it allows us to detect if we saw all the output; the test runner will verify if it got all of the expected messages. If the first one is missing, something might be stinking (early missing console because who knows). This, for example, catches a lot in ESP32, we loose a lot of early console and it is not clear yet why. [what the hell -- sorry, by mistake I edited your comment instead of replying to it -- fixed, blame to -ENOCOFFEE ] |
k_busy_wait() does not work when multithreading is disabled, so do not try to wait during boot. Fixes zephyrproject-rtos#14454 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
k_busy_wait() does not work when multithreading is disabled, so do not try to wait during boot. Fixes #14454 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Describe the bug
Instead of seeing "It works", we see single/multiple '***** delaying boot 1000ms (per build configuration) *****'
To Reproduce
Steps to reproduce the behavior:
Replace -DBOARD=sam_e70_xplained withquark_se_c1000_ss_devboard(arc)
Screenshots or console output
sam_e70_xplained:
quark_se_c1000_ss_devboard:arc:
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: