datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

Fix deadlock in config wrapper

Open pgimalac opened this issue 1 year ago • 0 comments

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.

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

pgimalac avatar Jul 04 '24 07:07 pgimalac