-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
detect/multi-tenant: Eliminate crashes processing tenant config #9060
Conversation
Issue: 6047 This commit ensures that the tenant id is contained in a unsigned 32 bit container.
Issue: 6047 This commit serializes processing of individual .config file processing. This is of little consequence when multi-tenancy is not in use. When multiple tenants have been configured, serialization will ensure parallel loading of configuration/rules doesn't concurrently use shared pcre2 constructs.
This commit changes memory allocations to SCCalloc for clarity.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #9060 +/- ##
==========================================
+ Coverage 82.32% 82.34% +0.01%
==========================================
Files 969 969
Lines 273655 273662 +7
==========================================
+ Hits 225292 225337 +45
+ Misses 48363 48325 -38
Flags with carried forward coverage won't be shown. Click here to find out more. |
S-V : |
Information: QA ran without warnings. Pipeline 14764 |
there are far more call sites for I'm missing a good explanation of the thread safety issue, what is the issue? |
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.
see comment
The This PR prevents concurrent access -- access was most often through |
This type of explanation belongs in the commit. |
If this is the case I would suggest a different solution: move these pcre2 data structures into |
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.
As Victor said
If this is the case I would suggest a different solution: move these pcre2 data structures into DetectEngineCtx. Of these we have an instance per tenant.
By the way, I like the commits to use SCCalloc and make tenant_id always a uint32 :-)
I think this was solved with #9243 |
Continuation of #9056
This PR eliminates crashes during parallel loading of tenant configurations by serializing processing of the .config files
Link to redmine ticket: 6047
Describe changes:
Provide values to any of the below to override the defaults.
To use a pull request use a branch name like
pr/N
whereN
is the pull request number.