Skip to content

tokio-console cannot show the pause status correctly #551

@0xPoe

Description

@0xPoe

What crate(s) in this repo are involved in the problem?

tokio-console

What is the issue?

There are two Tokio Console instances connected to the same stream. If you pause the stream in one instance and the status cannot be displayed correctly in the other instance.

How can the bug be reproduced?

All steps execute under the git repo:

  1. Start the example app: cargo run --example app
  2. Start one tokio console: cargo run
  3. Start another tokio console: cargo run
  4. Hit space in one of the instances
image As you can see, all of them are paused, but only one of them showed `PAUSED`.

Logs, error output, etc

No response

Versions

commit 3193fde77adf1473c4124adfa6ef8234659589c9 (origin/main, origin/HEAD)
Author: 二手掉包工程师 <[email protected]>
Date:   Mon Apr 22 21:35:21 2024 +0800

    chore: run clippy against all targets (#546)
    
    This would help us to check if there are any
    clippy warning in the tests.

Possible solution

Perhaps we should include a new API to allow clients to check whether the stream has been paused.

Additional context

I believe the reason for this problem is that we only store the pause status on the client side. Therefore, there is no way to notify other instances to know the stream is paused.

Would you like to work on fixing this bug?

yes

Metadata

Metadata

Assignees

Labels

C-consoleCrate: console.C-subscriberCrate: console-subscriber.S-bugSeverity: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions