#2136 closed defect (fixed)

Race condition in _Thread_Change_priority() with most schedulers

Reported by: Sebastian Huber Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: score Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:


The call to rtems_task_suspend() is explicitly allowed in interrupt service routines:


Suppose a thread changes its priority. It will end up in _Thread_Change_priority().

The first action is _Thread_Set_transient( the_thread ). Suppose an ISR happens after this action which suspends this thread. It will add STATES_SUSPENDED to the threads state.

Now back in _Thread_Change_priority() line 61 we have state != STATES_TRANSIENT and we exit the function without additional scheduler operations.

Now we have a thread executing with STATES_SUSPENDED set with most schedulers since they don't update the heir and thread dispatch necessary in their extract operation.

Change History (2)

comment:2 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.