Skip to content

Obsolete constructor public StackTrace(Thread targetThread, bool needFileInfo) #80555

@DamirLisak

Description

@DamirLisak

I wan't to come back to the sentence from Originally posted by @leculver in #31508 (comment)
"It's just on my roadmap. Feel free to create an issue in the clrmd github repo though if you'd like to track it."

https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.stacktrace.-ctor?view=net-7.0

This feature was automatically closed by the msftbot. Is this feature still planned to be implemented? If not - why?
Stack-Tracing of managed threads is not only useful for unresponsive threads, it's very useful for the diagnostic during runtime.
1.) For example in very multithreaded projects to detect deadlocks and prevent deadlocks by lock leveling (https://learn.microsoft.com/en-us/archive/msdn-magazine/2007/october/net-matters-deadlock-monitor). Only by suspending all relevant threads, dumping the stack trace and resuming them afterwards is it possible to find problems on productive systems.
2.) A another example for diagnosing performance issues when the processing time of a thread is to long because it waits for a lock, that is currently hold by another thread. Another monitoring thread would then temporarily stop the relevant threads and dump the stacks.
I think there are far more examples where suspending and resuming threads is useful. Therefore, I cannot understand why such functionalities that existed in .NET 4 should no longer be available in .net core.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions