Project

General

Profile

Actions

Bug #62395

closed
LU LU

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

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

Added by Leonid Usov over 3 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Leonid Usov
Category:
msgr
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
pacific,quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Tags (freeform):
Fixed In:
v18.0.0-6412-g4fbb4acab44
Released In:
v19.2.0~1535
Upkeep Timestamp:
2025-07-12T02:45:38+00:00

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 (0 open — 4 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 wakeupResolvedLeonid Usov

Actions
Copied to Ceph - Backport #63022: reef: AsyncMessenger::wait() isn't checking for spurious condition wakeupResolvedLeonid Usov

Actions
Copied to Ceph - Backport #63023: pacific: AsyncMessenger::wait() isn't checking for spurious condition wakeupResolvedLeonid Usov

Actions

LU Updated by Leonid Usov over 3 years ago Actions #1

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

LU Updated by Leonid Usov over 3 years ago Actions #2

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

LU Updated by Leonid Usov over 3 years ago Actions #3

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

ID Updated by Ilya Dryomov over 3 years ago Actions #4

  • Backport set to pacific,quincy,reef

LU Updated by Leonid Usov about 3 years ago Actions #5

  • Status changed from Fix Under Review to Pending Backport

UB Updated by Upkeep Bot about 3 years ago Actions #6

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

UB Updated by Upkeep Bot about 3 years ago Actions #7

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

UB Updated by Upkeep Bot about 3 years ago Actions #8

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

LU Updated by Leonid Usov over 2 years ago Actions #13

  • Status changed from Pending Backport to Resolved

UB Updated by Upkeep Bot over 1 year ago Actions #14

  • Merge Commit set to 4fbb4acab4492574a122d209fa14b8ff8494de88
  • Fixed In set to v18.0.0-6412-g4fbb4acab44
  • Released In set to v19.2.0~1535
  • Upkeep Timestamp set to 2025-07-12T02:45:38+00:00
Actions

Also available in: PDF Atom