-
Notifications
You must be signed in to change notification settings - Fork 633
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
Fix interrupted scans #832
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix SC-177 On some cases, the parallel scan is disabled and, the max_running_processes variable is set to 1, while the current number of running process is grether than 1. Therefore, condition in the while loop are not satisfied and never wait for free slot. At the end, the process table is full, and this produced the host scan process to stop, because not free slot for a new process.
This allows to handle the the error in a different way as for fork() issues (-1).
Because ERR_CANT_FORK should be used when there are resource issues, and when the system is not being able to fork a new processes. ERR_NO_FREE_SLOT is an internal error of the host scan process, which could be in most cases a temporal issue. We don't stop the host scan process. We just try again until the process table has a free slot.
bjoernricks
reviewed
Aug 6, 2021
cfi-gb
suggested changes
Aug 9, 2021
jjnicola
force-pushed
the
interrupted-scan
branch
from
August 9, 2021 06:23
14addbf
to
61c76a4
Compare
This was referenced Aug 9, 2021
Improve messages and docstrings. Set warning log level instead of debug log level for plugin_launch error messages.
jjnicola
force-pushed
the
interrupted-scan
branch
from
August 9, 2021 10:23
e91bcdf
to
b43156e
Compare
ArnoStiefvater
approved these changes
Aug 9, 2021
This was referenced Aug 9, 2021
jjnicola
added a commit
that referenced
this pull request
Aug 9, 2021
Fix interrupted scans (backport #832)
jjnicola
added a commit
that referenced
this pull request
Aug 9, 2021
Fix interrupted scans (backport #832)
jjnicola
added a commit
that referenced
this pull request
Aug 9, 2021
Fix interrupted scans (backport #832)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SC-177
What:
Check if the max running process was reached or even exceed, when waiting for running a new plugin.
Why:
Fix an issue which produced interrupted scan, because a host not being scan 100%
How:
Not easy to reproduce. It depends on the system, scan config and mainly on the target system (some plugins must be trigger in a especial order). Good luck.
Checklist: