-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
thread 'tokio-runtime-worker' panicked at 'assertion failed: now >= lock.elapsed' #3619
Comments
Hmm, it looks like this is due to |
I guess this is the same issue as rust-lang/rust#60475.
|
Yeah, seems likely. I guess we should just accept |
@carllerche , @taiki-e is there a workaround to fix this issue ? |
You could try to remove the assert that panicked, but it might fail in other less obvious ways. The code wasn't written to behave properly when time goes backwards. |
@Darksonn I download the crate and remove the line but I have a panic because it fails that the forked library is different runtime than tokio. |
You need to use |
@Darksonn thank you for your help. |
related rust-lang/rust#84448 |
FWIW, I'm seeing this happen across multiple tokio instances quite frequently. My host is CentOS 7.9.2009 and my guests are CentOS 7.9.2009 running in VirtualBox. My
|
@jgrund do you want to submit a PR that avoids the panic and instead ignores Feel free to ping someone in #tokio-dev on Discord (https://discord.gg/tokio) if you need guidance. |
@carllerche It turned out this was actually useful in my case. It led me to update some kernel parameters in my vm which stopped the clock from warping (which was effecting other processes as well). |
@jgrund Do you want to submit a PR that improves the assertion message? Maybe explain the problem + include links (e.g. rust-lang/rust#84448) and help on how to fix it? |
Is this something where the std should be patched to also defend against non-monotonic clocks on Linux? |
It is a bug in std that this can happen, yes. |
Well technically it is a kernel or hypervisor bug and should be reported upstream to whatever vendor is causing this. std relies on
Yeah, picking an unreliable clock source manually could also cause this. By default the kernel should pick a reliable one. If it isn't that should be reported. |
hello everyone I am using project called toshi from crate.io and it uses tokio which works well under windows 10 but when I compiled and run it under VM 'Ubuntu 20.04.2 LTS' always after few seconds the program stop responses and gives me a panic like the following
this error also exist in the old version that uses old version of tokio and the output of the panic is:
The text was updated successfully, but these errors were encountered: