-
Notifications
You must be signed in to change notification settings - Fork 18
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
Hard timeout abort #110
Comments
Hey! Can I work on this? Can I know where file this is being produced from? |
@punndcoder28 Sure, I've added more detailed and assigned it to you. Thanks! |
Unfortunately, this issue may not be easy to solve. Cozy uses the Z3 library directly, rather than invoking Z3 as an external process. The Z3 library API offers timeouts, but as far as I know it does not offer a way to interrupt a running call. Since Cozy uses Python multiprocessing you might try to kill the multiprocessing jobs, but that also won't work: killing a multiprocess job can corrupt the communication channels between the main process and the multiprocessing job, resulting in unexpected crashes. I believe that this issue is still worth working on, since it is a huge annoyance when it happens. I hope that I have missed some easy solution. |
OK. If I run into any problems I will leave a comment here. |
My experience is that it will happen 50% of all time...and when it does happen and I can't wait, I simply send interrupt from Ctrl-C and kill it off. So, I think the most essential thing is to save the work on disk (as specified in To summarize: my recommendation is to save the work when interrupted by user/timer and brutally exit ASAP. |
Modern versions of Z3 catch SIGINT: A SIGINT signal causes Z3 to return "unknown", as it would do for a timeout. Here's my proposal for resolving this issue:
|
In the original example, it appears the job is actually busy converting the syntax tree into a Z3 query, so additionally:
(And perhaps we should look into optimizing encoding bag equality a little...) |
Currently, Cozy will hang at the following state for a long time:
I guess Cozy is waiting for Z3 to return -- but this might far exceed the specified timeout (10s).
We should be able to let Cozy give up early, kill the Z3 job and output immediately after timeout.
NOTE: some hints on the semantic of
timeout
#52The text was updated successfully, but these errors were encountered: