You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 60d4df8
Browse filesBrowse the repository at this point in the historyBrowse files
schedule: zephyr_ll: release LL lock held by a faulting user thread
In user-space LL builds zephyr_ll_run() keeps the per-core LL scheduler
mutex locked while running the tasks. When a module faults in the LL
thread, k_sys_fatal_error_handler() returns and z_fatal_error() aborts
only that thread, but Zephyr does not release mutexes of aborted
threads. The lock stays owned by the dead thread and the next
user_ll_lock_sched() on that core pends forever. E.g. the IPC user
thread triggering a pipeline stop blocks, and all further IPCs for that
core time out with -EAGAIN in ipc_user_forward_cmd().
Add zephyr_ll_release_locks_of_current(), called from the fatal error
handler while _current is still the faulting thread and owner of the
lock. It looks the locks up in the kernel-only zephyr_ll_klocks[] copy,
resets the shadow owner tracking and unlocks every recursion level,
handing the lock over to the first waiter. Rescheduling is deferred
until the exception returns.
This only unblocks the waiters. The scheduler state is not repaired:
the tasks run in the interrupted tick stay on the dead thread's
temporary list and no further LL ticks happen on that core.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ganesh, Aditya <aditya.ganesh@intel.com>
0 commit comments