-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Work around occasional IOException using OpenRemoteBaseKey against local machine #29009
Conversation
@@ -236,7 +236,7 @@ private static void LoadPerfCounterDll() | |||
|
|||
string installPath = SharedUtils.GetLatestBuildDllDirectory("."); | |||
|
|||
string perfcounterPath = Path.Combine(installPath, "perfcounter.dll"); | |||
string perfcounterPath = Path.Combine(installPath, "perfcounter.dll".ToLowerInvariant()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way I repro the bug is. Build my corefx repo and the test project. Copy the bin folder to the Spanish machine. and run the tests using Xunit.
The reason for the failure could be that the string "perfcounter.dll" is stored somewhat differently on the Spanish machine. I will investigate more and update why and how it is fixing it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little surprised at this as well. I was wondering where the incorrectly localized string was that caused this, but I don't see one so far. Do you know why machine name "." is OK on English, but not on non-English?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the descrption with more investigation results
This is how we are handling this in eventlog
and we does a similar thing in corefx |
@JeremyKuhne this test failed on OSX https://mc.dot.net/#/user/Anipik/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/4905f366c2d37e7669a9022c021f3b370278c463/workItem/System.Buffers.Tests/analysis/xunit/System.Buffers.ArrayPool.Tests.ArrayPoolUnitTests~2FRentBufferFiresRentedDiagnosticEvent
|
@Anipik from when you kicked this I'm not sure that it got the fix. Let me know if you see it again. |
@dotnet-bot test Outerloop Windows x64 Release Build |
@dotnet-bot test Windows x64 Debug Build |
Commit migrated from dotnet/corefx@15e0c95
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, ".") " is sporadically hitting an IOException with "Network path not found" because the underlying call to RegConnectRegistry is returning an error. I am working around the problem by using Registry.LocalMachine when the key requested is against the local machine. I will open the issue to consider whether OpenRemoteBaseKey should do this itself. I will tag the issue here (after I create it)
Fixes https://github.com/dotnet/corefx/issues/29007