Merge bitcoin/bitcoin#31124: util: Remove RandAddSeedPerfmon

9bb92c0e7f util: Remove RandAddSeedPerfmon (Hodlinator)

Pull request description:

  `RegQueryValueExA(HKEY_PERFORMANCE_DATA, ...)` sometimes hangs *bitcoind.exe* on Windows during startup, at least on CI.

  We have other sources of entropy to seed randomness with on Windows, so should be alright removing this. Might resurrect if less drastic fix is found.

  Hopefully sufficient to fix #30390.

  CI debugged with temporary Windows stack trace dumping + Symbols in #30956.

ACKs for top commit:
  achow101:
    ACK 9bb92c0e7f
  fanquake:
    ACK 9bb92c0e7f
  hebasto:
    ACK 9bb92c0e7f, I have reviewed the code and it looks OK.
  laanwj:
    Code review ACK  9bb92c0e7f

Tree-SHA512: d3f26b4dd0519ef957f23abaffc6be1fed339eae756aed18042422fc6f0bba4e8fa9a44bf903e54f72747e2d0108146c18fd80576d95fc20690a2daf9c83689d
This commit is contained in:
Ava Chow
2024-10-24 18:08:12 -04:00
3 changed files with 3 additions and 45 deletions

View File

@@ -599,7 +599,7 @@ void SeedPeriodic(CSHA512& hasher, RNGState& rng) noexcept
// Add the events hasher into the mix
rng.SeedEvents(hasher);
// Dynamic environment data (performance monitoring, ...)
// Dynamic environment data (clocks, resource usage, ...)
auto old_size = hasher.Size();
RandAddDynamicEnv(hasher);
LogDebug(BCLog::RAND, "Feeding %i bytes of dynamic environment data into RNG\n", hasher.Size() - old_size);
@@ -616,7 +616,7 @@ void SeedStartup(CSHA512& hasher, RNGState& rng) noexcept
// Everything that the 'slow' seeder includes.
SeedSlow(hasher, rng);
// Dynamic environment data (performance monitoring, ...)
// Dynamic environment data (clocks, resource usage, ...)
auto old_size = hasher.Size();
RandAddDynamicEnv(hasher);