Skip to content
This repository was archived by the owner on Nov 29, 2018. It is now read-only.

Test failure: PrecompiledAssembliesUseSameStrongNameAsApplication #292

Closed
aspnet-hello opened this issue Aug 30, 2018 · 12 comments
Closed
Assignees

Comments

@aspnet-hello
Copy link

This test fails occasionally with the following error:

System.Exception : Command exited unexpectedly with exit code: 134
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Testing.TaskExtensions.<TimeoutAfter>d__0`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer.<StartSelfHostAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer.<DeployAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FunctionalTests.ApplicationTestFixture.<CreateDeploymentAsync>d__19.MoveNext() in /_/test/FunctionalTests/Infrastructure/ApplicationTestFixture.cs:line 109
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FunctionalTests.StrongNamedAppTest_CoreCLR.<PrecompiledAssembliesUseSameStrongNameAsApplication>d__4.MoveNext() in /_/test/FunctionalTests/CoreCLRTests/StrongNamedAppTest_CoreCLR.cs:line 30
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
------- Stdout: -------
| [2018-08-30T03:11:28] TestLifetime Information: Starting test PrecompiledAssembliesUseSameStrongNameAsApplication
| [2018-08-30T03:11:28] TestLifetime Information: Starting test PrecompiledAssembliesUseSameStrongNameAsApplication
| [2018-08-30T03:11:38] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Deploying [Variation] :: ServerType=Kestrel, Runtime=CoreClr, Arch=x64, BaseUrlHint=, Publish=True
| [2018-08-30T03:11:38] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Removing environment variable ASPNETCORE_ENVIRONMENT
| [2018-08-30T03:11:38] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: SET DOTNET_CLI_TELEMETRY_OPTOUT=1
| [2018-08-30T03:11:38] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: SET SolutionConfiguration=Release
| [2018-08-30T03:11:38] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Executing command dotnet publish  --output "/Users/asplab/TeamCity/temp/buildTmp/7776e9d0-fbcf-4fb7-ae62-40b643784fa5" --framework netcoreapp2.0 --configuration Release --no-restore -p:VerifyMatchingImplicitPackageVersion=false 
| [2018-08-30T03:11:39] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: Microsoft (R) Build Engine version 15.8.166+gd4e8d81a88 for .NET Core
| [2018-08-30T03:11:39] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout: Copyright (C) Microsoft Corporation. All rights reserved.
| [2018-08-30T03:11:41] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout:   StrongNamedApp -> /Users/asplab/TeamCity/work/33bdfc1cae7b2a38/modules/MvcPrecompilation/testapps/StrongNamedApp/bin/Release/netcoreapp2.0/StrongNamedApp.dll
| [2018-08-30T03:11:57] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet-publish stdout:   StrongNamedApp -> /Users/asplab/TeamCity/temp/buildTmp/7776e9d0-fbcf-4fb7-ae62-40b643784fa5/
| [2018-08-30T03:11:57] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet publish finished with exit code : 0
| [2018-08-30T03:11:57] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Executing dotnet /Users/asplab/TeamCity/temp/buildTmp/7776e9d0-fbcf-4fb7-ae62-40b643784fa5/StrongNamedApp.dll --server.urls http://localhost:63886/  --server Microsoft.AspNetCore.Server.Kestrel
| [2018-08-30T03:11:57] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Removing environment variable ASPNETCORE_ENVIRONMENT
| [2018-08-30T03:11:57] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: SET ASPNETCORE_DETAILEDERRORS=true
| [2018-08-30T03:11:57] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: SET DOTNET_CLI_TELEMETRY_OPTOUT=1
| [2018-08-30T03:11:57] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: SET SolutionConfiguration=Release
| [2018-08-30T03:11:57] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Started dotnet. Process Id : 16667
| [2018-08-30T03:11:59] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet stdout: \
...

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.1.

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

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

@aspnet-hello
Copy link
Author

Please use this workflow to address this flaky test issue, including checking applicable checkboxes and filling in the applicable "TODO" entries:

  • Is this actually a flaky test?

    • No, this is a regular test failure, fix the test/product (TODO: Link to commit/PR)
    • Yes, proceed below...
  • Is this test failure caused by product code flakiness? (Either this product, or another product this test depends on.)

    • File a bug against the product (TODO: Link to other bug)
    • Is it possible to change the test to avoid the flakiness?
      • Yes? Go to the "Change the test!" section.
      • No?
        • Disable the test (TODO: Link to PR/commit)
        • Wait for other bug to be resolved
        • Wait for us to get build that has the fix
        • Re-enable our test (TODO: Link to PR/commit)
        • Close this bug
  • Is it that the test itself is flaky? This includes external transient problems (e.g. remote server problems, file system race condition, etc.)

    • Is there is a way to change our test to avoid this flakiness?
      • Yes? Change the test!
        • Change the test to avoid the flakiness, for example by using a different test strategy, or by adding retries w/ timeouts (TODO: Link to PR/commit)
        • Run the test 100 times locally as a sanity check.
        • Close this bug
      • No?
        • Is there any logging or extra information that we could add to make this more diagnosable when it happens again?
          • Yes?
            • Add the logging (TODO: Link to PR/commit)
          • No?
            • Delete the test because flaky tests are not useful (TODO: Link to PR/commit)

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

@mkArtakMSFT mkArtakMSFT added 1 - Ready task PRI: 1 - Required Must be handled in a reasonable time labels Aug 30, 2018
@mkArtakMSFT mkArtakMSFT added this to the 2.2.0-preview3 milestone Aug 30, 2018
@aspnet-hello
Copy link
Author

aspnet-hello commented Sep 4, 2018

Precompilation_WorksForSimpleApps failed with about the same error on 2.1.
Publish_UsesRazorSDK failed with about the same error on 2.1.

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

@aspnet-hello
Copy link
Author

Publish_HasNoPrecompilation failed with about the same error on 2.1.

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

@pranavkm
Copy link
Contributor

pranavkm commented Sep 6, 2018

Is 2.1 still open for test specific changes? I was planning on skipping these.

@Eilon
Copy link
Contributor

Eilon commented Sep 6, 2018

Yes it is, with shiproom notification ("tell mode").

@aspnet-hello
Copy link
Author

Publish_HasNoPrecompilation failed with about the same error on 2.1.

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

@aspnet-hello
Copy link
Author

Precompilation_WorksForSimpleApps failed with about the same error on 2.1.

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

@Eilon
Copy link
Contributor

Eilon commented Sep 19, 2018

@pranavkm any updates on this? Are the new failures a new problem in 2.1 flakiness?

@pranavkm
Copy link
Contributor

Yup. They're all primarily issues with port acquisition, perhaps because a different process is still running:

Unable to start Kestrel.
| [2018-09-19T02:21:09] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: dotnet stdout: System.IO.IOException: Failed to bind to address http://127.0.0.1:50180: address already in use. ---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use ---> System.Net.Sockets.SocketException: Address already in use

I'll ask around to see if what other repos did something to fix this sort of issue.

@Eilon
Copy link
Contributor

Eilon commented Sep 19, 2018

I think @mikeharder is good at acquiring ports. If we have hard coded ports that should definitely fixed.

@pranavkm
Copy link
Contributor

Spoke to @Tratcher - looks like they made some changes in 2.2 to make this more reliable: https://github.com/aspnet/Hosting/blob/81383bba8052d018771b8e17c2bc73fc872729fd/src/Microsoft.AspNetCore.Server.IntegrationTesting/Common/TestUriHelper.cs#L26-L33. Should be ok since this is test only and doesn't require cross-repo api changes.

@pranavkm
Copy link
Contributor

Fix checked in. Will keep this issue open for a week if the problem persists.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants