Skip to content

regression: overflow evaluating the requirement #130578

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

Closed
BoxyUwU opened this issue Sep 19, 2024 · 5 comments
Closed

regression: overflow evaluating the requirement #130578

BoxyUwU opened this issue Sep 19, 2024 · 5 comments
Labels
E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@BoxyUwU
Copy link
Member

BoxyUwU commented Sep 19, 2024

[INFO] [stdout] error[E0275]: overflow evaluating the requirement `Unique<(dyn scheduled_thread_pool::thunk::Invoke + Send + 'static)>: Send`
[INFO] [stdout]    --> http/src/routes.rs:219:10
[INFO] [stdout]     |
[INFO] [stdout] 219 |         .or(warp::path!("api" / "users" / Uuid / "permissions")
[INFO] [stdout]     |          ^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`http`)
[INFO] [stdout] note: required because it appears within the type `Box<(dyn scheduled_thread_pool::thunk::Invoke + Send + 'static)>`

note: if the relevant team already accepted this breakage then this issue can be closed

@BoxyUwU BoxyUwU added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-types Relevant to the types team, which will review and decide on the PR/issue. labels Sep 19, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 19, 2024
@BoxyUwU BoxyUwU removed the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Sep 19, 2024
@saethlin
Copy link
Member

The suggestion to raise the recursion limit works, and also other crates in this workspace have already raised the recursion limit even further. And this is a regression using warp filters.

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 19, 2024
@lcnr
Copy link
Contributor

lcnr commented Sep 20, 2024

The suggestion to raise the recursion limit works, and also other crates in this workspace have already raised the recursion limit even further. And this is a regression using warp filters.

Given this, I would accept this regression without looking into it myself, thanks @saethlin

cc @rust-lang/types unsure whether you think we should FCP close this or if this ping is enough?

@jackh726
Copy link
Member

Probably a ping is enough - I am curious what caused the regression though? Just a bisection is probably fine. Not a blocker.

@lcnr lcnr added the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Sep 21, 2024
@GrigorenkoPV
Copy link
Contributor

Bisects to #126024

@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Sep 24, 2024
@lcnr
Copy link
Contributor

lcnr commented Sep 25, 2024

the old solver does not track recursion depth in cache entries, so if we have:

  • evaluate T: Trait, requires depth m
  • later evaluate U: Trait which, at depth n depends on T: Trait, with m + n being greater than the recursion limit. This overflows if we do not use the cache entry for T: Trait

If T: Trait is cached, we avoid the overflow. The new solver always tracks the recursion limit when using the global cache to avoid this kind of instability

@lcnr lcnr closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants