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

msbuild crashes with "MSB0001: Internal MSBuild Error: must be valid" #3304

Open
3 tasks
akoeplinger opened this issue Jul 8, 2024 · 7 comments
Open
3 tasks

Comments

@akoeplinger
Copy link
Member

akoeplinger commented Jul 8, 2024

Build

https://dev.azure.com/dnceng/internal/_build/results?buildId=2490361 and https://dev.azure.com/dnceng/internal/_build/results?buildId=2490308

Build leg reported

No response

Pull Request

No response

Known issue core information

Fill out the known issue JSON section by following the step by step documentation on how to create a known issue

 {
    "ErrorMessage" : "MSB0001: Internal MSBuild Error: must be valid",
    "BuildRetry": true,
    "ErrorPattern": "",
    "ExcludeConsoleLog": false
 }

@dotnet/dnceng

Release Note Category

  • Feature changes/additions
  • Bug fixes
  • Internal Infrastructure Improvements

Release Note Description

Additional information about the issue reported

    MSBUILD : error MSB4166: Child node "3" exited prematurely. Shutting down. Diagnostic information may be found in files in "/tmp/MSBuildTemproot/" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.
    MSBUILD : error MSB4166: /tmp/MSBuildTemproot/MSBuild_pid-14914_ef532437860e4947b63c7a07fa167972.failure.txt:
    MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 14914:
    MSBUILD : error MSB4166: =====================
    MSBUILD : error MSB4166: 07/08/2024 11:37:54
    MSBUILD : error MSB4166: Microsoft.Build.Framework.InternalErrorException: MSB0001: Internal MSBuild Error: must be valid
    MSBUILD : error MSB4166:    at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Exception innerException, Object[] args)
    MSBUILD : error MSB4166:    at Microsoft.Build.BackEnd.Logging.LoggingContext.LogBuildEvent(BuildEventArgs buildEvent)
    MSBUILD : error MSB4166:    at Microsoft.Build.BackEnd.Components.RequestBuilder.AssemblyLoadsTracker.CurrentDomainOnAssemblyLoad(Object sender, AssemblyLoadEventArgs args)
    MSBUILD : error MSB4166: ===================
    MSBUILD : error MSB4166: 
    MSBUILD : error MSB4166: 

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng/internal/_build/results?buildId=2490308
Error message validated: [MSB0001: Internal MSBuild Error: must be valid]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/8/2024 4:25:13 PM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0
@akoeplinger
Copy link
Member Author

@rainersigwald @baronfel any ideas?

@baronfel
Copy link
Member

baronfel commented Jul 8, 2024

cc @JanKrivanek as MSBuild kitten

@rainersigwald
Copy link
Member

must be valid is such a bad error message :sigh:

Looks like it's claiming that the LoggingContext is not marked valid, so it's either not fully constructed or was already marked Finished. There shouldn't be a way to get into this situation so this is an MSBuild bug.

@akoeplinger
Copy link
Member Author

Ok, should I file another issue in dotnet/msbuild then?

@JanKrivanek
Copy link
Member

Ok, should I file another issue in dotnet/msbuild then?

Yes please - move or copy to dotnet/msbuild

@akoeplinger
Copy link
Member Author

dotnet/msbuild#10342. I'm keeping this open so the Build Analysis tracking works.

@ericstj
Copy link
Member

ericstj commented Aug 9, 2024

I marked this as "BuildRetry": true, we really shouldn't be excusing these in CI because this means the build didn't run. We need folks to retry to ensure we aren't hiding a build break or test failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants