-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
panic in elapsed() #80674
Comments
https://doc.rust-lang.org/std/time/struct.Instant.html#panics-1
What operating system are you on? How are you setting the instant? On some systems the clock time is not actually monotonic. Lines 223 to 250 in 8018418
|
rust version: 1.45.2 |
@jyn514 Thank you for your reply. Can I ask how to set the instant will trigger this situation? |
@silence-coding like the comment says, if the system time is not monotonic then this panic can happen when you set it to a time that's earlier. I don't know any more than that. |
Thank you |
To get an idea what might be causing this the hardware environment matters too. Can you provide the following info?
|
Circumstances have been lost, just looking for a similar Linux version 3.10.0-862.14.1.0.h197.eulerosv2r7.x86_64 /proc/cpuinfo Hypervisor vendor: KVM /sys/devices/system/clocksource/clocksource0/current_clocksource kvm-clock |
Ok, on the assumption that actually is identical to the hardware that triggered your initial report: It's not actually using the tsc directly and instead relying on the hypervisor. If I read this code correctly: and then it'll only trust the KVM clock if the hypervisor explicitly promises that the host clock is stable and otherwise protects it with an atomic CAS. I only checked the mainline 3.10 source though. RHEL/CentOS are known to produce heavily patched frankenkernels, so their code might actually be doing something different there. Anyway, it looks like the host explicitly promises that the clock is reliable and then breaks that promise. So if this issue occurs again on a machine using On the rust side we have the option to also change |
That may not be reliable enough to report this issue to the linux kernel maintainers. If you encounter the issue again can you gather the information (OS, cpuinfo, hypervisor, kernel version and clock source) for the particular failing system? |
@the8472 Next time I meet, I gather as much information as I can. |
Should this have been closed by #89926? |
Seems indeed so. Closing. |
The panic occurs in the third-party hyper.
hyperium/hyper#2385
The text was updated successfully, but these errors were encountered: