Actions
Bug #48869
closedrace condition in amqp manager initialization
% Done:
0%
Source:
Development
Tags:
Backport:
octopus
Regression:
No
Severity:
3 - minor
Reviewed:
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
Updated by Yuval Lifshitz over 3 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 38903
Updated by Yuval Lifshitz over 3 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Backport Bot over 3 years ago
- Copied to Backport #48934: octopus: race condition in amqp manager initialization added
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