Skip to content

[wasm] Inline array struct must have a single field. assembly:System.Private.Xml.dll type:<>y__InlineArray21 member:(null)` - perf run broken #93348

Closed

Description

@radical

Build breaking with:
System.TypeLoadException: Generic Type Definition failed to init, due to: Inline array struct must have a single field. assembly:System.Private.Xml.dll type:<>y__InlineArray21 member:(null)`.

// Found 1 benchmarks:
//   Xml_ToStream<LoginViewModel>.DataContractSerializer: Job-CLVCID(PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1)

// **************************
// Benchmark: Xml_ToStream<LoginViewModel>.DataContractSerializer: Job-CLVCID(PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1)
// *** Execute ***
// Launch: 1 / 1
// Execute: /home/helixbot/.jsvu/bin/v8-11.7.439 --experimental-wasm-eh --expose_wasm --module test-main.js -- --run Job-CLVCID.dll --benchmarkName MicroBenchmarks.Serializers.Xml_ToStream<LoginViewModel>.DataContractSerializer_ --job "PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1" --benchmarkId 8  in /home/helixbot/work/A7110921/w/A2D90931/e/performance/artifacts/bin/for-running/MicroBenchmarks/Job-CLVCID/bin/net8.0/browser-wasm/AppBundle
Failed to set up high priority. Make sure you have the right permissions. Message: Permission denied
Warning: unknown flag --experimental-wasm-eh.
Try --help for options
Incoming arguments: --run Job-CLVCID.dll --benchmarkName MicroBenchmarks.Serializers.Xml_ToStream<LoginViewModel>.DataContractSerializer_ --job PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1 --benchmarkId 8
Application arguments: --run Job-CLVCID.dll --benchmarkName MicroBenchmarks.Serializers.Xml_ToStream<LoginViewModel>.DataContractSerializer_ --job PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Arguments=/p:EnableUnsafeBinaryFormatterSerialization=true, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1 --benchmarkId 8
console.info: Initializing dotnet version 9.0.0-ci commit hash 4f77a1be7664422e97d9a1e7deb5e076872050cd
// BeforeAnythingElse
// Benchmark Process Environment Information:
// BenchmarkDotNet v0.13.9-nightly.20230908.70
// Runtime=.NET Core (Mono) 9.0.0-ci, Wasm AOT
// GC=Non-concurrent Workstation
// HardwareIntrinsics=
// Job: Job-FSHLXY(PowerPlanMode=00000000-0000-0000-0000-000000000000, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1)
OverheadJitting  1: 1 op, 41000.00 ns, 41.0000 us/op
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeLoadException: Generic Type Definition failed to init, due to: Inline array struct must have a single field. assembly:System.Private.Xml.dll type:<>y__InlineArray2`1 member:(null)
   at System.Xml.XmlException.BuildCharExceptionArgs(String , Int32 )
   at System.Xml.XmlConvert.CreateInvalidNameCharException(String name, Int32 index, ExceptionType exceptionType)
   at System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType)
   at System.Xml.XmlConvert.VerifyNCName(String name)
   at System.Runtime.Serialization.DataContracts.DataContract.IsValidNCName(String name)
   at System.Runtime.Serialization.DataContracts.DataContract.EncodeLocalName(String localName)
   at System.Runtime.Serialization.DataContracts.ClassDataContract.ClassDataContractCriticalHelper.ImportDataMembers()
   at System.Runtime.Serialization.DataContracts.ClassDataContract.ClassDataContractCriticalHelper..ctor(Type )
   at System.Runtime.Serialization.DataContracts.ClassDataContract..ctor(Type )
   at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Type )
   at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Int32 , RuntimeTypeHandle , Type )
   at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.GetDataContractSkipValidation(Int32 , RuntimeTypeHandle , Type )
   at System.Runtime.Serialization.DataContracts.DataContract.GetDataContractSkipValidation(Int32 id, RuntimeTypeHandle typeHandle, Type type)
   at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(RuntimeTypeHandle typeHandle)
   at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(Type type)
   at System.Runtime.Serialization.DataContractSerializer.get_RootContract()
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteStartObject(XmlWriterDelegator , Object )
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator , Object , DataContractResolver )
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator , Object , DataContractResolver )
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator , Object )
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter , Object )
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(Stream , Object )
   at MicroBenchmarks.Serializers.Xml_ToStream`1[[MicroBenchmarks.Serializers.LoginViewModel, MicroBenchmarks, Version=42.42.42.42, Culture=neutral, PublicKeyToken=null]].DataContractSerializer_()
   at BenchmarkDotNet.Autogenerated.Runnable_8.WorkloadActionNoUnroll(Int64 invokeCount)
   at BenchmarkDotNet.Engines.Engine.RunIteration(IterationData data)
   at BenchmarkDotNet.Engines.EngineFactory.Jit(Engine engine, Int32 jitIndex, Int32 invokeCount, Int32 unrollFactor)
   at BenchmarkDotNet.Engines.EngineFactory.CreateReadyToRun(EngineParameters engineParameters)
   at BenchmarkDotNet.Autogenerated.Runnable_8.Run(IHost host, String benchmarkName)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object , Span`1 , BindingFlags )
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object , Span`1 , BindingFlags )
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object , BindingFlags , Binder , Object[] , CultureInfo )
   at System.Reflection.RuntimeMethodInfo.Invoke(Object , BindingFlags , Binder , Object[] , CultureInfo )
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(String[] args)
  • commit used by the run - 4f77a1b .

@stephentoub this might be related to your #93126 .

Known Issue Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": "Generic Type Definition failed to init, due to: Inline array struct must have a single field. assembly:System.Private.Xml.dll",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng/internal/_build/results?buildId=2288099
Error message validated: Generic Type Definition failed to init, due to: Inline array struct must have a single field. assembly:
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 10/11/2023 4:48:03 PM UTC

Report

Build Definition Test Pull Request
2292216 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2291705 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2291604 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2291523 dotnet-runtime release.Partition5.WorkItemExecution
2291453 dotnet-runtime release.Partition5.WorkItemExecution
2291400 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2291286 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2291241 dotnet-runtime release.Partition5.WorkItemExecution
2290798 dotnet-runtime release.Partition5.WorkItemExecution
2290584 dotnet-runtime release.Partition5.WorkItemExecution
2290376 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2289976 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2289669 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2289425 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2289197 dotnet-runtime release.Partition5.WorkItemExecution
2288937 dotnet-runtime release.Partition5.WorkItemExecution
2288782 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2288537 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution
2288099 dotnet-runtime wasm.x64.micro.net9.0.Partition5.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 9 19

Activity

  1. added
    arch-wasm
    blocking-clean-ci
    perf-pipeline
    on Oct 11, 2023
  2. ghost added
    untriaged
    on Oct 11, 2023
  3. added
    Known Build Error
    on Oct 11, 2023
  4. radical commented on Oct 12, 2023

    @radical
    MemberAuthor
  5. radical commented on Oct 12, 2023

    @radical
    MemberAuthor

    Other related failures:

    // Benchmark: Perf_Array.ArrayRetrieve3D
    ...
    
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
     ---> System.TypeLoadException: Generic Type Definition failed to init, due to: Inline array struct must have a single field. assembly:System.Private.CoreLib.dll type:<>y__InlineArray3`1 member:(null)
       at System.Tests.Perf_Array.SetupArrayRetrieve3D()
       at BenchmarkDotNet.Engines.EngineFactory.CreateReadyToRun(EngineParameters engineParameters)
       at BenchmarkDotNet.Autogenerated.Runnable_128.Run(IHost host, String benchmarkName)
       at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
       at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object , Span`1 , BindingFlags )
       --- End of inner exception stack trace ---
       at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object , Span`1 , BindingFlags )
       at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object , BindingFlags , Binder , Object[] , CultureInfo )
       at System.Reflection.RuntimeMethodInfo.Invoke(Object , BindingFlags , Binder , Object[] , CultureInfo )
       at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
       at BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(String[] args)
    
  6. changed the title [-][wasm] Perf runs broken with `Generic Type Definition failed to init, due to: Inline array struct must have a single field. assembly:System.Private.Xml.dll type:<>y__InlineArray2`1 member:(null)`[/-] [+][wasm] `Inline array struct must have a single field. assembly:System.Private.Xml.dll type:<>y__InlineArray2`1 member:(null)` - perf run broken[/+] on Oct 12, 2023
  7. lewing commented on Oct 16, 2023

    @lewing
    Member
  8. lewing commented on Oct 16, 2023

    @lewing
    Member

    @BrzVlad appears to be only happening on the interpreter

  9. 1 remaining item

  10. stephentoub commented on Oct 16, 2023

    @stephentoub
    Member

    I expect it's related to trimming; most likely the field in the struct is getting linked away.

    Is dotnet/performance using a linker that has #92060 ?

  11. radical commented on Oct 16, 2023

    @radical
    MemberAuthor

    Is dotnet/performance using a linker that has #92060 ?

    The build uses a sdk updated with nugets for wasm-tools from the built output. But the linker version is set separately in the sdk an thus:
    Importing project "/home/helixbot/work/BCB109B6/w/B12F096C/e/performance/artifacts/packages/microsof t.net.illink.tasks/8.0.0-rc.1.23414.4/build/Microsoft.NET.ILLink.Tasks.props" into project "/home/helixbot/work/BCB109B 6/w/B12F096C/e/performance/artifacts/obj/BenchmarkDotNet.Autogenerated/BenchmarkDotNet.Autogenerated.csproj.nuget.g.pro ps"

    .. so it's using an older linker :(

  12. lambdageek commented on Oct 16, 2023

    @lambdageek
    Member

    The backport (#92107) only made it to RC2, not RC1, looks like

  13. radical commented on Oct 16, 2023

    @radical
    MemberAuthor

    Ideally it should be using the linker from the built output (which would be main), same as we are doing for the whole workload. But linker versions are not included in the workload right now. I guess, I need to specifically override the version :/

  14. radical commented on Oct 16, 2023

    @radical
    MemberAuthor

    Sdk has:

        <KnownILLinkPack Include="Microsoft.NET.ILLink.Tasks"
                         TargetFramework="net8.0"
                         ILLinkPackVersion="8.0.0-rc.1.23414.4" />
    
  15. self-assigned this
    on Oct 17, 2023
  16. removed
    untriaged
    on Oct 17, 2023
  17. radical commented on Oct 20, 2023

    @radical
    MemberAuthor

    This is now fixed because we finally got an installer with the updated linker. But the base issue remains for which I have opened #93789 .

  18. removed
    blocking-clean-ci
    Known Build Error
    on Oct 20, 2023
  19. ghost locked as resolved and limited conversation to collaborators on Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-Infrastructure-monoperf-pipeline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions