If restart() is called while a previous start() is still in progress,
resetting m_on_start_finish before calling stop() from inside restart()
causes on_finish that was passed to start() to be leaked. One of the
ways this manifests in is a hang in InstanceReplayer::stop() on any
kind of shutdown -- due to InstanceReplayer::start_group_replayer()
keeping track of its start() invocations through C_TrackedOp
group_replayer->start(new C_TrackedOp(m_async_op_tracker, nullptr),
false, false);
and flushing m_async_op_tracker in InstanceReplayer::stop().
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
{
std::lock_guard locker{m_lock};
m_restart_requested = true;
- m_on_start_finish = nullptr;
}
auto ctx = new LambdaContext(