Bug #62395
open
AsyncMessenger::wait() isn't checking for spurious condition wakeup
Added by Leonid Usov 9 months ago.
Updated 8 months ago.
Backport:
pacific,quincy,reef
Description
The method wait()
of AsyncMessenger
has an ill-formed condition wait.
{
std::unique_lock locker{lock};
if (!started) {
return;
}
if (!stopped)
stop_cond.wait(locker);
}
This code works unless the kernel decides to wake up sleeping threads spuriously, which may happen according to the POSIX documentation. Specifically, this is the case when attaching a debugger to the process on the macOs.
- Subject changed from AsyncMessenger::wait() isn't looping over the stopped condition to AsyncMessenger::wait() isn't checking for spurious condition wakeup
- Related to Bug #38577: Messenger/MessengerTest.MissingServerIdenTest2/0 msg/async/AsyncMessenger.cc: 312: FAILED ceph_assert(!did_bind) added
- Status changed from New to Fix Under Review
- Pull request ID set to 52930
- Backport set to pacific,quincy,reef
- Status changed from Fix Under Review to Pending Backport
- Copied to Backport #63021: quincy: AsyncMessenger::wait() isn't checking for spurious condition wakeup added
- Copied to Backport #63022: reef: AsyncMessenger::wait() isn't checking for spurious condition wakeup added
- Copied to Backport #63023: pacific: AsyncMessenger::wait() isn't checking for spurious condition wakeup added
- Tags set to backport_processed
Also available in: Atom
PDF