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

AV in R2R SingleFile ASP.NET Core 9.0 app #94929

Closed
BrennanConroy opened this issue Nov 17, 2023 · 1 comment
Closed

AV in R2R SingleFile ASP.NET Core 9.0 app #94929

BrennanConroy opened this issue Nov 17, 2023 · 1 comment
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Comments

@BrennanConroy
Copy link
Member

BrennanConroy commented Nov 17, 2023

Description

We get a consistent AV on Linux and Windows, Windows shows logs:

[09:28:24 INF] [STDERR] Process terminated. Encountered infinite recursion while looking up resource 'Arg_AccessViolationException' in System.Private.CoreLib. Verify the installation of .NET is complete and does not need repairing, and that the state of the process has not become corrupted.
[09:28:24 INF] [STDERR] at System.Environment.FailFast(System.String)
[09:28:24 INF] [STDERR] at System.SR.InternalGetResourceString(System.String)
[09:28:24 INF] [STDERR] at System.SR.GetResourceString(System.String)
[09:28:24 INF] [STDERR] at System.AccessViolationException..ctor()
[09:28:24 INF] [STDERR] at System.Array.InternalCreate(System.RuntimeType, Int32, Int32*, Int32*)
[09:28:24 INF] [STDERR] at System.Array.CreateInstance(System.Type, Int32)
[09:28:24 INF] [STDERR] at System.Reflection.CustomAttribute.CreateAttributeArrayHelper(System.RuntimeType, Int32)
[09:28:24 INF] [STDERR] at System.Reflection.CustomAttribute.GetCustomAttributes(System.Reflection.RuntimeModule, Int32, Int32, System.RuntimeType)
[09:28:24 INF] [STDERR] at System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, Boolean)
[09:28:24 INF] [STDERR] at System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, Boolean)
[09:28:24 INF] [STDERR] at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]
[09:28:24 INF] [STDERR] at System.Resources.ResourceManager.CommonAssemblyInit()
[09:28:24 INF] [STDERR] at System.Resources.ResourceManager..ctor(System.Type)
[09:28:24 INF] [STDERR] at System.SR.get_ResourceManager()
[09:28:24 INF] [STDERR] at System.SR.InternalGetResourceString(System.String)
[09:28:24 INF] [STDERR] at System.SR.GetResourceString(System.String)
[09:28:24 INF] [STDERR] at System.AccessViolationException..ctor()
[09:28:24 INF] [STDERR] at System.Array.InternalCreate(System.RuntimeType, Int32, Int32*, Int32*)
[09:28:24 INF] [STDERR] at System.Array.CreateInstance(System.Type, Int32)
[09:28:24 INF] [STDERR] at System.Reflection.CustomAttribute.CreateAttributeArrayHelper(System.RuntimeType, Int32)
[09:28:24 INF] [STDERR] at System.Reflection.CustomAttribute.GetCustomAttributes(System.Reflection.RuntimeModule, Int32, Int32, System.RuntimeType)
[09:28:24 INF] [STDERR] at System.Reflection.CustomAttribute.GetCustomAttributes(System.RuntimeType, System.RuntimeType, Boolean)
[09:28:24 INF] [STDERR] at System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, Boolean)
[09:28:24 INF] [STDERR] at System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, Boolean)
[09:28:24 INF] [STDERR] at System.Diagnostics.Tracing.EventSource.GetCustomAttributeHelper(System.Reflection.MemberInfo, System.Type, System.Diagnostics.Tracing.EventManifestOptions)
[09:28:24 INF] [STDERR] at System.Diagnostics.Tracing.EventSource.GetGuid(System.Type)
[09:28:24 INF] [STDERR] at System.Diagnostics.Tracing.EventSource..ctor(System.Diagnostics.Tracing.EventSourceSettings, System.String[])
[09:28:24 INF] [STDERR] at System.Diagnostics.DiagnosticSourceEventSource..cctor()
[09:28:24 INF] [STDERR] at System.Diagnostics.DiagnosticListener..ctor(System.String)
[09:28:24 INF] [STDERR] at Microsoft.Extensions.Hosting.HostBuilder.LogHostBuilding(Microsoft.Extensions.Hosting.HostApplicationBuilder)
[09:28:24 INF] [STDERR] at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
[09:28:24 INF] [STDERR] at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
[09:28:24 INF] [STDERR] at Program.

$(System.String[])

Commits between successful run and failing run: 4325acc...479df47

Reproduction Steps

Run

crank --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/goldilocks.benchmarks.yml --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/build/ci.profile.yml --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/steadystate.profile.yml --scenario basicminimalapipublishtrimr2rsinglefile --profile intel-win-app --profile intel-lin-load --profile amd-lin2-db --application.environmentVariables DOTNET_GCDynamicAdaptationMode=1 --application.framework net9.0 --application.options.collectCounters true --application.aspNetCoreVersion 9.0.0-alpha.1.23566.7 --application.runtimeVersion 9.0.0-alpha.1.23567.1 --application.sdkVersion 9.0.100-alpha.1.23566.3

with access to corpnet

Expected behavior

No crash

Actual behavior

Crash

Regression?

Yes

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 17, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 17, 2023
@jkotas
Copy link
Member

jkotas commented Nov 17, 2023

This is related to #88620.

This crash is caused by mismatched runtime packages. The repro uses old version single file host and new version of runtime pack. The single file host and the runtime pack versions must be always in sync. We do not support mixing and matching different versions of single file host and runtime pack.

This is same underlying problem as aspnet/Benchmarks#1448 and other issues linked to it. It will resolve itself over time once the new versions of all packages flow into all places. The underlying problem needs to be fixed in the Benchmarks repo setup.

@jkotas jkotas closed this as completed Nov 17, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Nov 17, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

No branches or pull requests

2 participants