-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Description
testhost/CoreRun sometimes crashes for a blank console app.
Reproduction Steps
- Clone the latest repo and build it using
build -rc Debug. - Use
testhost\CoreRunto run a blank Console App (dll).
The crash doesn't always happen.
Expected behavior
CoreRun runs without issues.
Actual behavior
CoreRun crashes.
stack
Process terminated. Assertion failed. at System.Diagnostics.Tracing.CounterGroup.OnEventSourceCommand(Object sender, EventCommandEventArgs e) at System.Diagnostics.Tracing.EventSource.add_EventCommandExecuted(EventHandler`1 value) at System.Diagnostics.Tracing.CounterGroup.RegisterCommandCallback() at System.Diagnostics.Tracing.CounterGroup..ctor(EventSource eventSource) at System.Diagnostics.Tracing.CounterGroup.GetCounterGroup(EventSource eventSource) at System.Diagnostics.Tracing.DiagnosticCounter.Publish() at System.Diagnostics.Tracing.PollingCounter..ctor(String name, EventSource eventSource, Func`1 metricProvider) at System.Diagnostics.Tracing.RuntimeEventSource.OnEventCommand(EventCommandEventArgs command) at System.Diagnostics.Tracing.EventSource.DoCommand(EventCommandEventArgs commandArgs) at System.Diagnostics.Tracing.EventSource.Initialize(Guid eventSourceGuid, String eventSourceName, String[] traits) at System.Diagnostics.Tracing.EventSource..ctor(Guid eventSourceGuid, String eventSourceName, EventSourceSettings settings, String[] traits) at System.Diagnostics.Tracing.RuntimeEventSource..ctor() at System.Diagnostics.Tracing.RuntimeEventSource.Initialize() at System.StartupHookProvider.ManagedStartup(Char* pDiagnosticStartupHooks)
Regression?
I never run into such issues in the past half a year. It started after I updated the local repo to the latest last afternoon.
Known Workarounds
Rebooting Windows usually resolves the issue. But sometimes it occurs again after a period of usage.
Configuration
Local .NET: 8 RC1
OS: Windows 10 x64 22H2
Other information
Visual Studio debugger shows the assertion here fails.
runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs
Line 50 in 0976df5
| Debug.Assert(e.Command == EventCommand.Enable || e.Command == EventCommand.Disable); |
the unhandled Update seems coming from:
runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs
Line 810 in 0976df5
| ControllerCommand command = ControllerCommand.Update; |
