Skip to content
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

Task locations not exposed for tokio-console #2646

Open
jeffutter opened this issue Feb 10, 2022 · 1 comment
Open

Task locations not exposed for tokio-console #2646

jeffutter opened this issue Feb 10, 2022 · 1 comment
Labels
A-web project: actix-web C-improvement Category: an improvement to existing functionality

Comments

@jeffutter
Copy link

Actix tasks don't show their source location in tokio-console.

Expected Behavior

I would expect to see the source location of each task in tokio console

Current Behavior

Most of the source locations appear to be from inside tokio:

Screen Shot 2022-02-10 at 12 56 08 PM

Possible Solution

It looks like this has been partially fixed in tokio: tokio-rs/tokio#4483 but may need some additional work on the actix side as mentioned on reddit:

Note that actix-rt's spawning functions will probably also need to add #[track_caller] attributes, or else you'll just end up with a bunch of locations within actix-rt, rather than in your code.
https://www.reddit.com/r/rust/comments/snt5fq/can_tokioconsole_profile_actixrt

Steps to Reproduce (for bugs)

  1. Add Console Subscriber to an actix app
  2. Launch tokio-console

Context

It is difficult to debug performance issues in async applications, such as actix-web. Most traditional profiling yields a nested async/future/tokio things but it's hard to discern where the actual bottlenecks are occurring. tokio-console is a useful tool to get better insights into async systems and it would be great if actix played nicely with it.

Your Environment

  • Rust Version: 1.57.0
  • Actix Web Version: 4.0.0-rc.1
@robjtede
Copy link
Member

tbh, this is way too annoying to support properly until tokio::task::Builder is stable

@robjtede robjtede removed this from the actix-web v4.2 milestone Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-web project: actix-web C-improvement Category: an improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants