Repository navigation
Closed
Labels
area-VM-coreclrblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'linkable-frameworkIssues associated with delivering a linker friendly framework
Description
ILLink : error IL1012: IL Trimmer has encountered an unexpected error. Please report the issue at https://github.com/dotnet/linker/issues [D:\a\_work\1\s\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
##[error]ILLink(0,0): error IL1012: (NETCORE_ENGINEERING_TELEMETRY=Build) IL Trimmer has encountered an unexpected error. Please report the issue at https://github.com/dotnet/linker/issues
Fatal error in IL Linker
Unhandled exception. Mono.Linker.InternalErrorException: Step 'OutputStep' failed when processing assembly 'System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
---> Mono.Linker.LinkerFatalErrorException: ILLink: error IL1011: Failed to write 'D:\a\_work\1\s\artifacts\obj\coreclr\System.Private.CoreLib\x86\Debug\System.Private.CoreLib.dll'.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Mono.Cecil.PE.ByteBufferEqualityComparer.Equals(ByteBuffer x, ByteBuffer y)
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Mono.Cecil.Metadata.BlobHeapBuffer.GetBlobIndex(ByteBuffer blob)
at Mono.Cecil.MetadataBuilder.GetBlobIndex(ByteBuffer blob)
at Mono.Cecil.MetadataBuilder.GetBlobIndex(Byte[] blob)
at Mono.Cecil.MetadataBuilder.AddCustomDebugInformations(ICustomDebugInformationProvider provider)
at Mono.Cecil.MetadataBuilder.AddMethodDebugInformation(MethodDebugInformation method_info)
at Mono.Cecil.Cil.PortablePdbWriter.Write(MethodDebugInformation info)
at Mono.Cecil.Cil.CodeWriter.WriteResolvedMethodBody(MethodDefinition method)
at Mono.Cecil.Cil.CodeWriter.WriteMethodBody(MethodDefinition method)
at Mono.Cecil.MetadataBuilder.AddMethod(MethodDefinition method)
at Mono.Cecil.MetadataBuilder.AddMethods(TypeDefinition type)
at Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type)
at Mono.Cecil.MetadataBuilder.AddTypes()
at Mono.Cecil.MetadataBuilder.BuildTypes()
at Mono.Cecil.MetadataBuilder.BuildModule()
at Mono.Cecil.MetadataBuilder.BuildMetadata()
at Mono.Cecil.ModuleWriter.<>c.<BuildMetadata>b__2_0(MetadataBuilder builder, MetadataReader _)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.ModuleWriter.BuildMetadata(ModuleDefinition module, MetadataBuilder metadata)
at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
at Mono.Cecil.AssemblyDefinition.Write(String fileName, WriterParameters parameters)
at Mono.Linker.Steps.OutputStep.WriteAssembly(AssemblyDefinition assembly, String directory, WriterParameters writerParameters)
--- End of inner exception stack trace ---
at Mono.Linker.Steps.OutputStep.WriteAssembly(AssemblyDefinition assembly, String directory, WriterParameters writerParameters)
at Mono.Linker.Steps.OutputStep.WriteAssembly(AssemblyDefinition assembly, String directory)
at Mono.Linker.Steps.OutputStep.OutputAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.OutputStep.ProcessAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
--- End of inner exception stack trace ---
at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Mono.Linker.Driver.Run(ILogger customLogger, Boolean throwOnFatalLinkerException)
at Mono.Linker.Driver.Main(String[] args)
| Build | Kind | Start Time |
|---|---|---|
| 1813081 | Rolling | 2022-08-06 |
| 1814339 | Rolling | 2022-08-06 |
Metadata
Metadata
Assignees
Labels
area-VM-coreclrblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'linkable-frameworkIssues associated with delivering a linker friendly framework
Activity
radical commentedon May 20, 2022
cc @eerhardt
eerhardt commentedon May 20, 2022
@radical - has this happened on any other build than your PR? Does it repro in
main? If yes - do you have repro steps on what kind of build, and on what platform, this repros on?radical commentedon May 20, 2022
No, I have seen it only this one time.
eerhardt commentedon May 20, 2022
Are you sure the failure isn't caused by your changes? Can you repro it yourself with your changes?
radical commentedon May 20, 2022
It passed on the second attempt by azdo for the same commit of my branch. My PR has very few non-wasm specific changes, and this is not for a wasm run.
eerhardt commentedon May 20, 2022
Hmm, that's odd for a NRE in the linker to be non-deterministic. @agocke @vitek-karas @sbomer - thoughts?
7 remaining items
lewing commentedon Jun 3, 2022
Do we have a working theory for what is causing these?
radical commentedon Jun 3, 2022
The other recent linker exceptions - dotnet/linker#2789 , and #70031 .
eerhardt commentedon Jun 3, 2022
Or a way to get a trace dump so someone can investigate? Has anyone been able to repro this outside of CI?
vitek-karas commentedon Jun 3, 2022
As far as I know we haven't seen this outside of CI - and it's not very common in CI either (less than once a day). The current theory is that it's related to #68443.
For example here is a similar failure in crossgen2 (similar as in relatively random NRE): #69192
Problem is that crossgen2 and linker both run on the runtime which comes with the SDK and not with the runtime which is live built. So even though the possible cause of this has been fixed for a while, it can still show up for the tools.
As for the crash dump - we have discussed this a little, but I'll continue that discussion today. Right now I don't think we have a way to get a crash dump of these failures from the CI. And even locally it will be hard - it's an exception which is handled by the process, so one would have to run it under debugger to catch this.
lewing commentedon Jun 3, 2022
So to clarify, it looks like we're waiting on #70117 which @ViktorHofer would prefer not to land until p5 is officially released? How much confidence do we have that the fixes in p5 will resolve the issues?
maraf commentedon Jun 7, 2022
Another one on #20220603.2
mangod9 commentedon Jun 7, 2022
This doesnt appear to be the potential GC issue. @radical, Is there a dump available to look at?
radical commentedon Jun 7, 2022
I don't see one. Maybe @vitek-karas has an answer (ref: #69536 (comment)).
agocke commentedon Jun 7, 2022
AFAIK this is only happening in builds, and we don't collect crash dumps on build machines. However, we should change the linker to stop swallowing exceptions, dotnet/linker#2824
agocke commentedon Jun 17, 2022
If this was a GC hole, as we suspected, then Preview 5 is merged and this shouldn't happen anymore. Closing until we see new faliures.