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
Resolving takes hours #3878
Comments
Seems we are infinitely recursing in Line 450 in 195e17e
@carlobaldassi, any ideas about this one? |
I'll look into this. |
I've been investigating this (for quite a while). Unfortunately, it's not a bug, strictly speaking. The solver is not infinitely recursing, it's just taking an inordinate amount of time because the problem is unsatisfiable but the algorithm keeps backtracking the partial heuristic solutions and attempting new ones. It's hitting a combinatorial wall - which is something I knew was possible but was hoping would be rare enough. In fact, the issue can be triggered even just with a subset of the original requirements, like this: get in pkg mode and
It will seemingly get stuck. Now a bit of analysis shows that under the circumstances ModelingToolkit is restricted to major version 8, so we can bisect its version range. Both of these return an error almost immedately:
Which shows that the problem is indeed unsatisfiable. Just to give an idea of how intricate this is here are the error messsages in both cases. (If you notice some log entries about packages having been fixed by the MaxSum heuristic: I checked that those are irrelevant, the problem truly is unsatisfiable.) I'm not sure how to fix this; one unsatisfactory (at least to me) but straightforward solution would be adding some form of timeout, with an environment variable to control it. |
In the following dionysos-dev/Dionysos.jl#352, resolving the environment
Dionysos/BipedRobot/Project.toml
takes hours.You can see in the following log that it took 6 hours to do
Pkg.instantiate()
with Julia v1.10.2:https://github.com/dionysos-dev/Dionysos.jl/actions/runs/8783197708/job/24099651447?pr=352
Steps to reproduce:
$ git clone git@github.com:dionysos-dev/Dionysos.jl.git $ cd Dionysos.jl $ git checkout pkg_stuck $ julia --project=BipedRobot
then
It should be stuck resolving for hours.
The text was updated successfully, but these errors were encountered: