-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Comments
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti Issue DetailsI compiled a dotnet/runtime source code, but when I debugged it, the following problems occurred: how can i solve it 版本是:
Questions are as follows: Thread '.NET Tiered Compilation Worker' (0x37d0) exited with return value 0 (0x0). ----Assert Long Message----
CLR: Managed code called FailFast.
|
probably related: #92519 |
@davmason PTAL |
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 @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. |
This issue has been marked |
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 |
The problem reappeared today. There is the following complete error message in the output window of vs.
|
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 |
I had a similar problem trying to integrate the runtime into a C++ application, but I was using monoruntime when compiling the runtime. 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:
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);
} |
I compiled a dotnet/runtime source code, but when I debugged it, the following problems occurred:
how can i solve it
Version:
Questions are as follows:
The text was updated successfully, but these errors were encountered: