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

Internal MSBuild Error during logging by AssemblyLoadsTracker #11095

Open
danmoseley opened this issue Dec 6, 2024 · 6 comments · May be fixed by #11289
Open

Internal MSBuild Error during logging by AssemblyLoadsTracker #11095

danmoseley opened this issue Dec 6, 2024 · 6 comments · May be fixed by #11289
Assignees
Labels
Priority:2 Work that is important, but not critical for the release triaged

Comments

@danmoseley
Copy link
Member

Issue Description

This is with 10.0.100-alpha.1.24573.1
Build log while it lasts https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_apis/build/builds/887239/logs/226

I thought this might be a task bug similar to the Restore task bug that caused #4792. Then wondered, how I could make it log which task was logging. Then realized the logging seems to be from within "AssemblyLoadsTracker" not a task.

Build FAILED.

MSBUILD : error MSB4166: Child node "4" exited prematurely. Shutting down. Diagnostic information may be found in files in "/mnt/vss/_work/1/s/artifacts/log/Release" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory. [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: /mnt/vss/_work/1/s/artifacts/log/Release/MSBuild_pid-21939_4a3f1338ba4d49eeb5ba3df414c5b8de.failure.txt: [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 21939: [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: ===================== [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: 12/5/2024 3:07:31 PM [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: Microsoft.Build.Framework.InternalErrorException: MSB0001: Internal MSBuild Error: ContextID 1702 should have been in the ID-to-project file mapping but wasn't! [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Object[] args) [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.LoggingService.GetAndVerifyProjectFileFromContext(BuildEventContext context) [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.LoggingService.LogBuildEvent(BuildEventArgs buildEvent) [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Components.RequestBuilder.AssemblyLoadsTracker.CurrentDomainOnAssemblyLoad(Object sender, AssemblyLoadEventArgs args) [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: =================== [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166:  [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166:  [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: Child node "4" exited prematurely. Shutting down. Diagnostic information may be found in files in "/mnt/vss/_work/1/s/artifacts/log/Release" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory. [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: /mnt/vss/_work/1/s/artifacts/log/Release/MSBuild_pid-21939_4a3f1338ba4d49eeb5ba3df414c5b8de.failure.txt: [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 21939: [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: ===================== [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: 12/5/2024 3:07:31 PM [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: Microsoft.Build.Framework.InternalErrorException: MSB0001: Internal MSBuild Error: ContextID 1702 should have been in the ID-to-project file mapping but wasn't! [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Object[] args) [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.LoggingService.GetAndVerifyProjectFileFromContext(BuildEventContext context) [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.LoggingService.LogBuildEvent(BuildEventArgs buildEvent) [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Components.RequestBuilder.AssemblyLoadsTracker.CurrentDomainOnAssemblyLoad(Object sender, AssemblyLoadEventArgs args) [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166: =================== [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166:  [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
MSBUILD : error MSB4166:  [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
EXEC : npm error Lifecycle script `integration-test` failed with error :  [/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj]
/mnt/vss/_work/1/s/eng/Npm.Workspace.FunctionalTests.nodeproj(28,5): error MSB3073: The command "npm run integration-test" exited with code 1.

Steps to Reproduce

Don't know how to repro. Binary log on request, but I think this may start with code inspection

Expected Behavior

.

Actual Behavior

.

Analysis

No response

Versions & Configurations

No response

@danmoseley
Copy link
Member Author

This comment is suggestive?

9342681#diff-7f217b4ccb76592a2ab78dd7f8332509dfa2e2216d8a6032f956cbdf48df8d03R174

@JanKrivanek

@danmoseley
Copy link
Member Author

Minor cleanup around this logging you are welcome to take. https://github.com/dotnet/msbuild/compare/main...danmoseley:msbuild:contextid.msg?expand=1

@danmoseley
Copy link
Member Author

Occurs to me: it might be good for this exception message to include the string that would have been logged. Will provide a clue when root causing.

@maridematte maridematte added Priority:2 Work that is important, but not critical for the release triaged labels Dec 10, 2024
@JanKrivanek JanKrivanek self-assigned this Jan 7, 2025
@YuliiaKovalova
Copy link
Member

It can be the same thing: #10176

@YuliiaKovalova
Copy link
Member

mapping_error.zip
@JanKrivanek binlog with the error captured.

@JanKrivanek JanKrivanek linked a pull request Jan 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:2 Work that is important, but not critical for the release triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants