Skip to content

xtensa: context returns to thread after kernel oops #15037

@andrewboie

Description

@andrewboie

Describe the bug
See CI failures for #15032

What is happening is that a thread is blowing its stack which generates a call to z_except_reason(). k_thread_abort() gets called and the thread should never return to its faulting context.

Instead, the thread returns to where it faulted! After the "Caught system error" observe that the thread continues to run, failing the test case.

test stack sentinel overflow - timer irq
posting 1024 bytes of junk to stack...
waiting for tick advance...
@ /home/apboie/projects/zephyr3/zephyr/kernel/thread.c:259:
***** Stack Check Fail! *****
Current thread ID = 0x60005b78
Faulting instruction address = 0xdeaddead
Thread 0x60005b78 Caught system error -- reason 2
FAIL - stack_sentinel_timer@160. should never see this

    Assertion failed at /home/apboie/projects/zephyr3/zephyr/tests/kernel/fatal/src/main.c:207: check_stack_overflow: (rv equal to TC_FAIL)
thread 0x60005b78 was not aborted

Metadata

Metadata

Assignees

Labels

area: XtensaXtensa ArchitecturebugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions