Project

General

Profile

Actions

Bug #1318

closed

A thread-sync issue in streamTCP

Added by Dennis Lee about 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

The config of streamTcp parsed at function StreamTcpInitConfig in
Suricata-Main.

Bug streamTcp tread init at function StreamTcpThreadInit in
capture-Thread, such as AFPacketeth21.

If capture-thread run first after spawning, It will lead to
streamTcp don’t prealloc any sessions.

This issue don’t affect the function, but I think it will reduce
performance when process tcp flow.

Details:
1. all theads spawn and call the init functions the the new thread, and the main thead wait the child thread init done. See function TmThreadSpawn in tm-threads.c
2. in the main thread, the module of streamtcp init the config after all the work threads spawn. See function StreamTcpInitConfig called in suricata.c .

Above, it make the stream_config.prealloc_sessions get an uninitialized value in function StreamTcpThreadInit(the streamtcp module's init function).
Actions #1

Updated by Victor Julien over 9 years ago

  • Status changed from New to Assigned
  • Assignee changed from Anoop Saldanha to Victor Julien
  • Target version set to 2.0.7
Actions #2

Updated by Victor Julien over 9 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF