mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Improve "detected inconsistent lock order" error message
This commit is contained in:
parent
bbe9cf4fe4
commit
0ecff9dd34
1 changed files with 2 additions and 2 deletions
|
|
@ -60,7 +60,7 @@ struct CLockLocation {
|
||||||
std::string ToString() const
|
std::string ToString() const
|
||||||
{
|
{
|
||||||
return strprintf(
|
return strprintf(
|
||||||
"%s %s:%s%s (in thread %s)",
|
"'%s' in %s:%s%s (in thread '%s')",
|
||||||
mutexName, sourceFile, sourceLine, (fTry ? " (TRY)" : ""), m_thread_name);
|
mutexName, sourceFile, sourceLine, (fTry ? " (TRY)" : ""), m_thread_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -129,7 +129,7 @@ static void potential_deadlock_detected(const LockPair& mismatch, const LockStac
|
||||||
LogPrintf(" %s\n", i.second.ToString());
|
LogPrintf(" %s\n", i.second.ToString());
|
||||||
}
|
}
|
||||||
if (g_debug_lockorder_abort) {
|
if (g_debug_lockorder_abort) {
|
||||||
tfm::format(std::cerr, "Assertion failed: detected inconsistent lock order at %s:%i, details in debug log.\n", __FILE__, __LINE__);
|
tfm::format(std::cerr, "Assertion failed: detected inconsistent lock order for %s, details in debug log.\n", s2.back().second.ToString());
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
throw std::logic_error(strprintf("potential deadlock detected: %s -> %s -> %s", mutex_b, mutex_a, mutex_b));
|
throw std::logic_error(strprintf("potential deadlock detected: %s -> %s -> %s", mutex_b, mutex_a, mutex_b));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue