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

Paused time behavior has become slightly platform dependent #5423

Open
sfackler opened this issue Feb 2, 2023 · 3 comments
Open

Paused time behavior has become slightly platform dependent #5423

sfackler opened this issue Feb 2, 2023 · 3 comments
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug. M-time Module: tokio/time

Comments

@sfackler
Copy link
Contributor

sfackler commented Feb 2, 2023

Version
1.25.0

Platform
Darwin sfackler82-mac 22.3.0 Darwin Kernel Version 22.3.0: Thu Jan 5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000 arm64
Linux 92a176762057 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 GNU/Linux

Description
It appears that the timing of code working with paused time has started to become very slightly different when running on macOS and Linux at some point in the last few months. The differences are subtle (e.g. 3.427163s vs 3.427156s reported tokio time elapsed on macOS vs Linux) but present. The paused time does still appear to be fully deterministic on a given platform though.

I haven't done too much work tracking this down other than confirming that the platform dependency goes back to at least 1.23.0. I'll try to put together a minimal reproduction and bisect it at some point later today.

@sfackler sfackler added C-bug Category: This is a bug. A-tokio Area: The main tokio crate labels Feb 2, 2023
@sfackler
Copy link
Contributor Author

sfackler commented Feb 2, 2023

The behavior on Linux has not changed, so it looks like this is a regression on macOS (or maybe something specific to aarch64 macOS).

@Darksonn Darksonn added the M-time Module: tokio/time label Feb 2, 2023
@Darksonn
Copy link
Contributor

Darksonn commented Feb 2, 2023

Do you use start_paused = true or do you explicitly pause the timer after the test has started?

@sfackler
Copy link
Contributor Author

sfackler commented Feb 2, 2023

I use start_paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug. M-time Module: tokio/time
Projects
None yet
Development

No branches or pull requests

2 participants