QtxHistTracker: Print message on heuristic gridlock find

This commit is contained in:
2025-09-29 20:47:04 -04:00
parent c0eecf76d4
commit 274edc1013
+13 -5
View File
@@ -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;
}
}