corert icon indicating copy to clipboard operation
corert copied to clipboard

Error when publish

Open DenMpei opened this issue 5 years ago • 5 comments

Good morning! Sometimes, such an error occurs when publishing (dotnet publish -c Release -r win-x64). They in no way treated, but disappears by itself after a while. Prompt, what to see and how to fix? Microsoft.DotNet.ILCompiler package version: 1.0.0-alpha-28327-01, but I tried on 1.0.0-alpha-28510-01

Generating compatible native code. To optimize for size or speed, visit https://aka.ms/OptimizeCoreRT 16:06:21 EXEC : warning : RD.XML processing will change before release (https://github.com/dotnet/corert/issues/5001) [D:\Jenkins\workspace\Project.csproj] 16:06:21 EXEC : error : External component has thrown an exception. [D:\Jenkins\workspace\Project.csproj] 16:06:21 System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception. 16:06:21 at ILCompiler.DependencyAnalysis.ObjectWriter.FinishObjWriter(IntPtr objWriter) 16:06:21 at ILCompiler.DependencyAnalysis.ObjectWriter.EmitObject(String objectFilePath, IEnumerable`1 nodes, NodeFactory factory, IObjectDumper dumper) 16:06:21 at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String outputFile, ObjectDumper dumper) 16:06:22 at ILCompiler.Program.Run(String[] args) 16:06:22 at ILCompiler.Program.Main(String[] args) 16:06:22 C:\Users\rpt-virtual.nuget\packages\microsoft.dotnet.ilcompiler\1.0.0-alpha-28327-01\build\Microsoft.NETCore.Native.targets(226,5): error MSB3073: The command ""C:\Users\user.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\1.0.0-alpha-28327-01\tools\ilc" @"obj\Release\netcoreapp2.2\win-x64\native\Project.ilc.rsp"" exited with code 1. [D:\Jenkins\workspace\Project.csproj]

DenMpei avatar Jan 13 '20 05:01 DenMpei

This is likely another manifestation of the ObjectWriter related crashes #7907 and #7926.

We know that it is related to the debug symbols generation. You can try to apply workaround from #7907 and see whether the issue will go away. If it goes away, it will suggest that it is the same underlying problem.

We were not able get to the bottom of this issue. If there is anything you can share to with it - access to reliable repro or dump of the crashed compiler - we will be very grateful.

jkotas avatar Jan 13 '20 05:01 jkotas

"You can try to apply workaround from #7907" - Good. As soon as the failure repeats, I'll try a workaround

DenMpei avatar Jan 13 '20 06:01 DenMpei

Unfortunately, the error continues to appear even after adding code to bypass it. What do you need for a more detailed analysis?

DenMpei avatar Jan 17 '20 05:01 DenMpei

A dump of the crash would be the most useful. Are you comfortable sharing it with us? Note that the dump will likely contain binaries of your app.

If yes, here is how to collect the dump:

  • Enable crash dump collection for ilc.exe using registry keys https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
  • Share the dump (e.g. you can save it on onedrive and share link to it with me via emai)

jkotas avatar Jan 17 '20 06:01 jkotas

Good. But it may not be soon. The error is floating.

DenMpei avatar Jan 17 '20 07:01 DenMpei