msbuild crashes with "MSB0001: Internal MSBuild Error: must be valid"
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: :mag_right: https://dev.azure.com/dnceng/internal/_build/results?buildId=2490308
Error message validated: [MSB0001: Internal MSBuild Error: must be valid]
Result validation: :white_check_mark: 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 |
@rainersigwald @baronfel any ideas?
cc @JanKrivanek as MSBuild kitten
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.
Ok, should I file another issue in dotnet/msbuild then?
Ok, should I file another issue in dotnet/msbuild then?
Yes please - move or copy to dotnet/msbuild
https://github.com/dotnet/msbuild/issues/10342. I'm keeping this open so the Build Analysis tracking works.
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.
Build Analysis shows no hits in the last 30 days, closing.