Incorrect SCHED_FIFO priority handling
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eglibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: libc6
I’m using 10.04. I'm also seeing this on 10.10.
Using SCHED_FIFO, temporarily raising a thread's priority then lowering it back to the original priority using mutexes with priority ceilings and sched_setprio should cause the task to stay at the head of the queue for it's priority. This is defined in the POSIX standards and the Linux manpages.
However, I'm seeing the task running for a while then incorrectly being preempted by another task of the same priority.
pthread_
I have attached an example of this problem using mutexes with priority ceilings.
Expected behavior: The loop in highThread runs until sLoop hits 0xFFFFFFFF
Actual behavior: highThread is preempted by mediumThread in the middle of the loop.