Skip to content

[dotnet-trace] Does not collect any call stacks #976

Closed

Description

@VladimirKhil

I have installed and ran dotnet-trace 3.1.57502 on Ubuntu 18.04.2 LTS attaching to my ASP.NET Core 3.1 app running with systemctl. When opening collected trace data in PerfView I see only CPU_TIME and UNMANAGED_CODE_TIME records and no managed call stacks.

I tried to use different providers and flags but have no luck.

What am I doing wrong? Should I somehow modify my application to get correct data?

Thank you!

ybhpQ

Activity

  1. josalem commented on Apr 2, 2020

    @josalem
    Contributor

    @VladimirKhil, how did you invoke dotnet-trace and how did you end the trace? This looks to me like your trace is missing Rundown events and therefore doesn't have any jitted symbols. This can happen in cases where the target application or the tracer is not shut down cleanly.

  2. VladimirKhil commented on Apr 2, 2020

    @VladimirKhil
    Author

    @VladimirKhil, how did you invoke dotnet-trace and how did you end the trace? This looks to me like your trace is missing Rundown events and therefore doesn't have any jitted symbols. This can happen in cases where the target application or the tracer is not shut down cleanly.

    @josalem I invoked it via SSH by command "dotnet-trace collect -p ". And yes, I could not stop it normally via <Ctrl+C> or . It just ignores my commands and continued capturing data. So I stopped it with <Ctrl+Z>. Do you it this is the source of the problem? Should I wait some more time for normal close command to complete?

  3. josalem commented on Apr 2, 2020

    @josalem
    Contributor

    There is data that is captured after pressing <ctrl+c> called Rundown that includes, among other things, the jitted symbols. My hunch is that you didn't get any of those by closing the program with <ctrl+z> (I don't recall off the top of my head what signal gets sent to program with that, SIGHUP?). If possible, wait after pressing <ctrl+c> and it should finish. If you are still unable to stop the trace, it might be due to how the SIGINT is being trafficked over SSH.
    In that case, you can use the undocumented --duration flag to trace for a set amount of time, e.g., dotnet-trace collect -p <pid> --duration 00:00:00:30 for 30 seconds.

  4. VladimirKhil commented on Apr 2, 2020

    @VladimirKhil
    Author

    --duration flag works! Thank you very much. It works for 2 minutes 15 seconds instead of 30 seconds but thats not a big problem - it finishes normally and I get all stack traces.

    Thank you again!

  5. josalem commented on Apr 2, 2020

    @josalem
    Contributor

    Depending on the size of your target application, compute power of your environment, and I/O throughput, Rundown can take many seconds. It sounds like your Rundown took a long time. I'm glad the duration flag worked for you 😄

  6. iliamosko commented on May 26, 2020

    @iliamosko

    Is there any documentation about what is UNMANAGED_CODE_TIME? When I look into the Thread Time stack, UNMANAGED_CODE_TIME always takes up 100% of the time. It seems very obscure as to what exactly it is collecting.

  7. ghost locked as resolved and limited conversation to collaborators on Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions