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

Azure Devops pipelines crashing in MSBuild logger, as of 5/25 VS2019 image #14904

Closed
rainersigwald opened this issue May 28, 2021 · 8 comments · Fixed by #15115
Closed

Azure Devops pipelines crashing in MSBuild logger, as of 5/25 VS2019 image #14904

rainersigwald opened this issue May 28, 2021 · 8 comments · Fixed by #15115
Assignees
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug

Comments

@rainersigwald
Copy link
Member


Issue moved from dotnet/msbuild#6498


From @Scottj1s on Friday, May 28, 2021 1:10:09 AM

Beginning on 5/25, a stage of the WinUI build which executes on hosted VS2019 agents, began failing intermittently with the stack below. Subsequent runs of the pipeline produce different combinations of success/failure.

MSBUILD : error MSB4017: The build stopped unexpectedly because of an unexpected logger failure. 
Microsoft.Build.Exceptions.InternalLoggerException: The build stopped unexpectedly because of an unexpected logger failure. ---> System.NullReferenceException: Object reference not set to an instance of an object. 
at MSBuild.Logger.BuildConfiguration.Equals(Object obj) 
at System.Collections.Generic.ObjectEqualityComparer`1.Equals(T x, T y) 
at System.Collections.Generic.List`1.Contains(T item) 
at MSBuild.Logger.ProjectTrees.AddTopLevelProject(ProjectStartedEventArgs startedEvent, BuildConfiguration platformConfiguration) 
at MSBuild.Logger.CentralLogger.HandleProjectStarted(Object sender, ProjectStartedEventArgs e) 
at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseProjectStartedEvent(Object sender, ProjectStartedEventArgs buildEvent) 
@anatolybolshakov
Copy link
Contributor

Hi @Scottj1s could you please share your logs? You can also send them to my email - v-anbols@microsoft.com

@anatolybolshakov anatolybolshakov self-assigned this May 28, 2021
@Scottj1s
Copy link
Member

Direct emailed binlogs of failed builds.

A bit more investigation shows that the build failure is not intermittent, as supposed. It is 100% correlated with the image update on 5/25. Stages of our build pipeline that happen to land on agents with the 5/16 image always succeed. Those that are queued to an agent with the 5/25 image always fail.

@asklar
Copy link
Member

asklar commented Jun 2, 2021

This is now hitting React Native for Windows pipelines: https://dev.azure.com/ms/react-native-windows/_build/results?buildId=174255&view=logs&jobId=f933640c-866b-5d69-8f9e-c72a61865db3&j=f933640c-866b-5d69-8f9e-c72a61865db3&t=cc5f9f17-41e7-537a-c494-777e5536ceae

Microsoft.Build.Exceptions.InternalLoggerException: The build stopped unexpectedly because of an unexpected logger failure. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at MSBuild.Logger.BuildConfiguration.Equals(Object obj)
   at System.Collections.Generic.ObjectEqualityComparer`1.Equals(T x, T y)
   at System.Collections.Generic.List`1.Contains(T item)
   at MSBuild.Logger.ProjectTrees.AddTopLevelProject(ProjectStartedEventArgs startedEvent, BuildConfiguration platformConfiguration)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseProjectStartedEvent(Object sender, ProjectStartedEventArgs 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.RaiseProjectStartedEvent(Object sender, ProjectStartedEventArgs buildEvent)
   at MSBuild.Logger.ForwardingLogger.ForwardEvent(Object sender, BuildEventArgs e)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseProjectStartedEvent(Object sender, ProjectStartedEventArgs buildEvent)
##[error]Process 'msbuild.exe' exited with code '1'.

@anatolybolshakov Can this be prioritized as it is affecting a production pipeline?

@asklar
Copy link
Member

asklar commented Jun 2, 2021

CC @AgneLukoseviciute @dannyvv

llongley added a commit to microsoft/microsoft-ui-xaml that referenced this issue Jun 7, 2021
There's a nullref in MSBuild logging that's currently affecting multiple repos:

microsoft/azure-pipelines-tasks#14904

The workaround is to turn off logging until the issue is fixed.

This also contains fixes to get WpfApp building in VS 16.10.
@japj
Copy link

japj commented Jun 17, 2021

Is this a similar problem to #14863 due to logger ProjectTrees parent/child tracking?

@anatolybolshakov
Copy link
Contributor

@japj hmm, not sure at the moment... But this one looks different

@anatolybolshakov
Copy link
Contributor

anatolybolshakov commented Aug 2, 2021

Created PR for msbuildlogger update (blobstorage), waiting to be merged.

@anatolybolshakov anatolybolshakov added the awaiting deployment Related changes are waiting for deployment to be completed label Aug 9, 2021
@anatolybolshakov
Copy link
Contributor

Hi @rainersigwald the fix for this issue has been already rolled out - closing it at the moment as resolved. Please let us know if you have any other questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants