-
Notifications
You must be signed in to change notification settings - Fork 7.5k
intermittent issue with tests/kernel/fatal #7291
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
Comments
move to low, since this is intermittent and not easily reproducible. |
I too found similar crash when running sanitycheck: Latest Commit ID: afad09d
|
In the event of a double fault, we do a HW task switch to a special _df_tss hardware task which resets the stack pointer to the interrupt stack and otherwise restores the main hardware task to a runnable state so that _df_handler_bottom() can run. However, we need to make sure that _df_handler_bottom() runs with interrupts locked, otherwise another IRQ could corrupt the interrupt stack resulting in undefined behavior. We have very little stack space to work with in this context, just zero it. It's a fatal error for the thread in any event. Fixes: zephyrproject-rtos#7291 Signed-off-by: Andrew Boie <[email protected]>
I think this is an unlucky timer interrupt when the double-fault handler bottom half is using the interrupt stack, which is corrupting the reason code, it doesn't ensure that interrupts are locked and an interrupt that fires will clobber its context. sent a patch to zero EFLAGS when df_handler bottom is running, previously it was inheriting whatever flags were when the double fault happened. |
In the event of a double fault, we do a HW task switch to a special _df_tss hardware task which resets the stack pointer to the interrupt stack and otherwise restores the main hardware task to a runnable state so that _df_handler_bottom() can run. However, we need to make sure that _df_handler_bottom() runs with interrupts locked, otherwise another IRQ could corrupt the interrupt stack resulting in undefined behavior. We have very little stack space to work with in this context, just zero it. It's a fatal error for the thread in any event. Fixes: #7291 Signed-off-by: Andrew Boie <[email protected]>
Seems to be some kind of race? This only happens sometimes.
The text was updated successfully, but these errors were encountered: