Project

General

Profile

Actions

Bug #48869

closed

race condition in amqp manager initialization

Added by Yuval Lifshitz over 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

from cbodley:

2410804 Thread 86:
2410804 Conditional jump or move depends on uninitialised value(s)
2410804 at 0x6BDB0AB: void std::this_thread::sleep_for<unsigned
long, std::ratio<1l, 1000000000l> >(std::chrono::duration<unsigned
long, std::ratio<1l, 1000000000l> > const&) (thread:391)
2410804 by 0x6BD849C: rgw::amqp::Manager::run() (rgw_amqp.cc:793)
2410804 by 0x6BE0FB9: void std::__invoke_impl<void, void
(rgw::amqp::Manager::*)(),
rgw::amqp::Manager*>(std::__invoke_memfun_deref, void
(rgw::amqp::Manager::*&&)(), rgw::amqp::Manager*&&) (invoke.h:73)
2410804 by 0x6BE0EFC: std::__invoke_result<void
(rgw::amqp::Manager::*)(), rgw::amqp::Manager*>::type
std::__invoke<void (rgw::amqp::Manager::*)(),
rgw::amqp::Manager*>(void (rgw::amqp::Manager::*&&)(),
rgw::amqp::Manager*&&) (invoke.h:95)
2410804 by 0x6BE0E6C: void
std::thread::_Invoker<std::tuple<void (rgw::amqp::Manager::*)(),
rgw::amqp::Manager*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul,
1ul>) (thread:264)
2410804 by 0x6BE0E25: std::thread::_Invoker<std::tuple<void
(rgw::amqp::Manager::*)(), rgw::amqp::Manager*> >::operator()()
(thread:271)
2410804 by 0x6BE0E09:
std::thread::_State_impl<std::thread::_Invoker<std::tuple<void
(rgw::amqp::Manager::*)(), rgw::amqp::Manager*> > >::_M_run()
(thread:215)

it's pointing at this line:
std::this_thread::sleep_for(idle_time);

this looks like an issue with order of initialization in the Manager's
constructor:
runner(&Manager::run, this),
idle_time(std::chrono::milliseconds(idle_time_ms)),

we shouldn't spawn the thread until the class is fully-initialized


Related issues 1 (0 open1 closed)

Copied to rgw - Backport #48934: octopus: race condition in amqp manager initializationResolvedsinguliere _Actions
Actions #1

Updated by Yuval Lifshitz over 3 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 38903
Actions #2

Updated by Yuval Lifshitz over 3 years ago

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

Updated by Backport Bot over 3 years ago

  • Copied to Backport #48934: octopus: race condition in amqp manager initialization added
Actions #4

Updated by Loïc Dachary almost 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF