https://dev.azure.com/dnceng/public/_build/results?buildId=1068163&view=ms.vss-test-web.build-test-results-tab&runId=32851380&resultId=122402&paneView=debug
System.AggregateException : One or more errors occurred. (Assertion failed)
---- System.InvalidOperationException : Assertion failed
Stack trace
at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body)
at Roslyn.Utilities.RoslynParallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body, CancellationToken cancellationToken) in /_/src/Compilers/Core/Portable/InternalUtilities/RoslynParallel.cs:line 23
at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) in /_/src/Compilers/CSharp/Portable/Symbols/Source/SourceNamespaceSymbol_Completion.cs:line 48
at Microsoft.CodeAnalysis.CSharp.Symbols.SourceModuleSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) in /_/src/Compilers/CSharp/Portable/Symbols/Source/SourceModuleSymbol.cs:line 263
at Microsoft.CodeAnalysis.CSharp.Symbols.SourceAssemblySymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) in /_/src/Compilers/CSharp/Portable/Symbols/Source/SourceAssemblySymbol.cs:line 913
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetSourceDeclarationDiagnostics(SyntaxTree syntaxTree, Nullable`1 filterSpanWithinTree, Func`4 locationFilterOpt, CancellationToken cancellationToken) in /_/src/Compilers/CSharp/Portable/Compilation/CSharpCompilation.cs:line 2801
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnosticsWithoutFiltering(CompilationStage stage, Boolean includeEarlierStages, BindingDiagnosticBag builder, CancellationToken cancellationToken) in /_/src/Compilers/CSharp/Portable/Compilation/CSharpCompilation.cs:line 2676
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnostics(CompilationStage stage, Boolean includeEarlierStages, DiagnosticBag diagnostics, CancellationToken cancellationToken) in /_/src/Compilers/CSharp/Portable/Compilation/CSharpCompilation.cs:line 2602
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnostics(CompilationStage stage, Boolean includeEarlierStages, CancellationToken cancellationToken) in /_/src/Compilers/CSharp/Portable/Compilation/CSharpCompilation.cs:line 2594
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnostics(CancellationToken cancellationToken) in /_/src/Compilers/CSharp/Portable/Compilation/CSharpCompilation.cs:line 2588
at Microsoft.CodeAnalysis.DiagnosticExtensions.VerifyDiagnostics[TCompilation](TCompilation c, DiagnosticDescription[] expected) in /_/src/Compilers/Test/Core/Diagnostics/DiagnosticExtensions.cs:line 103
at Microsoft.CodeAnalysis.CSharp.UnitTests.TopLevelStatementsTests.LocalFunctionStatement_04() in /_/src/Compilers/CSharp/Test/Semantic/Semantics/TopLevelStatementsTests.cs:line 4338
----- Inner Stack Trace -----
at Microsoft.CodeAnalysis.ThrowingTraceListener.Fail(String message, String detailMessage) in /_/src/Compilers/Test/Core/ThrowingTraceListener.cs:line 26
at System.Diagnostics.TraceInternal.Fail(String message, String detailMessage)
at System.Diagnostics.TraceInternal.TraceProvider.Fail(String message, String detailMessage)
at System.Diagnostics.Debug.Fail(String message, String detailMessage)
at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMem
@Youssef1313
As Jared mentioned, the stack here is incomplete. Everything goes through
ForceComplete
and the assert is failing in code executed byParallel.For
. It looks like the “----- Inner Stack Trace -----” doesn’t match, even though it is truncated.