runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[AMD64 Unix ELT] CoreCLR script 'runtest' gets 'System.TypeInitializationException' with COMPlus_JitELTHookEnabled=1

Open sergign60 opened this issue 9 years ago • 6 comments

[CoreCLR script 'runtest' gets 'System.TypeInitializationException' on Ubuntu x64 with the environment variable COMPlus_JitELTHookEnabled=1

The message is

Running init-tools.sh
Tools are already initialized

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.InternalAbstractions.RuntimeEnvironment' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.InternalAbstractions.Native.PlatformApis' threw an exception. ---> System.InvalidProgramException: Common Language Runtime detected an invalid program.
   at System.Lazy`1..ctor(Func`1 valueFactory)
   at Microsoft.DotNet.InternalAbstractions.Native.PlatformApis..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.InternalAbstractions.RuntimeEnvironment..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.InternalAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
   at Microsoft.DotNet.Cli.MulticoreJitProfilePathCalculator.CalculateProfileRootPath()
   at Microsoft.DotNet.Cli.MulticoreJitActivator.StartCliProfileOptimization()
   at Microsoft.DotNet.Cli.MulticoreJitActivator.TryActivateMulticoreJit()
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
Failed to query runtime Id

both on Debug and Checked builds.

The used command line is

$ coreclr/tests/runtest.sh --testRootDir=~/coreclr/Tests --testNativeBinDir="./coreclr/bin/obj/Linux.x64.Checked/tests" --coreClrBinDir="./coreclr/bin/Product/Linux.x64.Checked" --coreFxBinDir="~/corefx/bin/runtime/netcoreapp-Linux-Debug-x64"

The used versions are of coreclr 25169926291fcdcad25506c558690a0f63e61a93 Move files to shared CoreLib partition (#10837) of corefx 39ca7d8683aa369f2b9ce8e95be50fda2d1011d9 Update ProjectNTfs, ProjectNTfsTestILC to beta-25210-00, beta-25210-00, respectively (#18131) test binaries - Artifacts of debug_windows_nt 1416

sergign60 avatar Apr 10 '17 10:04 sergign60

CC: @Dmitri-Botcharnikov @kvochko @janvorli @noahfalk

sergign60 avatar Apr 10 '17 10:04 sergign60

dotnet/coreclr#7719

sergign60 avatar Apr 10 '17 10:04 sergign60

dotnet/runtime#7825

sergign60 avatar Apr 10 '17 10:04 sergign60

dotnet/runtime#7306

sergign60 avatar Apr 10 '17 10:04 sergign60

https://github.com/dotnet/coreclr/pull/12603

sergign60 avatar Jul 03 '17 11:07 sergign60

The latest version of CoreCLR doesn't show this issue

sergign60 avatar Aug 22 '17 11:08 sergign60