dotnet / dotnet/diagnostics

dotnet-stack produces empty output under load

Open
#5,917 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
1.3k
Forks
404
Avg merge
2d 3h
Merged PRs (30d)
38

Description

I was trying to produce stack traces of a process that was consuming a lot of CPU time. About 80% of time it produced an empty output, the remaining 20% it produced the expected list of stack-traces. Later, after the load dropped, exactly the same invocation worked reliably.

What I'd expect:

* Ideally always produce output
* At least output an error to `stderr` if it fails
* If this is due to a timeout while waiting for the target process to send data, the ability to increase the timeout

Environment: Windows on AWS t3.large (2 vCPU, x86-64). The target process was `w3wp`, i.e. an ASP.NET 8 application running in IIS. `dotnet-stack` was running with elevated privileges. Latest version of `dotnet-stack`.

dotnet --info

> Host:
> Version: 8.0.15
> Architecture: x64
> Commit: 50c4cb9fc3
> RID: win-x64
>
> .NET runtimes installed:
> Microsoft.AspNetCore.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
> Microsoft.AspNetCore.App 8.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
> Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.NETCore.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.NETCore.App 8.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
> Microsoft.WindowsDesktop.App 8.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with dotnet-stack against a CPU-loaded w3wp process on Windows, then compare runs with the same invocation after load drops. Trace whether empty output corresponds to a timeout or other failure; done means the tool reliably reports stack traces or emits an error to stderr, with a way to increase the timeout if applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.