Project

General

Profile

Actions

Bug #62395

open

AsyncMessenger::wait() isn't checking for spurious condition wakeup

Added by Leonid Usov 9 months ago. Updated 7 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
msgr
Target version:
-
% Done:

0%

Source:
Tags:
backport_processed
Backport:
pacific,quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.


Related issues 4 (2 open2 closed)

Related to Messengers - Bug #38577: Messenger/MessengerTest.MissingServerIdenTest2/0 msg/async/AsyncMessenger.cc: 312: FAILED ceph_assert(!did_bind)Resolved

Actions
Copied to Ceph - Backport #63021: quincy: AsyncMessenger::wait() isn't checking for spurious condition wakeupIn ProgressLeonid UsovActions
Copied to Ceph - Backport #63022: reef: AsyncMessenger::wait() isn't checking for spurious condition wakeupIn ProgressLeonid UsovActions
Copied to Ceph - Backport #63023: pacific: AsyncMessenger::wait() isn't checking for spurious condition wakeupResolvedLeonid UsovActions
Actions #1

Updated by Leonid Usov 9 months ago

  • Subject changed from AsyncMessenger::wait() isn't looping over the stopped condition to AsyncMessenger::wait() isn't checking for spurious condition wakeup
Actions #2

Updated by Leonid Usov 9 months ago

  • Related to Bug #38577: Messenger/MessengerTest.MissingServerIdenTest2/0 msg/async/AsyncMessenger.cc: 312: FAILED ceph_assert(!did_bind) added
Actions #3

Updated by Leonid Usov 9 months ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 52930
Actions #4

Updated by Ilya Dryomov 9 months ago

  • Backport set to pacific,quincy,reef
Actions #5

Updated by Leonid Usov 7 months ago

  • Status changed from Fix Under Review to Pending Backport
Actions #6

Updated by Backport Bot 7 months ago

  • Copied to Backport #63021: quincy: AsyncMessenger::wait() isn't checking for spurious condition wakeup added
Actions #7

Updated by Backport Bot 7 months ago

  • Copied to Backport #63022: reef: AsyncMessenger::wait() isn't checking for spurious condition wakeup added
Actions #8

Updated by Backport Bot 7 months ago

  • Copied to Backport #63023: pacific: AsyncMessenger::wait() isn't checking for spurious condition wakeup added
Actions #9

Updated by Backport Bot 7 months ago

  • Tags set to backport_processed
Actions

Also available in: Atom PDF