NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/55230: futex wakes do not wake the highest priority waiter



>Number:         55230
>Category:       kern
>Synopsis:       futex wakes do not wake the highest priority waiter
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 04 15:05:00 +0000 2020
>Originator:     Jason Thorpe
>Release:        NetBSD 9.99.59
>Organization:
Riscy Business
>Environment:
NetBSD 9.99.59
>Description:
Futex wake operations do not wake the highest priority waiter.  Instead, the wake the waiters in FIFO order.
>How-To-Repeat:
Enqueue a low priority waiter before a high priority waiter.  Wake one waiter.  The waiter that's awoken will be the low priority waiter.
>Fix:
Do not use a queue of "wait" structures each with their own condvar.  Instead, each futex should have its own sleepq and operate as a first-class synchronization object.



Home | Main Index | Thread Index | Old Index