Skip to content

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

@BrennanConroy

Description

@BrennanConroy

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://github.com/raw/aspnet/Benchmarks/main/scenarios/goldilocks.benchmarks.yml --config https://github.com/raw/aspnet/Benchmarks/main/build/ci.profile.yml --config https://github.com/raw/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions