10

For .Net 4.6.x, I have heavily relied upon DebugDiag 2

Anytime Production applications had high CPU issues, deadlocks, etc, I would use that tool to capture dumps of w3svc and it prints out a nice report of what all the threads were doing. They may be waiting on 3rd party APIs, databases, etc.

I want to move to asp.net core, but if I had a production server w/ 100% CPU or issues like mentioned above, I can't find any way you can dump all the threads in a process and see their stack trace.

How are people getting around not having this visibility available to them? Am I missing something? I'm looking for a solution that works in Linux as well.

Nmk
  • 1,281
  • 2
  • 14
  • 25
bladefist
  • 1,084
  • 3
  • 15
  • 25
  • what about ProcDump? it can dump the .net core app create full memory dump – Paweł Łukasik Sep 24 '17 at 18:46
  • @PawełŁukasik I don't think that runs on linux – bladefist Sep 24 '17 at 19:10
  • 1
    no, it does not. But where in your question it says anything about linux? – Paweł Łukasik Sep 24 '17 at 19:12
  • 2
    @PawełŁukasik Good point. I'll make an edit. When I think of .net core production, I think of linux for some reason. – bladefist Sep 24 '17 at 19:19
  • Possible duplicate of [How to Dump a .NET Core Application on Linux](https://stackoverflow.com/questions/42070270/how-to-dump-a-net-core-application-on-linux) – Lex Li Sep 24 '17 at 21:05
  • @LexLi it's not. Getting a dump is step 1, my questions is also about analyzing the stack trace of all the threads. – bladefist Sep 25 '17 at 14:46
  • 1
    The analysis provided by DebugDiag can be carried manually. So before Microsoft creates something for you, you can always help yourself. Personally I don't think DebugDiag analyzes the dumps in the most meaningful way (well all automation tools have such limitations). – Lex Li Sep 25 '17 at 14:49
  • @LexLi Disagree. It's invaluable. Ho would I "carry it manually" – bladefist Sep 25 '17 at 17:24
  • DebugDiag2 runs on Linux? – Thomas Weller Sep 29 '17 at 21:48
  • @LexLi I think that dump on demand and auto-analyze were the less interesting features. I would say that the most interesting one was dump on (specific) first chance exception, and I don't know of a .NET core/5 equivalent of that unfortunately... – Ohad Schneider May 13 '21 at 21:11

1 Answers1

0

I would recommend IDA which is a debugger and disassembler. It runs on Linux and can be used to dump all the threads and perform stack trace. Here is a link to it. Or Microsoft now allows you to debug directly from Visual Code Studio and dump threads onto there. There are multiple tutorials on that and a quick Google Search can help or viewing the Microsoft help center. Check that out here.

makertech81
  • 898
  • 2
  • 7
  • 20
  • 2
    This question is asking for the equivalent to DebugDiag ... DebugDiag was able to just point at a dump file and it would generate a report highlighting the issues and it would output a simple list of the threads with stack traces. I tried IDA evaluation edition and this is not equivalent - it seems to be a low level utility like WinDbg, which is not what this question is looking for. – AaronK Jan 10 '19 at 14:00