PetaPoco performance tests fail when running on net6.0
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
Hello,
When running PetaPoco performance test on net6.0, instead of a successful run, we get an exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.InvalidProgramException: Common Language Runtime detected an invalid program.
at System.Runtime.CompilerServices.RuntimeHelpers.CompileMethod(RuntimeMethodHandleInternal method)
at System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType)
at PetaPoco.Database.PocoData.GetFactory[T](String key, Boolean ForceDateTimesToUtc, IDataReader r) in /_/benchmarks/Dapper.Tests.Performance/PetaPoco/PetaPoco.cs:line 1248
at PetaPoco.Database.Fetch[T](String sql, Object[] args) in /_/benchmarks/Dapper.Tests.Performance/PetaPoco/PetaPoco.cs:line 472
at Dapper.Tests.Performance.PetaPocoBenchmarks.FetchFast() in /_/benchmarks/Dapper.Tests.Performance/Benchmarks.PetaPoco.cs:line 38
at BenchmarkDotNet.Autogenerated.Runnable_0.WorkloadActionUnroll(Int64 invokeCount) in /_/benchmarks/Dapper.Tests.Performance/bin/Release/net6.0/5531dc99-89b7-4dd0-97ef-7fcc70a75721/5531dc99-89b7-4dd0-97ef-7fcc70a75721.notcs:line 950
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_0.Run(IHost host, String benchmarkName) in /_/benchmarks/Dapper.Tests.Performance/bin/Release/net6.0/5531dc99-89b7-4dd0-97ef-7fcc70a75721/5531dc99-89b7-4dd0-97ef-7fcc70a75721.notcs:line 167
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span``1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(String[] args) in /_/benchmarks/Dapper.Tests.Performance/bin/Release/net6.0/5531dc99-89b7-4dd0-97ef-7fcc70a75721/5531dc99-89b7-4dd0-97ef-7fcc70a75721.notcs:line 47
Steps to reproduce:
- Add support for
net6.0toDapper/Dapper.StrongNameprojects (see commits https://github.com/DapperLib/Dapper/commit/5b7be2a2b89866404eacdea7e156d1211eee7dd4 and https://github.com/DapperLib/Dapper/commit/4865c078ad327c3de2ab9926495583bdab721e58 - Add support for
net6.0toDapper.Performance.Tests(see WIP commit: https://github.com/DapperLib/Dapper/commit/ac333ec84fa2b02a5da5a9d5d52d17d36f1f1186) - run command
dotnet run --project .\benchmarks\Dapper.Tests.Performance\ -c Release -f net6.0 -- --filter *PetaPocoBenchmarks* --join - Notice the error being thrown
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the reported dotnet command for Dapper.Tests.Performance with the PetaPocoBenchmarks filter and net6.0 target. Trace the failure from Benchmarks.PetaPoco.cs line 38 into PetaPoco/PetaPoco.cs line 1248, then verify that the benchmark completes successfully on net6.0 without the InvalidProgramException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- performance, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100