Suricata is a network Intrusion Detection System, Intrusion Prevention System and Network Security Monitoring engine developed by the OISF and the Suricata community.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Victor Julien 9f52bdd1e5 flow timeout: prevent dead locks
The flow timeout mechanism called both from the flow manager at run time
and at shutdown creates pseudo packets. For this it has it's own packet
pool, which can be depleted if the timeout logic is faster than the packet
processing threads. In this case the flow timeout would enter a wait loop.
The problem however, is that this wait loop would happen while keeping a
flow locked. This could lead to a race condition when the packet thread(s)
are waiting for the lock that the flow manager has.

This patch introduces a new packet pool call 'PacketPoolWaitForN', meant
to make sure that the thread's packet pool has at least N available
packets. The flow timeout paths use this to make sure enough packets are
available *before* grabbing the flow lock. If there aren't enough packets
available yet, the wait happens before the lock as well.

This still means the wait can happen while the flow hash row is locked, so
we do make sure some more packets are available when entering that. But
perhaps in the future we need a more precise logic there as well.
10 years ago
benches
contrib suri-graphite: add ouput to file option 10 years ago
doc Fix make distcheck on CentOS 5.11 11 years ago
lua output-lua: add SCPacketTimeString 11 years ago
m4
qa parsing: s/strtok/strtok_r/g 10 years ago
rules decode: add ERSPANv1 decoder 10 years ago
scripts suricatasc: allow for longer response times after connect 10 years ago
src flow timeout: prevent dead locks 10 years ago
.gitignore unittest: make check use a qa/log dir for logging 12 years ago
.travis.yml travis-ci: use make check 11 years ago
COPYING
ChangeLog Update changelog for 2.1beta4 release 10 years ago
LICENSE
Makefile.am Respect DESTDIR in install-conf and install-rules. 11 years ago
Makefile.cvs
acsite.m4
autogen.sh
classification.config
config.rpath
configure.ac Feature #1440: support wildcards in rule filenames 10 years ago
doxygen.cfg doxygen: add source browser 11 years ago
reference.config Update reference.config 11 years ago
suricata.yaml.in app-layer-htp: add http_body_inline setting 10 years ago
threshold.config