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

Next/20210823/v10 #6306

Merged
merged 7 commits into from
Aug 23, 2021
Merged

Next/20210823/v10 #6306

merged 7 commits into from
Aug 23, 2021

Conversation

victorjulien
Copy link
Member

#6301 with comment fixup
#6267
#6258
#6214
#5647

victorjulien and others added 7 commits August 23, 2021 17:09
Previously the flow manager would share evicted flows with the workers
while keeping the flows mutex locked. This reduced the number of unlock/
lock cycles while there was guaranteed to be no contention.

This turns out to be undefined behavior. A lock is supposed to be locked
and unlocked from the same thread. It appears that FreeBSD is stricter on
this than Linux.

This patch addresses the issue by unlocking before handing a flow off
to another thread, and locking again from the new thread.

Issue was reported and largely analyzed by Bill Meeks.

Bug: OISF#4478
As is done already in C
cf commit ea09361
Ticket: OISF#4558
Avoids intra structure overflow
Ticket: OISF#4558
So as to avoid intra-structure overflow
So that CI does not fail, if suricata PR got upgraded in a new
version, but S-V PR did not get upgraded, and S-V changed
in master
Avoid spurious logs when suricatasc closes connection.

Use SCLogDebug for control connection EOF, and SCLogError for an error.

As Chandan Chowdhury described in redmine 3685. This makes the logging
consistent with the older `if (client->version <= UNIX_PROTO_V1)` block
about 20 lines above, and avoids polluting the logs with
`Unix socket: lost connection with client`.
@victorjulien victorjulien requested review from norg and a team as code owners August 23, 2021 18:32
@codecov
Copy link

codecov bot commented Aug 23, 2021

Codecov Report

Merging #6306 (7551247) into master (cf21694) will decrease coverage by 0.02%.
The diff coverage is 81.25%.

@@            Coverage Diff             @@
##           master    #6306      +/-   ##
==========================================
- Coverage   76.97%   76.95%   -0.03%     
==========================================
  Files         611      611              
  Lines      185941   185955      +14     
==========================================
- Hits       143130   143102      -28     
- Misses      42811    42853      +42     
Flag Coverage Δ
fuzzcorpus 52.85% <75.00%> (-0.01%) ⬇️
suricata-verify 51.12% <33.33%> (-0.04%) ⬇️
unittests 63.12% <6.66%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@victorjulien victorjulien merged commit 7551247 into OISF:master Aug 23, 2021
@victorjulien victorjulien deleted the next/20210823/v10 branch August 31, 2021 05:26
catenacyber added a commit to catenacyber/suricata that referenced this pull request Sep 11, 2023
Ticket: OISF#6306

Keep a reference to last child, consume a bit more RAM to save CPU
victorjulien pushed a commit that referenced this pull request Oct 19, 2023
Ticket: #6306

Keep a reference to last child, consume a bit more RAM to save CPU

(cherry picked from commit 737bc4f)
victorjulien pushed a commit that referenced this pull request Oct 19, 2023
Ticket: #6306

Keep a reference to last child, consume a bit more RAM to save CPU
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Oct 27, 2023
Ticket: OISF#6306

Keep a reference to last child, consume a bit more RAM to save CPU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants