Spurious wakeup
Phenomenon where a thread wakes from a condition variable without being notified, often due to OS-level optimizations.
A condition variable lets threads wait until some predicate becomes true. Specification-wise, wakeups can occur without notify() being called — Linux, Windows, and many other OSs may wake all waiters sometimes as an optimization. A woken thread must therefore always re-check its predicate before proceeding; the pattern "wake me when X is true, then it will be true" is unsafe.
This is not a bug but intentional design to avoid thundering herd and enable OS optimizations. Correct use always requires a while loop: while the predicate is NOT true, wait again.