aspnet / Hosting

[Archived] Code for hosting and starting up an ASP.NET Core application. Project moved to https://github.com/aspnet/Extensions and https://github.com/aspnet/AspNetCore
Apache License 2.0
552 stars 312 forks source link

Test failure: ShutdownTestRun #1519

Closed ryanbrandenburg closed 6 years ago

ryanbrandenburg commented 6 years ago

This test fails occasionally with the following error:

System.NullReferenceException : Object reference not set to an instance of an object.
   at Microsoft.AspNetCore.Server.IntegrationTesting.ApplicationDeployer.CleanPublishedOutput() in /_/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/ApplicationDeployer.cs:line 100
   at Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer.Dispose() in /_/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs:line 205
   at Microsoft.AspNetCore.Hosting.FunctionalTests.ShutdownTests.ExecuteShutdownTest(String testName, String shutdownMechanic) in /_/test/Microsoft.AspNetCore.Hosting.FunctionalTests/ShutdownTests.cs:line 114
   at Microsoft.AspNetCore.Hosting.FunctionalTests.ShutdownTests.ShutdownTestRun() in /_/test/Microsoft.AspNetCore.Hosting.FunctionalTests/ShutdownTests.cs:line 33
--- End of stack trace from previous location where exception was thrown ---
------- Stdout: -------
| [0.015s] TestLifetime Information: Starting test ShutdownTestRun at 2018-08-10T22:40:24
| [0.001s] TestLifetime Information: Starting test ExecuteShutdownTest at 2018-08-10T22:40:24
| [0.009s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Deploying [Variation] :: ServerType=Kestrel, Runtime=CoreClr, Arch=x64, BaseUrlHint=, Publish=True
| [0.014s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Executing command dotnet publish  --output "/mnt/temp/buildTmp/27932f56ea2345cc9813f135d51da328" --framework netcoreapp2.2 --configuration Release --no-restore -p:VerifyMatchingImplicitPackageVersion=false 
| [0.332s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: Microsoft (R) Build Engine version 15.7.179.6572 for .NET Core
| [0.333s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: Copyright (C) Microsoft Corporation. All rights reserved.
| [2.505s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /mnt/work/33bdfc1cae7b2a38/.packages/internal.aspnetcore.sdk/2.2.0-preview1-20180807.2/build/GenerateAssemblyInfo.targets(25,5): error MSB4062: The "Microsoft.AspNetCore.BuildTools.Sdk_GetAssemblyFileVersion" task could not be loaded from the assembly /mnt/work/33bdfc1cae7b2a38/.packages/internal.aspnetcore.sdk/2.2.0-preview1-20180807.2/build/../tools/netcoreapp2.1/Internal.AspNetCore.Sdk.dll. Assembly with same name is already loaded Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/mnt/work/33bdfc1cae7b2a38/modules/Hosting/src/Microsoft.Extensions.Hosting.Abstractions/Microsoft.Extensions.Hosting.Abstractions.csproj]
| [2.515s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: /mnt/work/33bdfc1cae7b2a38/.packages/internal.aspnetcore.sdk/2.2.0-preview1-20180807.2/build/GenerateAssemblyInfo.targets(25,5): error MSB4062: The "Microsoft.AspNetCore.BuildTools.Sdk_GetAssemblyFileVersion" task could not be loaded from the assembly /mnt/work/33bdfc1cae7b2a38/.packages/internal.aspnetcore.sdk/2.2.0-preview1-20180807.2/build/../tools/netcoreapp2.1/Internal.AspNetCore.Sdk.dll. Assembly with same name is already loaded Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/mnt/work/33bdfc1cae7b2a38/modules/Hosting/src/Microsoft.AspNetCore.Hosting.Server.Abstractions/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj]
| [2.602s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Error: dotnet publish exited with exit code : 1
| [2.605s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: Host process already exited or never started successfully.
| [2.607s] TestLifetime Information: Finished test ExecuteShutdownTest in 2.6064648s
| [2.664s] TestLifetime Information: Finished test ShutdownTestRun in 2.6582765s

Other tests within that build may have failed with a similar message, but they are not listed here. Check the link above for more info.

This test failed on 2.2.

CC @Eilon (because the bot doesn't know who else to pick)

This issue was made automatically. If there is a problem contact ryanbrandenburg.

ryanbrandenburg commented 6 years ago

ShutdownTestRun failed with about the same error on master. ShutdownTestRun failed with about the same error on master. ShutdownTestRun failed with about the same error on 2.2. ShutdownTestRun failed with about the same error on master. ShutdownTestRun failed with about the same error on 2.2. ShutdownTestRun failed with about the same error on master. ShutdownTestRun failed with about the same error on master. ShutdownTestRun failed with about the same error on master. Please use this workflow to address this flaky test issue, including checking applicable checkboxes and filling in the applicable "TODO" entries:

This comment was made automatically. If there is a problem contact ryanbrandenburg.

Tratcher commented 6 years ago

Duplicate of #1503, closed a little too soon @natemcmaster

natemcmaster commented 6 years ago

This bot is very aggressive about squashing bugs.

must squash all bugs

ryanbrandenburg commented 6 years ago

ShutdownTestRun failed with about the same error on 2.2. ShutdownTestRun failed with about the same error on master. ShutdownTestRun failed with about the same error on 2.2.

This comment was made automatically. If there is a problem contact ryanbrandenburg.

muratg commented 6 years ago

@Tratcher This one good to close yet?