-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
instant.elapsed() will panic #2385
Comments
Hm. This should never happen, sounds like a bug in libstd. |
Is the obtained CLOCK_MONOTONIC in multi-core CPU scenarios incorrect? |
Whether to replace elapsed with saturation_duration_since? |
I came across a similar problem once, I think the solution is to use the chrono crate instead. |
@seanmonstar Whether hyper will fix this issue, if it is waiting for std to fix it, then I will close the issue. |
We have reports of runtime panics (linkerd/linkerd2#7748) that sound a lot like rust-lang/rust#86470. We don't have any evidence that these panics originate in hyper, but hyperium#2385 reports a similar issue. Even though this is almost definitely a bug in Rust, it seems most prudent to actively avoid the uses of `Instant` that are prone to this bug. This change replaces uses of `Instant::elapsed` and `Instant::sub` with calls to `Instant::saturating_duration_since` to prevent this class of panic.
Fixed in #2746 |
this method is panic. hyper::client::pool::702
The text was updated successfully, but these errors were encountered: