-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diagnostics: lock while populating hardware information
The shirou/gopsutil/host library that we use to gather hardware information during diagnostics reporting is not multi-thread safe. As one example, it lazily initializes a global map the first time the Virtualization function is called, but takes no lock while doing so. Work around this limitation by taking our own lock. This code never triggered race conditions before, but is doing so after recent changes I made to the diagnostics reporting code. Previously, we were using a single background goroutine to do both diagnostics reporting and checking for updates. Now we are doing each of those on different goroutines, which triggers race detection. Fixes #61091 Release justification: fixes for high-priority or high-severity bugs in existing functionality Release note: None
- Loading branch information
1 parent
059c22b
commit 1aee317
Showing
3 changed files
with
54 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters