Allow code reached from an interrupt handler to futexWait

NEW
Unassigned

Status

()

P5
normal
4 years ago
a year ago

People

(Reporter: lth, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
This bug pertains to an obscure corner case of futexWait, see eg https://bugzilla.mozilla.org/show_bug.cgi?id=1074237#c40 and nest back from there.  I don't want to do the reengineering now so I'm recording it here.

The essence is that an interrupt handler, or an event delivered during an interrupt handler (very rare), may invoke futexWait.  Right now such a call just throws an exception ("Waiting is not allowed").

It would be better to allow the wait.

To do that, we must probably step away from the current handling of waiters, which is one FutexWaiter structure per wait instance, and move to a structure where there is one FutexWaiter per runtime / per PerRuntimeFutexAPI instance.  Once such a structure is on the list it remains on the list once.  That structure must additionally have a counter saying something about the number of invocations; this allows LIFO wakeup as desired.

However there are some fine points around how the structure is moved during futexWakeOrRequeue that I haven't figured out yet, which is why I don't want to do the reengineering now.
(Reporter)

Updated

4 years ago
No longer blocks: 1074237
(Reporter)

Updated

a year ago
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.