Ever since upgrading to the new Isabelle2021, occasionally my the "zulu architecture" takes about 100% cpu usage, likely triggered by typing some proofs, not even necessarily try
or anything. The only option is to close Isabelle, and 2/3 times it works. But occasionally the proof search processes (z3,...) never exit, and I need to restart my whole PC. Has anyone run into similar issues? I'm on Windows x64 on fairly recent hardware.
This seems to be a common pattern (usage drops to 0 since I quit isabelle)
Any specific reason to assume z3 is responsible?
Anyway, next time you start Isabelle, can you open the Monitor (bottom right, double click on ML) and look what happens on the ML side when it freezes? I saw this kind of things happen before on large theories and very slow GCing, but that might be something different.
What kind of formalization are you doing?
Max Nowak said:
This seems to be a common pattern (usage drops to 0 since I quit isabelle)
I am not familiar with the windows task manager. Is that one CPU or all CPUs? Does 100% mean every core is used?
That is all CPUs. No particular reason why z3, but it tends to happen when I use try
or even just normal typing, and... hm, random realization: it tends to happen particularly often when I edit something at the beginning of a long proof, so maybe isabelle/hol tries spawning very heavy proof searches for all the now-broken subsequent proof steps, and hence lags a bunch?
I am not sure what to look for in the ML window.
In the ML window, look at the heap panel and if see anything suspicious (I don't know what to expect either). For example, you might see that GC is happening every 0.3 seconds, indicating that polyml needs more memory
When editing long proof and something breaks, I add a oops
to make sure Isabelle is not running something (like metis or blast).
ML isn't the issue I think, it's got to be something else. Looking into the java monitoring console, I spotted a thread which seems to be running a solver all the time, even though there's nothing to do currently in my file, the stack trace is never in any waiting method, and instead always in kodkod.engine.Solver.solve()
or deeper. And exactly one of my cores is currently fully loaded, so I assume it's just this thread too? Gut feeling tells me there's some issue killing the solvers once they're no longer needed and/or starting too many. Or maybe it's just an intended background task.
I know that some threads have moved from ML to Scala (aka java), like Kodkod. But I have no idea what happens in your case. You could try to deactivate auto_nitpick, but I don't know if this helps
I have a similar problem in Isabelle2020 when editing a file with two long proofs. After some time Isabelle greys out repeatedly but without Isabelle nor the system going out of memory. It is especially surprising since the file does not depend on other theories and the file itself is not too long (~700 lines).
Same theories, but isabelle2020 and everything is just fine for me.
If it is kodkod-Scala specifically, you could try Isabelle/jEdit > Plugins > Plugins options. Then Plugin Options > Isabelle > General > Miscellaneous Tools > untick kodkod scala
Hi! I stumbled upon this thread and tried monitoring my long-running theory. The theory takes several minutes at apply (auto simp add: Let_def)
, and the heap monitor shows the "zigzag" behavior at the time. Is this something that can be mitigated by adjusting the config, rewriting the proof, etc.? image.png
Rewrite the proof.
The heap monitor always shows a zigzag for me, no matter what I do. I assumed that is normal behaviour though?
the zigzag is normal. In big applications, memory pressure increases and you expect at some point a full GC where the allocated memory increases (the red curve)
I think the official recommendation is that if you have to open the memory monitor for any reason, you should buy more RAM. :big_smile:
I have 16 GB on my laptop and that's usually enough. My desktop has 32 GB and that's pretty much always enough. Less than 16 GB can be a bit problematic (although I, too, wonder why Isabell needs that much memory…)
Thank you for the answer. I already have 32GB of RAM and tried to tweak ISABELLE_TOOL_JAVA_OPTIONS and ML_OPTIONS, but it didn't change the behavior (maybe I should have closed the browser).
It seems that the expansion of the let expression is behaving exponentially, so I will try to work around this during the proof.
To change the settings for the java process inIsabelle/jEdit
, you have to set JEDIT_JAVA_OPTIONS
(at least in a repository version).
Indeed, if 32 GB isn't enough, you really should change the proof.
Last updated: Dec 21 2024 at 12:33 UTC