console: warnings: False positives with `LostWaker` warning
Currently, the LostWaker warning seems to often display false positives. These seem to occur when a task has a single waker clone, is woken by value (dropping the waker), and yields after having been woken. This seems to occur the most frequently when a task self-wakes (and that may be the only instance where this occurs?).
It would be nice to fix this — the warning should only be shown when a task definitely won’t be woken again. However, I’m not immediately sure how we would determine this.
One potential solution is that the false-positives seem to be pretty transient. They flicker in and out of existence rapidly. We could potentially just only display the lint if the task has remained in the 0-waker state for a long time.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 20 (13 by maintainers)
Commits related to this issue
- Update console to current main REF https://github.com/tokio-rs/console/issues/149 Signed-off-by: Brian L. Troutwine <brian@troutwine.us> — committed to vectordotdev/vector by blt 3 years ago
- fix(console): assume waiting for first poll is not a lost waker (#160) Noted in https://github.com/tokio-rs/console/issues/149#issuecomment-924390639 — committed to tokio-rs/console by seanmonstar 3 years ago
- fix(subscriber): only send *new* tasks/resources/etc over the event channel (#238) ## Motivation Currently, there are some rather bad issues that occur when the event buffer is at capacity and ev... — committed to tokio-rs/console by hawkw 2 years ago
I haven’t been able to reproduce the same lost waker problem with vector, using the setup detailed here. PR on the vector side to include the changes: https://github.com/vectordotdev/vector/pull/10825 I am using tokio-console fdc77e28d45da73595320fab8ce56f982c562bb6. The proposed fix looks good!
Maybe we can check if
last_wakeis afterlast_poll_started, and if so we can assume it will be polled again?