Skip to content

Multithreaded build for roslyn crashes in TerminalLogger #13095

@JanProvaznik

Description

@JanProvaznik

Issue Description

After resolving issue with WPF build which block it from building with the current main msbuild, the Roslyn build still crashes with terminal logger enabled

Steps to Reproduce

use a patched MSBuild with #12991

git clone https://github.com/dotnet/roslyn
dotnet build Roslyn.slnx /mt

Expected Behavior

builds roslyn correctly
(this works with TL disabled)

Actual Behavior

PS C:\Users\janprovaznik\dev\testing\roslyn> ....\msbuilds\msb1\artifacts\bin\bootstrap\core\dotnet.exe build .\Roslyn.slnx /mt /bl
Restore complete (31.4s)
RulesetToEditorconfigConverter net472 win-x86 succeeded (22.6s) → artifacts\bin\RulesetToEditorconfigConverter\Debug\net472\RulesetToEditorconfigConverter.exe
GenerateAnalyzerNuspec net10.0 succeeded (22.7s) → artifacts\bin\GenerateAnalyzerNuspec\Debug\net10.0\GenerateAnalyzerNuspec.dll
TestReferenceAssembly netstandard2.0 succeeded (4.8s) → artifacts\bin\TestReferenceAssembly\Debug\netstandard2.0\TestReferenceAssembly.dll
CSharpSyntaxGenerator netstandard2.0 succeeded (17.5s) → artifacts\bin\CSharpSyntaxGenerator\Debug\netstandard2.0\CSharpSyntaxGenerator.dll
Microsoft.Build.Tasks.CodeAnalysis.Sdk net472 succeeded (20.1s) → artifacts\bin\Microsoft.Build.Tasks.CodeAnalysis.Sdk\Debug\net472\Microsoft.Build.Tasks.CodeAnalysis.Sdk.dll
Metrics net472 win-x86 succeeded (37.6s) → artifacts\bin\Metrics\Debug\net472\Metrics.exe
Microsoft.CodeAnalysis.PublicApiAnalyzers netstandard2.0 succeeded (39.9s) → artifacts\bin\Microsoft.CodeAnalysis.PublicApiAnalyzers\Debug\netstandard2.0\Microsoft.CodeAnalysis.PublicApiAnalyzers.dll
Microsoft.CodeAnalysis.Analyzers netstandard2.0 succeeded (44.7s) → artifacts\bin\Microsoft.CodeAnalysis.Analyzers\Debug\netstandard2.0\Microsoft.CodeAnalysis.Analyzers.dll
Microsoft.CodeAnalysis.ResxSourceGenerator netstandard2.0 succeeded (40.2s) → artifacts\bin\Microsoft.CodeAnalysis.ResxSourceGenerator\Debug\netstandard2.0\Microsoft.CodeAnalysis.ResxSourceGenerator.dll
Microsoft.CodeAnalysis.BannedApiAnalyzers netstandard2.0 succeeded (45.0s) → artifacts\bin\Microsoft.CodeAnalysis.BannedApiAnalyzers\Debug\netstandard2.0\Microsoft.CodeAnalysis.BannedApiAnalyzers.dll
Microsoft.CodeAnalysis.AnalyzerUtilities netstandard2.0 succeeded (38.8s) → artifacts\bin\Microsoft.CodeAnalysis.AnalyzerUtilities\Debug\netstandard2.0\Microsoft.CodeAnalysis.AnalyzerUtilities.dll
Roslyn.Diagnostics.Analyzers netstandard2.0 succeeded (42.0s) → artifacts\bin\Roslyn.Diagnostics.Analyzers\Debug\netstandard2.0\Roslyn.Diagnostics.Analyzers.dll
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers netstandard2.0 succeeded (41.6s) → artifacts\bin\Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers\Debug\netstandard2.0\Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers.dll
Text.Analyzers netstandard2.0 succeeded (43.3s) → artifacts\bin\Text.Analyzers\Debug\netstandard2.0\Text.Analyzers.dll
Microsoft.Build.Tasks.CodeAnalysis net472 succeeded (20.2s) → artifacts\bin\Microsoft.Build.Tasks.CodeAnalysis\Debug\net472\Microsoft.Build.Tasks.CodeAnalysis.dll
Microsoft.CodeAnalysis.Debugging.Package netstandard2.0 succeeded (7.1s) → artifacts\bin\Microsoft.CodeAnalysis.Debugging.Package\Debug\netstandard2.0\Microsoft.CodeAnalysis.Debugging.Package.dll
Microsoft.CodeAnalysis.PooledObjects.Package netstandard2.0 succeeded (7.2s) → artifacts\bin\Microsoft.CodeAnalysis.PooledObjects.Package\Debug\netstandard2.0\Microsoft.CodeAnalysis.PooledObjects.Package.dll
Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers netstandard2.0 succeeded (9.8s) → artifacts\bin\Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers\Debug\netstandard2.0\Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers.dll
Microsoft.CodeAnalysis netstandard2.0 succeeded (40.3s) → artifacts\bin\Microsoft.CodeAnalysis\Debug\netstandard2.0\Microsoft.CodeAnalysis.dll
GenerateDocumentationAndConfigFiles net10.0 succeeded (52.0s) → artifacts\bin\GenerateDocumentationAndConfigFiles\Debug\net10.0\GenerateDocumentationAndConfigFiles.dll
Microsoft.CodeAnalysis.Contracts.Package net8.0 succeeded (9.0s) → artifacts\bin\Microsoft.CodeAnalysis.Contracts.Package\Debug\net8.0\Microsoft.CodeAnalysis.Contracts.Package.dll
Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic netstandard2.0 succeeded (9.4s) → artifacts\bin\Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic\Debug\netstandard2.0\Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic.dll
Microsoft.CodeAnalysis.Collections.Package net10.0 succeeded (10.4s) → artifacts\bin\Microsoft.CodeAnalysis.Collections.Package\Debug\net10.0\Microsoft.CodeAnalysis.Collections.Package.dll
Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp netstandard2.0 succeeded (10.8s) → artifacts\bin\Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp\Debug\netstandard2.0\Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp.dll
Microsoft.CodeAnalysis net10.0 succeeded (40.1s) → artifacts\bin\Microsoft.CodeAnalysis\Debug\net10.0\Microsoft.CodeAnalysis.dll
Roslyn.Diagnostics.VisualBasic.Analyzers netstandard2.0 CoreCompile (14.5s)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities net472 PrepareForBuild (1.8s)
Roslyn.Diagnostics.CSharp.Analyzers netstandard2.0 CoreCompile (12.7s)
Microsoft.CodeAnalysis.Features.DiagnosticsTests.Utilities net10.0 CheckForDuplicateItems (2.5s)
Test.Utilities net10.0 GenerateBuildDependencyFile (27.4s)
Microsoft.CodeAnalysis.VisualBasic.BannedApiAnalyzers netstandard2.0 CoreCompile (21.1s)
Microsoft.CodeAnalysis.Contracts.Package net10.0 ResolveAssemblyReferences (6.3s)
Text.VisualBasic.Analyzers netstandard2.0 CoreCompile (8.6s)
Text.CSharp.Analyzers netstandard2.0 CoreCompile (7.5s)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities net472 ResolveLockFileReferences (1.9s)
Microsoft.CodeAnalysis net8.0 CoreGenerateSatelliteAssemblies (41.9s)
Microsoft.CodeAnalysis.Remote.Workspaces netstandard2.0 PrepareForBuild (2.0s)
Microsoft.CodeAnalysis.VisualBasic netstandard2.0 BatchTranslateSourceFromXlf (6.7s)
Microsoft.CodeAnalysis.Threading.Package netstandard2.0 CoreCompile (8.2s)
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes netstandard2.0 CoreCompile (8.8s)
Microsoft.CodeAnalysis.Collections.Package netstandard2.0 CoreCompile (5.2s)
Microsoft.CodeAnalysis.CodeStyle netstandard2.0 BatchTranslateSourceFromXlf (3.6s)
Microsoft.CodeAnalysis.CodeStyle.Fixes netstandard2.0 ResolveLockFileReferences (3.6s)
Process terminated.
Assertion failed.
EvalProjectInfo should have been captured before ProjectStarted
at Microsoft.Build.Logging.TerminalLogger.ProjectStarted(Object sender, ProjectStartedEventArgs e) in C:\Users\janprovaznik\dev\msbuilds\msb1\src\Build\Logging\TerminalLogger\TerminalLogger.cs:line 725
at Microsoft.Build.Logging.ReusableLogger.ProjectStartedHandler(Object sender, ProjectStartedEventArgs e) in C:\Users\janprovaznik\dev\msbuilds\msb1\src\Build\Logging\ReusableLogger.cs:line 538
at Microsoft.Build.BackEnd.Logging.EventSourceSink.Consume(BuildEventArgs buildEvent) in C:\Users\janprovaznik\dev\msbuilds\msb1\src\Build\BackEnd\Components\Logging\EventSourceSink.cs:line 261
at Microsoft.Build.BackEnd.Logging.EventSourceSink.Consume(BuildEventArgs buildEvent, Int32 sinkId) in C:\Users\janprovaznik\dev\msbuilds\msb1\src\Build\BackEnd\Components\Logging\EventSourceSink.cs:line 224
at Microsoft.Build.BackEnd.Logging.EventRedirectorToSink.Microsoft.Build.Framework.IEventRedirector.ForwardEvent(BuildEventArgs buildEvent) in C:\Users\janprovaznik\dev\msbuilds\msb1\src\Build\BackEnd\Components\Logging\EventRedirectorToSink.cs:line 57
at Microsoft.Build.BackEnd.Logging.CentralForwardingLogger.EventSource_AnyEventRaised(Object sender, BuildEve(14.8s)b
uildEvent) in C:\Users\janprovaznik\dev\msbuilds\msb1\src\Build\BackEnd\Components\Logging\CentralForwardingLogge(2.1s)i
ne 121 (13.0s)
at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseAnyEvent(BuildEventArgs buildEvent) in C:\Users\janpro(2.8s)
dev\msbuilds\msb1\src\Build\BackEnd\Components\Logging\EventSourceSink.cs:line 410 (27.7s)
at Microsoft.Build.BackEnd.Logging.EventSourceSink.Consume(BuildEventArgs buildEvent) in C:\Users\janprovazni(21.4s)s
builds\msb1\src\Build\BackEnd\Components\Logging\EventSourceSink.cs:line 347 (6.6s)
at Microsoft.Build.BackEnd.Logging.LoggingService.RouteBuildEvent(BuildEventArgs eventArg) in C:\Users\janprov(8.9s)d
ev\msbuilds\msb1\src\Build\BackEnd\Components\Logging\LoggingService.cs:line 1724 (7.9s)
at Microsoft.Build.BackEnd.Logging.LoggingService.RouteBuildEvent(Object loggingEvent) in C:\Users\janprovazni(2.2s)m
sbuilds\msb1\src\Build\BackEnd\Components\Logging\LoggingService.cs:line 1679 (42.2s)
at Microsoft.Build.BackEnd.Logging.LoggingService.LoggingEventProcessor(Object loggingEvent) in C:\Users\janpr(2.3s)k
\dev\msbuilds\msb1\src\Build\BackEnd\Components\Logging\LoggingService.cs:line 1512 (7.0s)
at Microsoft.Build.BackEnd.Logging.LoggingService.g__LoggingEventProc|155_0() in (8.6s)r
s\janprovaznik\dev\msbuilds\msb1\src\Build\BackEnd\Components\Logging\LoggingService.cs:line 1392 (9.2s)
at System.Threading.Thread.StartHelper.Callback(Object state) (5.5s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, (3.9s)
state) (4.0s)

msbuild.zip binlog

Analysis

System.Diagnostics.Debug.Assert(evalInfo != default, "EvalProjectInfo should have been captured before ProjectStarted");

Versions & Configurations

18.0.4

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions