runtime: COMPlus_PartialNGen is not being set since repo consolidation
we are setting this flag _partialCrossgenFlag for some assemblies here https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk/targets/framework.dependency.targets#L427-L431
Before this change these lines of code was never been executed https://github.com/dotnet/arcade/pull/4911 becuase $(OSGroup) can never be linux in installer. we either set it to unix or osx https://github.com/dotnet/runtime/blob/master/src/installer/Directory.Build.props#L63
The failure due to this flag being set can be found in https://github.com/dotnet/runtime/pull/32858
the failure message is
Error compiling /root/runtime/artifacts/bin/pkg/netcoreapp5.0/runtime/Linux-Debug-x64/System.ComponentModel.TypeConverter.dll: Cannot compile using the PartialNgen flag because no IBC data was found. (0x8013200C)
I checked the flag value and its being set to 1
This was introduced in https://github.com/dotnet/core-setup/pull/5252 @MichalStrehovsky can you take a look and help me fix this ?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 41 (41 by maintainers)
we will be looking into supporting partial R2R scenario for the composite scenario, but will track it as a separate user story.
I did some more analysis of the data I was collecting. This will be important for .NET 7 but I think we can consider the ship sailed on this for .NET 6.
@ViktorHofer @brianrob looks like this one flew under the radar once more. Is this something that should still be considered for 6.0?
Yes, that seems like a reasonable way to go. I know there was some work done in the 3.1 timeframe around Docker images specifically on Linux, so do make sure that you look at Linux size as well as Windows.
I took a look at the official build and it doesn’t seem like we are hitting this code on the official build as well. Not sure which target is responsible for embedding the ibc data to dlls
We specifically added this error message because release builds were making it out into the wild without IBC data, and thus partial NGEN resulted in no pre-compilation. I wouldn’t want to go back to a world where that’s a possibility. Without having dug too much into the targets here, I’m not sure there’s a great answer here. The invariant we want to hold true is that we always call crossgen -partialNGEN for assemblies that we should partial NGEN and if that fails due to missing IBC data, then that’s a bug we need to fix.