Skip to content

Task IDs not stable #385

@jsgf

Description

@jsgf

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

tokio-console, console-subscriber

What is the issue?

I have a service which creates two long-running tasks as part of its initialization. They end up with task ids 1 & 2 as expected. The service creates a task per request, and I see those show up as expected.

image
initial state

image
after running some requests

However, when I reconnect, I see the task ids have scrambled - the long running tasks no longer have ids 1 & 2 (in this case 2 is preserved, but associated with the other long-running task).
image
immediately disconnect and reconnect

I'd really like task ids to be stable so that I can use them for reference. Ideally they'd be monotonically increasing in order of task spawns, so they can also be used to understand when things are spawned in relation to each other.

How can the bug be reproduced?

  1. Have service which creates some long-running tasks. Start it.
  2. Attach tokio-console
  3. Run some activity, including transient tasks. Note long-running task ids
  4. Disconnect and reconnect tokio-console. Expect to see task ids unchanged, but they won't be.

Logs, error output, etc

No response

Versions

tokio-console 0.1.7
console-subscriber 0.1.8

Possible solution

No response

Additional context

No response

Would you like to work on fixing this bug?

maybe

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-bugSeverity: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions