Skip to content

Platform benchmarks failing for .NET6.0 (System.TypeInitializationException) #1699

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

Closed
L2 opened this issue Sep 20, 2021 · 7 comments
Closed

Comments

@L2
Copy link

L2 commented Sep 20, 2021

For example:

crank --config "https://raw.githubusercontent.com/aspnet/Benchmarks/master/scenarios/platform.benchmarks.yml" --config foo --application.framework net6.0 --application.collectCounters true --application.startTimeout '00:15:00' --profile bar --scenario caching

Output:

[STDERR] Unhandled exception. System.TypeInitializationException: The type initializer for 'PlatformBenchmarks.BenchmarkApplication' threw an exception.
[STDERR]  ---> System.TypeLoadException: Method 'get_GeneratedSerializerOptions' in type 'JsonContext' from assembly 'PlatformBenchmarks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
[STDERR]    at PlatformBenchmarks.BenchmarkApplication..cctor()
[STDERR]    --- End of inner exception stack trace ---
[STDERR]    at PlatformBenchmarks.BenchmarkApplication.get_ApplicationName() in C:\Users\foo\AppData\Local\Temp\benchmarks-agent\benchmarks-server-bar\foo-bar\benchmarks\src\BenchmarksApps\Kestrel\PlatformBenchmarks\BenchmarkApplication.cs:line 17
[STDERR]    at PlatformBenchmarks.Program.Main(String[] args) in C:\Users\foo\AppData\Local\Temp\benchmarks-agent\benchmarks-server-bar\foo-bar\benchmarks\src\BenchmarksApps\Kestrel\PlatformBenchmarks\Program.cs:line 25
[STDERR]    at PlatformBenchmarks.Program.<Main>(String[] args)

Changing the framework to net5.0 seems to work fine.

I'm using the latest crank and crank-agent: version 0.2.0-alpha.21457.1

Thanks

@sebastienros
Copy link
Member

In net6.0 there is current an issue with recent changes (from this WE) that are breaking on rc2 and need to be applied in this repository. dotnet/runtime#59042

/cc @layomia

@L2
Copy link
Author

L2 commented Sep 28, 2021

Thanks @sebastienros and @layomia , is there anything I can do to help resolve this?

@sebastienros
Copy link
Member

It's fixed, you need to pickup the latest agent code.

@L2
Copy link
Author

L2 commented Sep 28, 2021

Thanks @sebastienros , do you know if the .nuget package for crank-agent will be updated as well?

dotnet tool update -g Microsoft.Crank.Agent --version "0.2.0-*" 

@sebastienros
Copy link
Member

My CI is currently broken (macOS issues). Will update the thread when it's fixed.

@sebastienros
Copy link
Member

It's on NuGet now.

@L2
Copy link
Author

L2 commented Sep 29, 2021

Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants