datadog-agent
datadog-agent copied to clipboard
Fix deadlock in config wrapper
What does this PR do?
Fix a deadlock in the config wrapper caused by a recursive read-lock.
Motivation
Do not deadlock.
Additional Notes
The deadlock happens if a routine tries to write-lock between the two read-locks, that's unlikely, but it can definitely happen, especially since AllSettingsBySource does some work between the two locks.
Introduced by https://github.com/DataDog/datadog-agent/pull/26129.