Skip to content
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

Recover Goblint server automatically after crashing #46

Merged
merged 5 commits into from
Jan 31, 2023

Conversation

karoliineh
Copy link
Member

@karoliineh karoliineh commented Jan 19, 2023

While working on my thesis it has been very annoying that the plugin crashes each time I misspell the file name in the configuration file or make a syntax error in the .c file. This PR will try to make the plugin able to recover from most of those cases where Goblint crashes during analysis, so one does not have to restart the plugin manually.

  • When Goblint crashes due to No such file or directory and Goblint conf is changed, the plugin will try to restart.
  • Try to restart the plugin when Goblint crashes due to a parsing error.
  • Notify the user when the new configurations were not read in due to a mistake in the configuration file (e.g. syntax error or missing option).

When Goblint crashes due to no-such-file and Goblint conf is changed, new Goblint server is started.
@karoliineh karoliineh added bug Something isn't working enhancement New feature or request labels Jan 19, 2023
@karoliineh karoliineh self-assigned this Jan 19, 2023
@karoliineh
Copy link
Member Author

For now, I will merge this PR without implementing the server recovery for when Goblint crashes due to parsing errors.

That is because this PR already fixes a lot of bugs and therefore I want this to be merged ASAP. Implementing server restart when files have parsing errors requires either:

  1. Acquiring the analysed files list from Goblint with pre_files, remembering them and watching for modifications in those files after Goblint has crashed. This is not ideal, though, because it does not work if the parsing errors are in the files already before Goblint manages to analyse them for the first time.
  2. Making a PR for MagpieBridge to have an alternative method of analyze, that, instead of giving a list of files that have been opened since the start of the latest IDE session, would also/instead give a list of only saved/modified files (since the last analysis). Also related to and could be used for Optimise analysis rerun #17.

These both require more time for implementing than I have right now, so this will (hopefully) be another PR in the future.

  • This PR additionally fixes the issue of the plugin getting stuck waiting for the socket during launch.

@karoliineh karoliineh merged commit 56ef5f3 into master Jan 31, 2023
@karoliineh karoliineh deleted the server-recovery branch January 31, 2023 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant