Debug:Qutex: Add deadlock detection based on elapsed time
We now detect that a deadlock is likely when CONFIG_DEBUG_QUTEX_DEADLOCK_TIMEOUT_MS has elapsed. This is the preliminary work required to do a backtrace through the call stack and figure out if a deadlock has really occured. To do this, we'd have to go through the async call chain and search for a previous caller which acquired the same qutex as the one that first failed during this Lockvoker LockSet acquisition attempt.
This commit is contained in:
@@ -26,6 +26,14 @@ math(EXPR MIND_VOSCILLATOR_FREQ_MS "1000 / ${MIND_VOSCILLATOR_PERIOD_MS}")
|
||||
# World thread configuration
|
||||
option(WORLD_USE_BODY_THREAD
|
||||
"Use body thread for world component instead of separate world thread" OFF)
|
||||
|
||||
# Qutex deadlock detection configuration
|
||||
set(DEBUG_CONFIG_QUTEX_DEADLOCK_TIMEOUT_MS 500 CACHE STRING
|
||||
"Timeout in milliseconds for deadlock detection in qutex system")
|
||||
if(NOT DEBUG_CONFIG_QUTEX_DEADLOCK_TIMEOUT_MS GREATER 0)
|
||||
message(FATAL_ERROR "DEBUG_CONFIG_QUTEX_DEADLOCK_TIMEOUT_MS must be a positive integer > 0")
|
||||
endif()
|
||||
|
||||
# Test configuration
|
||||
option(ENABLE_TESTS "Enable building tests" OFF)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user