We weren't locking m_flush_mutex properly, which in turn was leading to
racing threads calling dump_recent() and garbling the crash dump output.
Backport: bobtail, argonaut
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit
43cba617aa0247d714632bddf31b9271ef3a1b50)
void Log::dump_recent()
{
- pthread_mutex_unlock(&m_flush_mutex);
+ pthread_mutex_lock(&m_flush_mutex);
pthread_mutex_lock(&m_queue_mutex);
EntryQueue t;