-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use analysis abort in server mode #34
Conversation
Actually, the solution might be a lot simpler than threads and interrupting. If Goblint receives the aborting signal, then it still replies with a message in the socket, but the difference is that it should contain |
I implemented the solution, where the result from the response is checked and Although, now if the analysis is aborted, a pop-up with "GobPie finished analyzing the code." is still shown. Unfortunately, I could not find a way how to turn it off, because it seems that MagpieBridge creates this message each time the
which is a bit odd behaviour, because we do not really finish the analysis with abort (no results can be expected to be shown). |
One incredibly stupid way to prevent the "finished analyzing the code" message from being shown would be to have |
This sounds like exactly the sort of thing where one might want to file a
bug report / do a PR upstream, doesn't it?
…On Tue, May 31, 2022, 7:12 PM Simmo Saan ***@***.***> wrote:
One incredibly stupid way to prevent the "finished analyzing the code"
message from being shown would be to have Thread.sleep(Long.MAX_VALUE);
before our implementation of analyze (if the read status was aborted).
Although that might have some bad effect by leaving a large number of
threads around waiting (practically) forever.
—
Reply to this email directly, view it on GitHub
<#34 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADJME3MXCGNFUH5ROSUG6F3VMZCBDANCNFSM5XEQCIGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sure! An upstream solution probably needs to be a bit more thought through though since there might be more than two possible results an analyzer might want to return. But an upstream issue definitely wouldn't hurt. |
I realized that the I now run the process of communicating with Goblint in a separate thread, so that the With this the pop-up situation:
is even worse, because the Therefore, this PR should now be ready for merge @sim642. |
It still does to the extent that if Magpie used an unbounded thread pool for its requests, then it would've worked all along since Magpie itself would have been able to immediately start all new requests in new threads without waiting for the old blocking ones. |
This branch has the initial abort logic, relating to #20. Although the initial version works for aborting the analysis and starting a new one, it executes the code in GobPie following the reanalysis even after the abort. This results in the actions (reading the results from the socket and printing "analysis finished") being executed consecutively as many times as the analysis was restarted.
To solve this issue, we have discussed with @sim642 to try and use Java threads for the actions from triggering analyses to requesting results.