RTEMS | score: A time of day set dispatches inside the watchdog tickle (#5756)

Sebastian Huber (@sebhub) gitlab at rtems.org
Wed Sep 9 00:50:12 UTC 2026



Issue created by Sebastian Huber: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5756



`_TOD_Set()` expires every realtime watchdog which the new time of day
reaches. It runs in the task which calls `rtems_clock_set()` or
`clock_settime()`. The only lock which that task holds is an API mutex,
so the task stays preemptible.

`_Watchdog_Do_tickle()` calls a service routine outside the lock of the
collection and with interrupts enabled. The service routine of a task
based timer sends an event to the timer server, and the send ends with a
thread dispatch. A timer server of a higher priority therefore runs
while the tickle phase is still in progress.

A task which runs in that window may delete an object which the service
routine of another watchdog of the same phase still reads. One processor
is enough for this order.

A service routine of the clock tick reaches no such window. It runs in
an interrupt, and a delete directive obtains the object allocator mutex,
which no interrupt handler may do.

Found in the review of the delete of a period. This description was
created with Claude Code assistance.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5756
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-8uc548jwo6vgnhc207v8htbpp-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260909/a3cba1af/attachment.htm>


More information about the bugs mailing list