runtime: Cross fails with exit code 139 against PowerShell Core 6 assembly System.Management.Automation.dll

Attempting to port PowerShell Core 6 to .Net Core 3.0 as part of https://github.com/PowerShell/PowerShell/pull/8370. Some assemblies get crossgen’d, but crossgen fails on System.Management.Automation.dll with exit code 139. Using /verbose there is no additional information indicating the non-zero error code. Seems to be succeeding on Windows, but fails on macOS and Linux. Using 3.0.100-preview-010184

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Change has been merged into master. Working on getting a CoreCLR official build.

The problem has been found, dotnet/coreclr#22437 has been opened to address the issue. I have verified I can complete the crossgen successfully with the fix.

Here is the stack trace of the crash, I’ve just executed the following command line that I’ve printed out in the powershell script: /home/janvorli/.nuget/packages/runtime.linux-x64.microsoft.netcore.app/3.0.0-preview-27324-5/tools/crossgen /MissingDependenciesOK /in /home/janvorli/git/PowerShell/src/powershell-unix/bin/Debug/netcoreapp3.0/linux-x64/publish/System.Management.Automation.dll /out /home/janvorli/git/PowerShell/src/powershell-unix/bin/Debug/netcoreapp3.0/linux-x64/publish/System.Management.Automation.ni.dll /Platform_Assemblies_Paths /home/janvorli/git/PowerShell/src/powershell-unix/bin/Debug/netcoreapp3.0/linux-x64/publish

(lldb) bt
* thread dotnet/coreclr#1, name = 'crossgen', stop reason = signal SIGSEGV: invalid address (fault address: 0xc)
  * frame #0: 0x00007ffff61f56c7 libclrjit.so`CodeGen::genStructPutArgUnroll(GenTreePutArgStk*) + 55
    frame dotnet/coreclr#1: 0x00007ffff61eeb5d libclrjit.so`CodeGen::genCodeForTreeNode(GenTree*) + 21853
    frame dotnet/coreclr#2: 0x00007ffff60a75f3 libclrjit.so`CodeGen::genGenerateCode(void**, unsigned int*) + 14915
    frame dotnet/coreclr#3: 0x00007ffff60c89f1 libclrjit.so`Compiler::compCompile(void**, unsigned int*, JitFlags*) + 52625
    frame dotnet/coreclr#4: 0x00007ffff60d2fec libclrjit.so`Compiler::compCompile(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*) + 7580
    frame dotnet/coreclr#5: 0x00007ffff60d56c1 libclrjit.so`jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*) + 2465
    frame dotnet/coreclr#6: 0x00007ffff60d6dc3 libclrjit.so`CILJit::compileMethod(ICorJitInfo*, CORINFO_METHOD_INFO*, unsigned int, unsigned char**, unsigned int*) + 131
    frame dotnet/coreclr#7: 0x0000000000686b40 crossgen`ZapInfo::CompileMethod() + 560
    frame dotnet/coreclr#8: 0x000000000067faab crossgen`ZapImage::TryCompileMethodWorker(CORINFO_METHOD_STRUCT_*, unsigned int, unsigned int) + 667
    frame dotnet/coreclr#9: 0x000000000067e767 crossgen`ZapImage::TryCompileMethodDef(unsigned int, unsigned int) + 199
    frame dotnet/coreclr#10: 0x000000000067ef36 crossgen`ZapImage::CompileColdRegion() + 166
    frame dotnet/coreclr#11: 0x000000000067f137 crossgen`ZapImage::Compile() + 23
    frame dotnet/coreclr#12: 0x00000000006791b5 crossgen`Zapper::CompileModule(CORINFO_MODULE_STRUCT_*, IMetaDataAssemblyEmit*) + 197
    frame dotnet/coreclr#13: 0x000000000067813c crossgen`Zapper::CompileAssembly(_GUID*) + 684
    frame dotnet/coreclr#14: 0x00000000006751b6 crossgen`Zapper::Compile(char16_t const*, _GUID*) + 198
    frame dotnet/coreclr#15: 0x0000000000674eae crossgen`NGenWorker + 510
    frame dotnet/coreclr#16: 0x00000000004ebb7d crossgen`wmain(int, char16_t**) + 3469
    frame dotnet/coreclr#17: 0x00000000004ec08e crossgen`main + 206
    frame dotnet/coreclr#18: 0x00007ffff6b63830 libc.so.6`__libc_start_main(main=(crossgen`main), argc=8, argv=0x00007fffffffe218, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007fffffffe208) at libc-start.c:291
    frame dotnet/coreclr#19: 0x00000000004e9cc3 crossgen`_start + 41

So it crashes in JIT. @dotnet/jit-contrib can someone take a look at this?