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

How to debug code that is being compiled in layers? I have the following problem #94964

Closed
tangyanzhi opened this issue Nov 19, 2023 · 10 comments · Fixed by #105341
Closed

How to debug code that is being compiled in layers? I have the following problem #94964

tangyanzhi opened this issue Nov 19, 2023 · 10 comments · Fixed by #105341
Assignees
Labels
area-System.Diagnostics.Tracing in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@tangyanzhi
Copy link

tangyanzhi commented Nov 19, 2023

I compiled a dotnet/runtime source code, but when I debugged it, the following problems occurred:

how can i solve it

Version:

C:\Users\Administrator>dotnet --info
.NET SDK:
 Version:           8.0.100
 Commit:            57efcf1350
 Workload version:  8.0.100-manifests.6a1e483a

Envirmonent:
 OS Name:     Windows
 OS Version:  10.0.22621
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.100\

Questions are as follows:

Thread '.NET Tiered Compilation Worker' (0x37d0) exited with return value 0 (0x0).
---- DEBUG ASSERTION FAILED ----
----Assert Short Message----

----Assert Long Message----

 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()
CLR: Managed code called FailFast.
at System.Diagnostics.Tracing.CounterGroup.OnEventSourceCommand(Object sender, EventCommandEventArgs e)
at System.Diagnostics.Tracing.EventSource.add_EventCommandExecuted(EventHandler1 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, Func1 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()
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 19, 2023
@ghost
Copy link

ghost commented Nov 19, 2023

Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti
See info in area-owners.md if you want to be subscribed.

Issue Details

I compiled a dotnet/runtime source code, but when I debugged it, the following problems occurred:

how can i solve it

版本是:

C:\Users\Administrator>dotnet --info
.NET SDK:
 Version:           8.0.100
 Commit:            57efcf1350
 Workload version:  8.0.100-manifests.6a1e483a

运行时环境:
 OS Name:     Windows
 OS Version:  10.0.22621
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.100\

Questions are as follows:

Thread '.NET Tiered Compilation Worker' (0x37d0) exited with return value 0 (0x0).
---- DEBUG ASSERTION FAILED ----
----Assert Short Message----

----Assert Long Message----

 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()

CLR: Managed code called FailFast.
at System.Diagnostics.Tracing.CounterGroup.OnEventSourceCommand(Object sender, EventCommandEventArgs e)
at System.Diagnostics.Tracing.EventSource.add_EventCommandExecuted(EventHandler1 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, Func1 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()

Author: tangyanzhi
Assignees: -
Labels:

area-System.Diagnostics.Tracing

Milestone: -

@karakasa
Copy link
Contributor

karakasa commented Nov 19, 2023

probably related: #92519

@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label Nov 20, 2023
@tommcdon tommcdon added this to the 9.0.0 milestone Nov 20, 2023
@tommcdon
Copy link
Member

@davmason PTAL

@davmason
Copy link
Member

This looks like the same failure as #92519. I have been so far unable to repro this locally and understand what is happening. EventSource should translate the Update command to either an Enable or Disable before calling OnEventSourceCommand.

@tangyanzhi would you be able to run the failing app under a debugger, then take a crash dump when the failure happens and share that with me? Let me know if you need guidance.

@davmason davmason added the needs-author-action An issue or pull request that requires more info or actions from the author. label Nov 21, 2023
@ghost
Copy link

ghost commented Nov 21, 2023

This issue has been marked needs-author-action and may be missing some important information.

@tangyanzhi
Copy link
Author

This looks like the same failure as #92519. I have been so far unable to repro this locally and understand what is happening. EventSource should translate the Update command to either an Enable or Disable before calling OnEventSourceCommand.

@tangyanzhi would you be able to run the failing app under a debugger, then take a crash dump when the failure happens and share that with me? Let me know if you need guidance.

The problem is that I compiled dotnet/runtime and it exited directly after running it. The debugger reported no errors. So I can't provide you with dump information.

I saw the above problem in the output window of vs

When I change the CORE_LIBRARIES environment variable to .NET8 I get the error and when I change to .NET7 I also get the error. I restarted the computer and it was fine again.

Now I changed it back to .NET8 and tried again but couldn't reproduce and didn't get the error again.

I can't figure out what the problem is

@ghost ghost added needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration and removed needs-author-action An issue or pull request that requires more info or actions from the author. labels Nov 21, 2023
@tangyanzhi
Copy link
Author

tangyanzhi commented Nov 22, 2023

This looks like the same failure as #92519. I have been so far unable to repro this locally and understand what is happening. EventSource should translate the Update command to either an Enable or Disable before calling OnEventSourceCommand.

@tangyanzhi would you be able to run the failing app under a debugger, then take a crash dump when the failure happens and share that with me? Let me know if you need guidance.

The problem reappeared today. There is the following complete error message in the output window of vs.

Thread '.NET Tiered Compilation Worker' (0x4f20) exited with return value 0 (0x0).
'corerun.exe' (Win32): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.0\System.Threading.dll'.
'corerun.exe' (Win32): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.0\System.Memory.dll'.
---- DEBUG ASSERTION FAILED ----
----Assert Short Message----

----Assert Long Message----

     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()
CLR: Managed code called FailFast.
     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()
'corerun.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Symbols are loaded without source information.
Thread '.NET EventPipe' (0x3eac) exited with return value 2148734499 (0x80131623).
Thread 0x7280 exited with return value 2148734499 (0x80131623).
Thread 0x3c10 exited with return value 2148734499 (0x80131623).
Thread '.NET Tiered Compilation Worker' (0x3660) exited with return value 2148734499 (0x80131623).
Thread 0x2c80 exited with return value 2148734499 (0x80131623).
Thread '.NET Finalizer' (0x5f28) exited with return value 2148734499 (0x80131623).
Thread '.NET Debugger' (0x3d0) exited with return value 2148734499 (0x80131623).
Thread '.NET Counter Poller' (0x4004) exited with return value 2148734499 (0x80131623).
Program '[0x6878] corerun.exe' exited with return value 2148734499 (0x80131623).

@tangyanzhi
Copy link
Author

tangyanzhi commented Nov 22, 2023

I restarted my computer and tried running it, but the problem no longer occurs, which is unbelievable.

I feel that this problem occurs after the computer has been running for a period of time. After restarting, this problem no longer exists. back and forth cycle

@karakasa
Copy link
Contributor

karakasa commented Dec 4, 2023

@davmason I believe I have found a CoreRun dump of #92519. Is there a secured way of sending it to you?

However I cannot figure out the version of the CoreRun binary as my local WinDbg failed to match pdb files within my current testhost folder.

@bodong1987
Copy link

bodong1987 commented Dec 25, 2023

I had a similar problem trying to integrate the runtime into a C++ application, but I was using monoruntime when compiling the runtime.
I added the log and found that the reason was because some Update type Commands were added to m_deferredCommands in advance in EventSource.Initialize. When the code runs to CounterGroup.RegisterCommandCallback, it tries to trigger the command in m_deferredCommands, and then Assert is triggered. The following are all logs and how to print them:

public event EventHandler<EventCommandEventArgs>? EventCommandExecuted
{
    add
    {
        if (value == null)
            return;

        Debug.WriteLine($"EventSource[{GetHashCode()}] add new one {value}({value.GetHashCode()}) from {System.Environment.StackTrace}");

        m_eventCommandExecuted += value;

        // If we have an EventHandler<EventCommandEventArgs> attached to the EventSource before the first command arrives
        // It should get a chance to handle the deferred commands.
        EventCommandEventArgs? deferredCommands = m_deferredCommands;
        while (deferredCommands != null)
        {
            Debug.WriteLine($"EventSource[{GetHashCode()}]Invoke deferred command on this value:{deferredCommands}({deferredCommands.GetHashCode()} Command = {deferredCommands.Command})");

            value(this, deferredCommands);
            deferredCommands = deferredCommands.nextCommand;
        }
    }
    remove
    {
        Debug.WriteLine($"EventSource[{GetHashCode()}] remove one {value} from {System.Environment.StackTrace}");

        m_eventCommandExecuted -= value;
    }
}
internal void SendCommand(EventListener? listener, EventProviderType eventProviderType, int perEventSourceSessionId,
                          EventCommand command, bool enable,
                          EventLevel level, EventKeywords matchAnyKeyword,
                          IDictionary<string, string?>? commandArguments)
{
    if (!IsSupported)
    {
        return;
    }

    var commandArgs = new EventCommandEventArgs(command, commandArguments, this, listener, eventProviderType, perEventSourceSessionId, enable, level, matchAnyKeyword);
    lock (EventListener.EventListenersLock)
    {
        if (m_completelyInited)
        {
            // After the first command arrive after construction, we are ready to get rid of the deferred commands
            this.m_deferredCommands = null;
            // We are fully initialized, do the command
            DoCommand(commandArgs);
        }
        else
        {
            Debug.WriteLine($"EventSource[{GetHashCode()}] Add {commandArgs} {commandArgs.GetHashCode()} Command={commandArgs.Command} to m_deferredCommands in SendCommand:\r\n{System.Environment.StackTrace}");

            // We can't do the command, simply remember it and we do it when we are fully constructed.
            if (m_deferredCommands == null)
            {
                m_deferredCommands = commandArgs;       // create the first entry
            }
            else
            {
                // We have one or more entries, find the last one and add it to that.
                EventCommandEventArgs lastCommand = m_deferredCommands;
                while (lastCommand.nextCommand != null)
                    lastCommand = lastCommand.nextCommand;
                lastCommand.nextCommand = commandArgs;
            }
        }
    }
}

logs:

EventSource[-1243760484] Add System.Diagnostics.Tracing.EventCommandEventArgs -923182367 Command=Update to m_deferredCommands in SendCommand:
   at System.Environment.get_StackTrace()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..cctor()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()
EventSource[-1243760484] Add System.Diagnostics.Tracing.EventCommandEventArgs -1572497824 Command=Update to m_deferredCommands in SendCommand:
   at System.Environment.get_StackTrace()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..cctor()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()
EventSource[-1243760484] Add System.Diagnostics.Tracing.EventCommandEventArgs 1959724822 Command=Update to m_deferredCommands in SendCommand:
   at System.Environment.get_StackTrace()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..cctor()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()
EventSource[-1243760484] Add System.Diagnostics.Tracing.EventCommandEventArgs -204200971 Command=Update to m_deferredCommands in SendCommand:
   at System.Environment.get_StackTrace()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..cctor()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()
EventSource[-1243760484] Add System.Diagnostics.Tracing.EventCommandEventArgs -173953956 Command=Update to m_deferredCommands in SendCommand:
   at System.Environment.get_StackTrace()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..cctor()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()
EventSource[2000003047] Add System.Diagnostics.Tracing.EventCommandEventArgs -1391687009 Command=Update to m_deferredCommands in SendCommand:
   at System.Environment.get_StackTrace()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()
EventSource[2000003047] Add System.Diagnostics.Tracing.EventCommandEventArgs 663802102 Command=Update to m_deferredCommands in SendCommand:
   at System.Environment.get_StackTrace()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()
EventSource[2000003047] Add System.Diagnostics.Tracing.EventCommandEventArgs 965942388 Command=Update to m_deferredCommands in SendCommand:
   at System.Environment.get_StackTrace()
   at System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, EventProviderType eventProviderType, Int32 perEventSourceSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments)
   at System.Diagnostics.Tracing.EventSource.OverrideEventProvider.OnControllerCommand(ControllerCommand command, IDictionary`2 arguments, Int32 perEventSourceSessionId)
   at System.Diagnostics.Tracing.EtwEventProvider.HandleEnableNotification(EventProvider target, Byte* additionalData, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EventProviderImpl.ProviderCallback(EventProvider target, Byte* additionalData, Int32 controlCode, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData)
   at System.Diagnostics.Tracing.EtwEventProvider.Callback(Guid* sourceId, Int32 isEnabled, Byte level, Int64 matchAnyKeywords, Int64 matchAllKeywords, EVENT_FILTER_DESCRIPTOR* filterData, Void* callbackContext)
   at Interop.Advapi32.EventRegister(Guid* ,  , Void* , Int64* )
   at System.Diagnostics.Tracing.EtwEventProvider.Register(EventSource eventSource)
   at System.Diagnostics.Tracing.EventProvider.Register(EventSource eventSource)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()
EventSource[2000003047] add new one System.EventHandler`1[System.Diagnostics.Tracing.EventCommandEventArgs](70175282) from    at System.Environment.get_StackTrace()
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()
EventSource[2000003047]Invoke deferred command on this value:System.Diagnostics.Tracing.EventCommandEventArgs(-1391687009 Command = Enable)
EventSource[2000003047]Invoke deferred command on this value:System.Diagnostics.Tracing.EventCommandEventArgs(663802102 Command = Update)
---- DEBUG ASSERTION FAILED ----
---- Assert Short Message ----
command is:Update, need Enable or Disable.
---- Assert Long Message ----

   at System.Diagnostics.DebugProvider.Fail(String message, String detailMessage)
   at System.Diagnostics.Debug.Fail(String message, String detailMessage)
   at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage)
   at System.Diagnostics.Debug.Assert(Boolean condition, String message)
   at System.Diagnostics.Debug.Assert(Boolean condition, AssertInterpolatedStringHandler& message)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()
Process terminated. Assertion failed.
command is:Update, need Enable or Disable.
   at System.Diagnostics.DebugProvider.Fail(String message, String detailMessage)
   at System.Diagnostics.Debug.Fail(String message, String detailMessage)
   at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage)
   at System.Diagnostics.Debug.Assert(Boolean condition, String message)
   at System.Diagnostics.Debug.Assert(Boolean condition, AssertInterpolatedStringHandler& message)
   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.EventSource..ctor(Guid eventSourceGuid, String eventSourceName)
   at System.Diagnostics.Tracing.RuntimeEventSource..ctor()
   at System.Diagnostics.Tracing.RuntimeEventSource.Initialize()

this code is invoked from native mono code:ep_rt_mono_init_finish

void
ep_rt_mono_init_finish (void)
{
	if (mono_runtime_get_no_exec ())
		return;

	// Managed init of diagnostics classes, like registration of RuntimeEventSource (if available).
	ERROR_DECL (error);

	MonoClass *runtime_event_source = mono_class_from_name_checked (mono_get_corlib (), "System.Diagnostics.Tracing", "RuntimeEventSource", error);
	if (is_ok (error) && runtime_event_source) {
		MonoMethod *init = mono_class_get_method_from_name_checked (runtime_event_source, "Initialize", -1, 0, error);
		if (is_ok (error) && init) {
			mono_runtime_try_invoke_handle (init, NULL_HANDLE, NULL, error);
		}
	}

	mono_error_cleanup (error);
}

@tommcdon tommcdon added in-pr There is an active PR which will close this issue when it is merged and removed needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration labels Jul 23, 2024
@tommcdon tommcdon assigned mdh1418 and unassigned davmason Jul 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Diagnostics.Tracing in-pr There is an active PR which will close this issue when it is merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants