[Bug 2136] New: Race condition in _Thread_Change_priority() with most schedulers
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Thu Aug 8 09:34:25 UTC 2013
https://www.rtems.org/bugzilla/show_bug.cgi?id=2136
Bug #: 2136
Summary: Race condition in _Thread_Change_priority() with most
schedulers
Classification: Unclassified
Product: RTEMS
Version: HEAD
Platform: All
OS/Version: RTEMS
Status: NEW
Severity: normal
Priority: P3
Component: cpukit
AssignedTo: joel.sherrill at oarcorp.com
ReportedBy: sebastian.huber at embedded-brains.de
The call to rtems_task_suspend() is explicitly allowed in interrupt service
routines:
http://rtems.org/onlinedocs/doc-current/share/rtems/html/c_user/Interrupt-Manager-Directives-Allowed-from-an-ISR.html#Interrupt-Manager-Directives-Allowed-from-an-ISR
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.
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list