-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Ensure context is not cached before logging info #6437
Conversation
This is obscure enough that I don’t feel too guilty for breaking this! Longer term we should be thinking about how to safeguard against this in the future. Also indicates that we should add a test with that env var to force this. Thanks for the fix! |
Fixes dotnet#6436 which causes this crash in cases where MSBuild's result caching is turned on (generally this is for large builds in 32-bit MSBuild). ``` MSBUILD : error MSB1025: An internal failure occurred while running MSBuild. Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: We shouldn't be accessing the ProjectInstance when the configuration is cached. at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Exception innerException, Object[] args) at Microsoft.Build.BackEnd.BuildRequestConfiguration.get_Project() at Microsoft.Build.BackEnd.Logging.NodeLoggingContext.LogProjectStarted(BuildRequest request, BuildRequestConfiguration configuration) at Microsoft.Build.BackEnd.Logging.NodeLoggingContext.LogRequestHandledFromCache(BuildRequest request, BuildRequestConfiguration configuration, BuildResult result) at Microsoft.Build.BackEnd.Scheduler.LogRequestHandledFromCache(BuildRequest request, BuildResult result) at Microsoft.Build.BackEnd.Scheduler.HandleRequestBlockedByNewRequests(SchedulableRequest parentRequest, BuildRequestBlocker blocker, List`1 responses) at Microsoft.Build.BackEnd.Scheduler.ReportRequestBlocked(Int32 nodeId, BuildRequestBlocker blocker) at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker) at Microsoft.Build.Execution.BuildManager.ProcessPacket(Int32 node, INodePacket packet) at Microsoft.Build.Execution.BuildManager.<>c__DisplayClass76_0.<Microsoft.Build.BackEnd.INodePacketHandler.PacketReceived>b__0() at Microsoft.Build.Execution.BuildManager.ProcessWorkQueue(Action action) --- End of stack trace from previous location where exception was thrown --- at Microsoft.Build.Execution.BuildManager.EndBuild() ```
💯
Also 💯. Trying to find a good spot for it. |
.2 because we actually shipped a .1 but branded it .0.
Work item (Internal use): AB#1325685
Summary
Fixes #6436 which causes this crash in cases where MSBuild's result
caching is turned on (generally this is for large builds in 32-bit
MSBuild).
Customer Impact
Customers with large builds see MSBuild crashes.
Regression?
Yes. Worked in 16.8, regressed in 16.9.0 because of #5997
Testing
Validated minimal repro (using forced caching) passes where it failed on released bits.
Risk
Low. Additional guarding falling into existing case so log output shouldn't suffer.