You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
) and it sometimes fails (I assume because of a transient network error). When that happens, the version is added to an ignore list, then SeekCompatibleDesktopRuntime is used as fallback:
// Record that we don't need to try to download this version next time
_ignoredDesktopRuntimes.Add(desktopVersion);
// if the specified SDK can't be installed
// Seeking already installed Desktop runtimes
// c.f. https://github.com/dotnet/sdk/issues/4237
desktopVersion = SeekCompatibleDesktopRuntime(dotnetHome, targetFramework, desktopVersion);
And SeekCompatibleDesktopRuntime fails because of the aforementioned error (Could not find a part of the path 'C:\Windows\TEMP\benchmarks-agent\benchmarks-server-4776\bnwqqose.b5j\shared\Microsoft.WindowsDesktop.App'.).
Past this point, all jobs will fail because the target version has been added to _ignoredDesktopRuntimes so the agent will always use the bogus fallback.
I'm not sure what's the best way to fix it, but I would have a few recommendations:
The job error should mention the exception, for easier debugging:
job.Error=$"dotnet-install could not install a component: {dotnetInstallStep}";
The version of the framework shouldn't be added to _ignoredDesktopRuntimes if the cause of the failure is a network error (assuming that can be detected)
SeekCompatibleDesktopRuntime should check if the Microsoft.WindowsDesktop.App directory exists
But I'm still failing to understand why this directory doesn't exist to begin with. Maybe it has something to do with dotnet/sdk#4237?
The text was updated successfully, but these errors were encountered:
This Windows Desktop part of the sdk is a pain. But I should be able to make it more resilient and not break subsequent runs if it fails. Also need to check if it's already doing some retries.
Are you using floating versions of the SDKs (7.0 previews)?
Do you know that there is an argument on the command line to re-use a folder containing pre-installed runtimes? At least if you use the same versions it won't try to download it again when the agent is restarted.
Are you using floating versions of the SDKs (7.0 previews)?
We're targeting the latest 5.0: <TargetFramework>net5.0</TargetFramework>
Do you know that there is an argument on the command line to re-use a folder containing pre-installed runtimes? At least if you use the same versions it won't try to download it again when the agent is restarted.
I didn't know that. It wouldn't fix the underlying issue but that would be a massive improvement. I assume you're refering to --dotnethome?
For months, our Crank agent have been plagued with an issue where all jobs suddenly start failing with the message:
After restarting the crank agent, the error mysteriously disappears until the next time.
I finally took some time to dig into it, and I found the root exception:
My understanding is that Crank tries to install the .net runtime (
crank/src/Microsoft.Crank.Agent/Startup.cs
Line 2747 in 0042d4d
SeekCompatibleDesktopRuntime
is used as fallback:And
SeekCompatibleDesktopRuntime
fails because of the aforementioned error (Could not find a part of the path 'C:\Windows\TEMP\benchmarks-agent\benchmarks-server-4776\bnwqqose.b5j\shared\Microsoft.WindowsDesktop.App'.
).Past this point, all jobs will fail because the target version has been added to
_ignoredDesktopRuntimes
so the agent will always use the bogus fallback.I'm not sure what's the best way to fix it, but I would have a few recommendations:
crank/src/Microsoft.Crank.Agent/Startup.cs
Line 2919 in 0042d4d
_ignoredDesktopRuntimes
if the cause of the failure is a network error (assuming that can be detected)SeekCompatibleDesktopRuntime
should check if theMicrosoft.WindowsDesktop.App
directory existsBut I'm still failing to understand why this directory doesn't exist to begin with. Maybe it has something to do with dotnet/sdk#4237?
The text was updated successfully, but these errors were encountered: