Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Terminal logger crashes in TargetStarted coming from OOP node #9322

Closed
ladipro opened this issue Oct 12, 2023 · 0 comments · Fixed by #9388
Closed

[Bug]: Terminal logger crashes in TargetStarted coming from OOP node #9322

ladipro opened this issue Oct 12, 2023 · 0 comments · Fixed by #9388
Assignees
Labels
Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. bug iteration:2023November Priority:1 Work that is critical for the release, but we could probably ship without triaged
Milestone

Comments

@ladipro
Copy link
Member

ladipro commented Oct 12, 2023

Issue Description

I hit a TL crash when building a repro for #9320.

Steps to Reproduce

Build the following with the MSBUILDNOINPROCNODE environment variable set to 1:

<Project>
  <Target Name='Build'>
    <RegisterAssembly Assemblies="nonexistent.dll" />
  </Target>
</Project>

Expected Behavior

The build fails as it cannot find nonexistent.dll.

Actual Behavior

Unhandled Exception: Microsoft.Build.Exceptions.InternalLoggerException: The build stopped unexpectedly because of an unexpected logger failure. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Microsoft.Build.Logging.TerminalLogger.TerminalLogger.TargetStarted(Object sender, TargetStartedEventArgs e)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseTargetStartedEvent(Object sender, TargetStartedEventArgs buildEvent)
   --- End of inner exception stack trace ---
   at Microsoft.Build.Exceptions.InternalLoggerException.Throw(Exception innerException, BuildEventArgs e, String messageResourceName, Boolean initializationException, String[] messageArgs)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseTargetStartedEvent(Object sender, TargetStartedEventArgs buildEvent)
   at Microsoft.Build.BackEnd.Logging.LoggingService.RouteBuildEvent(KeyValuePair`2 nodeEvent)
   at Microsoft.Build.BackEnd.Logging.LoggingService.RouteBuildEvent(Object loggingEvent)
   at Microsoft.Build.BackEnd.Logging.LoggingService.ProcessLoggingEvent(Object buildEvent)
   at Microsoft.Build.BackEnd.Logging.LoggingService.PacketReceived(Int32 node, INodePacket packet)
   at Microsoft.Build.BackEnd.NodePacketFactory.PacketFactoryRecord.DeserializeAndRoutePacket(Int32 nodeId, ITranslator translator)
   at Microsoft.Build.BackEnd.NodePacketFactory.DeserializeAndRoutePacket(Int32 nodeId, NodePacketType packetType, ITranslator translator)
   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.NodeContext.ReadAndRoutePacket(NodePacketType packetType, Byte[] packetData, Int32 packetLength)
   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.NodeContext.BodyReadComplete(IAsyncResult result)
   at System.IO.Pipes.PipeStream.AsyncPSCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Analysis

No response

Versions & Configurations

MSBuild version 17.8.1+585e09762 for .NET Framework

@ladipro ladipro added bug needs-triage Have yet to determine what bucket this goes in. Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. labels Oct 12, 2023
@AR-May AR-May added this to the VS 17.9 milestone Oct 17, 2023
@AR-May AR-May added Priority:1 Work that is critical for the release, but we could probably ship without and removed needs-triage Have yet to determine what bucket this goes in. labels Oct 17, 2023
@YuliiaKovalova YuliiaKovalova self-assigned this Nov 1, 2023
@AR-May AR-May added the triaged label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. bug iteration:2023November Priority:1 Work that is critical for the release, but we could probably ship without triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants