-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Description
When testing the 3rd party apps with the latest .NET 8.0 Preview 6 SDK build, multiple apps (6 apps in our Lab) were affected and reported error: 'Fatal error. Internal CLR error. (0x80131506)' when launching or running.
Application Name: EventStore, SmartStore, grandnode, GoNorth, grandnode2, globaltools
OS: Windows 10 21H2
CPU: X64
.NET Build Number: dotnet-sdk-8.0.100-preview.6.23316.32
App Github Link: https://github.com/EventStore/EventStore
Serilog.Expression Source: Releases · serilog/serilog-expressions (github.com)
or checking the app source at https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1839140
Reproduction Steps
Minimal Repro steps (Demo attached): InternalCLRDemo.zip
- Create a default Console project.
- Reference Package: Serilog.Expressions.
- Write the following code in Program.cs.
using Serilog.Templates;
using Serilog.Templates.Themes;
var test = new ExpressionTemplate("[{@t:HH:mm:ss} {@l:u3}", theme: TemplateTheme.Code);
- Build the project.
- Change the runtime.config file to let the app run against with dotnet-sdk-8.0.100-preview.6.23316.32
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-preview.6.23316.3"
}
- Launch the demo app.
Expected behavior
App will launch success.
Actual behavior
Launch failed with exception "System.ExecutionEngineException: 'Exception of type 'System.ExecutionEngineException' was thrown.'" and the following error:
Fatal error. Internal CLR error. (0x80131506)
at Serilog.Templates.Compilation.UnreferencedProperties.TemplateReferencedPropertiesFinder..ctor()
at Serilog.Templates.Compilation.UnreferencedProperties.UnreferencedPropertiesFunction..ctor(Serilog.Templates.Ast.Template)
at Serilog.Templates.Compilation.TemplateFunctionNameResolver.Build(Serilog.Expressions.NameResolver, Serilog.Templates.Ast.Template)
at Serilog.Templates.ExpressionTemplate..ctor(System.String, System.IFormatProvider, Serilog.Expressions.NameResolver, Serilog.Templates.Themes.TemplateTheme, Boolean)
at Program.<Main>$(System.String[])
Regression?
Yes.
Verify Scenarios:
- Windows10 21h2 x64 + dotnet-sdk-8.0.100-preview.6.23316.32: Fail
- Windows10 21h2 x64 + dotnet-sdk-6.0.410(default): Pass
- Windows10 21h2 x64 + dotnet-sdk-8.0.100-preview.6.23312.5: Pass
Known Workarounds
No response
Configuration
No response
Other information
App Repro steps:
The machine only has dotnet-sdk-8.0.100-preview.6.23316.32 installed and DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX set as 2.
- Open CMD, input command “cd \EventStore\App”.
- Input command “dotnet EventStore.ClusterNode.dll --insecure --db ./tmp/data --index ./tmp/index --log ./tmp/log -runprojections all --startstandardprojections --EnableAtomPubOverHttp”.
Expected Result:
launch the app successfully.
Actual Result:
Launch the app failed with the following error:
Fatal error. Internal CLR error. (0x80131506)
at Serilog.Templates.Compilation.UnreferencedProperties.TemplateReferencedPropertiesFinder..ctor()
at Serilog.Templates.Compilation.UnreferencedProperties.UnreferencedPropertiesFunction..ctor(Serilog.Templates.Ast.Template)
at Serilog.Templates.Compilation.TemplateFunctionNameResolver.Build(Serilog.Expressions.NameResolver, Serilog.Templates.Ast.Template)
at Serilog.Templates.ExpressionTemplate..ctor(System.String, System.IFormatProvider, Serilog.Expressions.NameResolver, Serilog.Templates.Themes.TemplateTheme, Boolean)
at EventStore.Common.Log.EventStoreLoggerConfiguration+<>c__DisplayClass16_0.<.ctor>g__Stats|3(Serilog.LoggerConfiguration)
at Serilog.Configuration.LoggerSinkConfiguration.Logger(System.Action`1<Serilog.LoggerConfiguration>, Serilog.Events.LogEventLevel, Serilog.Core.LoggingLevelSwitch)
at EventStore.Common.Log.EventStoreLoggerConfiguration+<>c__DisplayClass16_0.<.ctor>b__7(Serilog.LoggerConfiguration)
at Serilog.Configuration.LoggerSinkConfiguration.Logger(System.Action`1<Serilog.LoggerConfiguration>, Serilog.Events.LogEventLevel, Serilog.Core.LoggingLevelSwitch)
at EventStore.Common.Log.EventStoreLoggerConfiguration+<>c__DisplayClass16_0.<.ctor>g__AsyncSink|0(Serilog.Configuration.LoggerSinkConfiguration)
at Serilog.Configuration.LoggerSinkConfiguration.Wrap(Serilog.Configuration.LoggerSinkConfiguration, System.Func`2<Serilog.Core.ILogEventSink,Serilog.Core.ILogEventSink>, System.Action`1<Serilog.Configuration.LoggerSinkConfiguration>, Serilog.Events.LogEventLevel, Serilog.Core.LoggingLevelSwitch)
at Serilog.LoggerConfigurationAsyncExtensions.Async(Serilog.Configuration.LoggerSinkConfiguration, System.Action`1<Serilog.Configuration.LoggerSinkConfiguration>, Serilog.Sinks.Async.IAsyncLogEventSinkMonitor, Int32, Boolean)
at Serilog.LoggerConfigurationAsyncExtensions.Async(Serilog.Configuration.LoggerSinkConfiguration, System.Action`1<Serilog.Configuration.LoggerSinkConfiguration>, Int32, Boolean)
at EventStore.Common.Log.EventStoreLoggerConfiguration..ctor(System.String, System.String, Microsoft.Extensions.Configuration.IConfigurationRoot, EventStore.Common.Options.LogConsoleFormat, Serilog.RollingInterval, Int32, Int32, Boolean)
at EventStore.Common.Log.EventStoreLoggerConfiguration.Default(System.String, System.String, Microsoft.Extensions.Configuration.IConfigurationRoot, EventStore.Common.Options.LogConsoleFormat, Serilog.RollingInterval, Int32, Int32, Boolean)
at EventStore.Common.Log.EventStoreLoggerConfiguration.Initialize(System.String, System.String, EventStore.Common.Options.LogConsoleFormat, Int32, Serilog.RollingInterval, Int32, Boolean, System.String)
at EventStore.ClusterNode.Program+<Main>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef)
at EventStore.ClusterNode.Program.Main(System.String[])
at EventStore.ClusterNode.Program.<Main>(System.String[])
@dotnet-actwx-bot @dotnet/compat