Skip to content

Test failure : Hosting tests fail on Windows in Debug mode #1043

@natemcmaster

Description

@natemcmaster

This is regularly happening in CI. @pakrym thinks there is a Debug.Assert crashing the test process.

@dougbu has reported seeing the same failure in master and release/2.1.

xUnit.net Console Runner v2.4.0 (64-bit .NET Core 4.6.27322.0)
  Discovering: Microsoft.Extensions.Hosting.Tests
  Discovered:  Microsoft.Extensions.Hosting.Tests
  Starting:    Microsoft.Extensions.Hosting.Tests
info: Microsoft.Extensions.Hosting.HostTests[0]
      Request starting
Assertion Failed

   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.CaptureDisposable(Object service) in /_/src/DependencyInjection/DI/src/ServiceLookup/ServiceProviderEngineScope.cs:line 44
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite scopedCallSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 90
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 52
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteVisitor.cs:line 25
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 34
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteVisitor.cs:line 46
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite scopedCallSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 84
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 52
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteVisitor.cs:line 25
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 34
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteVisitor.cs:line 46
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite scopedCallSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 84
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 52
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteVisitor.cs:line 25
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 34
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteVisitor.cs:line 46
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite scopedCallSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 84
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 52
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteVisitor.cs:line 25
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) in /_/src/DependencyInjection/DI/src/ServiceLookup/CallSiteRuntimeResolver.cs:line 11
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ILEmitResolverBuilder.Build(ServiceCallSite callSite) in /_/src/DependencyInjection/DI/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs:line 69
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CompiledServiceProviderEngine.RealizeService(ServiceCallSite callSite) in /_/src/DependencyInjection/DI/src/ServiceLookup/CompiledServiceProviderEngine.cs:line 28
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>n__0(ServiceCallSite callSite)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__1() in /_/src/DependencyInjection/DI/src/ServiceLookup/DynamicServiceProviderEngine.cs:line 24
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__278_1(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   at System.Threading.Tasks.Task.ExecuteEntryUnsafe(Thread threadPoolThread)
   at System.Threading.Tasks.Task.ExecuteFromThreadPool(Thread threadPoolThread)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
=== COMMAND LINE ===
"F:\vsagent\16\s\.dotnet\dotnet.exe" exec --depsfile "F:\vsagent\16\s\artifacts\bin\Microsoft.Extensions.Hosting.Tests\Debug\netcoreapp3.0\Microsoft.Extensions.Hosting.Tests.deps.json" --runtimeconfig "F:\vsagent\16\s\artifacts\bin\Microsoft.Extensions.Hosting.Tests\Debug\netcoreapp3.0\Microsoft.Extensions.Hosting.Tests.runtimeconfig.json" "F:\vsagent\16\s\.packages\xunit.runner.console/2.4.0/tools/netcoreapp2.0/xunit.console.dll" "F:\vsagent\16\s\artifacts\bin\Microsoft.Extensions.Hosting.Tests\Debug\netcoreapp3.0\Microsoft.Extensions.Hosting.Tests.dll" -noautoreporters -xml "F:\vsagent\16\s\artifacts\TestResults\Debug\Microsoft.Extensions.Hosting.Tests_netcoreapp3.0_x64.xml" -html "F:\vsagent\16\s\artifacts\TestResults\Debug\Microsoft.Extensions.Hosting.Tests_netcoreapp3.0_x64.html"  > "F:\vsagent\16\s\artifacts\log\Debug\Microsoft.Extensions.Hosting.Tests_netcoreapp3.0_x64.log" 2>&1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions