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

Fix interrupted scans (backport #832) #834

Merged
merged 7 commits into from
Aug 9, 2021
Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 9, 2021

This is an automatic backport of pull request #832 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

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.

(cherry picked from commit dd3e46d)
This allows to handle the the error in a different way as for fork() issues (-1).

(cherry picked from commit 57c867b)
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.

(cherry picked from commit ad3bd82)
(cherry picked from commit 0dbce72)
(cherry picked from commit 61c76a4)
Improve messages and docstrings.
Set warning log level instead of debug log level for plugin_launch error messages.

(cherry picked from commit b43156e)
@mergify mergify bot requested a review from a team as a code owner August 9, 2021 10:37
@jjnicola jjnicola merged commit 920e63d into master Aug 9, 2021
@jjnicola jjnicola deleted the mergify/bp/master/pr-832 branch August 9, 2021 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant