1
0

DeadlockDetect: Provide more information for debugging.

This commit is contained in:
Mattes D
2017-01-17 14:10:02 +01:00
parent 23f5e605a1
commit a52de8e8cd
3 changed files with 30 additions and 5 deletions

View File

@@ -121,7 +121,7 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age)
WorldAge.m_NumCyclesSame += 1;
if (WorldAge.m_NumCyclesSame > (m_IntervalSec * 1000) / CYCLE_MILLISECONDS)
{
DeadlockDetected();
DeadlockDetected(a_WorldName, a_Age);
}
}
else
@@ -135,9 +135,11 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age)
void cDeadlockDetect::DeadlockDetected(void)
void cDeadlockDetect::DeadlockDetected(const AString & a_WorldName, Int64 a_WorldAge)
{
LOGERROR("Deadlock detected, aborting the server");
LOGERROR("Deadlock detected: world %s has been stuck at age %lld. Aborting the server.",
a_WorldName.c_str(), static_cast<long long>(a_WorldAge)
);
ASSERT(!"Deadlock detected");
abort();
}