Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
radical opened this issue Oct 11, 2023 · 14 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-Infrastructure-mono perf-pipeline Issues with dotnet-runtime-perf, or runtime-wasm-perf pipelines

Comments

@radical
Copy link
Member

radical commented Oct 11, 2023

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
@radical radical added arch-wasm WebAssembly architecture blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' perf-pipeline Issues with dotnet-runtime-perf, or runtime-wasm-perf pipelines labels Oct 11, 2023
@ghost
Copy link

ghost commented Oct 11, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

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 .

Author: radical
Assignees: -
Labels:

arch-wasm, blocking-clean-ci, perf-pipeline

Milestone: -

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 11, 2023
@radical radical added the Known Build Error Use this to report build issues in the .NET Helix tab label Oct 11, 2023
@radical
Copy link
Member Author

radical commented Oct 12, 2023

cc @tannergooding

@radical
Copy link
Member Author

radical commented Oct 12, 2023

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)

@radical radical 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__InlineArray21 member:(null)` [wasm] Inline array struct must have a single field. assembly:System.Private.Xml.dll type:<>y__InlineArray21 member:(null)` - perf run broken Oct 12, 2023
@lewing
Copy link
Member

lewing commented Oct 16, 2023

cc @lambdageek

@lewing
Copy link
Member

lewing commented Oct 16, 2023

@BrzVlad appears to be only happening on the interpreter

@ghost
Copy link

ghost commented Oct 16, 2023

Tagging subscribers to this area: @BrzVlad, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

Issue Details

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
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
3 18 18
Author: radical
Assignees: -
Labels:

arch-wasm, area-Serialization, blocking-clean-ci, untriaged, area-Codegen-Interpreter-mono, Known Build Error, perf-pipeline

Milestone: -

@lambdageek
Copy link
Member

I dont' see how this could be related to the interpreter - this code isn't really execution-engine specific. Although it might be affected by trimming.

@stephentoub
Copy link
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 ?

@radical
Copy link
Member Author

radical commented Oct 16, 2023

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 :(

@lambdageek
Copy link
Member

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

@radical
Copy link
Member Author

radical commented Oct 16, 2023

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 :/

@radical
Copy link
Member Author

radical commented Oct 16, 2023

Sdk has:

    <KnownILLinkPack Include="Microsoft.NET.ILLink.Tasks"
                     TargetFramework="net8.0"
                     ILLinkPackVersion="8.0.0-rc.1.23414.4" />

@ghost
Copy link

ghost commented Oct 17, 2023

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

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
1 19 19
Author: radical
Assignees: -
Labels:

arch-wasm, blocking-clean-ci, untriaged, area-Infrastructure-mono, Known Build Error, perf-pipeline

Milestone: -

@radical radical self-assigned this Oct 17, 2023
@radical radical removed the untriaged New issue has not been triaged by the area owner label Oct 17, 2023
@radical
Copy link
Member Author

radical commented Oct 20, 2023

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 .

@radical radical closed this as completed Oct 20, 2023
@radical radical removed blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Oct 20, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Infrastructure-mono perf-pipeline Issues with dotnet-runtime-perf, or runtime-wasm-perf pipelines
Projects
None yet
Development

No branches or pull requests

4 participants