-
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
Check if another forked child has already added the vhost. #581
Conversation
4ee5412
to
6f94084
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested for regressions of this change with some larger scans. No additional problems found, scans are still working as expected.
I wasn't able to reproduce the initial problem though and can't judge on the code changes itself, a final approval is required by @greenbone/gvm-dev
In some cases, in which expand_vhosts and test_empty_vhost options are enabled, a plugin process fork()s one child for vhost. These children inherit the current state of vhosts list, but it does not check if the concurrent child plugin has already added a new found vhost. Now, it checks not only if the vhost has been added by another plugin before (and already exists in the vhosts list), but also checks if a concurrent child added to the internal/vhosts key in redis.
Like the previous commit, but this check is done at host process level, It does not removes the appended vhosts from internal/vhosts key (get instead pop) So, avoids race condition in which other plugins checks for adding the same vhosts, and they have an outdated vhosts list.
Backport to the openvas-7.0 branch in #584 |
In some cases, in which expand_vhosts and test_empty_vhost options
are enabled, a plugin process fork()s one child for vhost.
These children inherit the current state of vhosts list, but it does not
check if the concurrent child plugin has already added a new found vhost.
Now, it checks not only if the vhost has been added by another plugin before
(and already exists in the vhosts list), but also checks if a concurrent child
added to the internal/vhosts key in redis.