QtxHistTracker: Print message on heuristic gridlock find
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <memory>
|
||||
#include <forward_list>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
|
||||
namespace smo {
|
||||
|
||||
@@ -125,11 +126,18 @@ bool QutexAcquisitionHistoryTracker
|
||||
/* Found firstFailedQutex in another continuation's held locks
|
||||
* This indicates a potential gridlock
|
||||
*/
|
||||
if (&heldLock.get() == &firstFailedQutex)
|
||||
{
|
||||
acquisitionHistoryLock.release();
|
||||
return true;
|
||||
}
|
||||
if (&heldLock.get() != &firstFailedQutex)
|
||||
{ continue; }
|
||||
|
||||
acquisitionHistoryLock.release();
|
||||
|
||||
std::cerr << __func__ << ": GRIDLOCK DETECTED: Current "
|
||||
"continuation @" << currentContinuation.get()
|
||||
<< " wants lock '" << firstFailedQutex.name
|
||||
<< "' which is held by continuation @"
|
||||
<< continuation.get() << std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user