Project

General

Profile

Actions

Bug #7568

closed
LS LS

pcap: continuous file reading fails on an empty directory

Bug #7568: pcap: continuous file reading fails on an empty directory

Added by Lukas Sismis about 1 year ago. Updated 10 months ago.

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

Description

If Suricata is run in a pcap directory reading mode and the directory is empty, then Suricata crashes because FM doesn't get started in time.
Reproduced by:
suricata -r /tmp/pcap/ --pcap-file-continuous -vvvv

Likely because the code in flow-manager.c gets stuck and does not proceed with FM initialization:
```
/* don't start our activities until time is setup */
while (!TimeModeIsReady()) {
if (suricata_ctl_flags != 0)
return TM_ECODE_OK;
usleep(10);
}
```

Reported in https://forum.suricata.io/t/suricata-exits-with-errors-when-running-with-r-and-pcap-file-continuous/4396/2


Subtasks 1 (0 open1 closed)

Bug #7661: pcap: continuous file reading fails on an empty directory (7.0.x backport)ClosedLukas SismisActions

Related issues 1 (0 open1 closed)

Related to Suricata - Bug #7497: pcap: exit with errors when running with -r and --pcap-file-continuousClosedLukas SismisActions

LS Updated by Lukas Sismis about 1 year ago Actions #1

  • Subject changed from pcap: continuous file reading fails on empty directory to pcap: continuous file reading fails on an empty directory

VJ Updated by Victor Julien about 1 year ago Actions #2

  • Related to Bug #7497: pcap: exit with errors when running with -r and --pcap-file-continuous added

LS Updated by Lukas Sismis about 1 year ago Actions #3

CI test is needed

LS Updated by Lukas Sismis about 1 year ago Actions #4

  • Target version changed from TBD to 8.0.0-rc1

OT Updated by OISF Ticketbot 12 months ago Actions #5

  • Subtask #7661 added

OT Updated by OISF Ticketbot 12 months ago Actions #6

  • Label deleted (Needs backport to 7.0)

LS Updated by Lukas Sismis 11 months ago ยท Edited Actions #7

  • Status changed from Assigned to In Progress

The actual problem was fixed in the PR below, I need to add Github CI tests.
https://github.com/OISF/suricata/pull/13277

LS Updated by Lukas Sismis 10 months ago Actions #8

  • Status changed from In Progress to Resolved

Setting to resolved, tests are ticketted in https://redmine.openinfosecfoundation.org/issues/7739

LS Updated by Lukas Sismis 10 months ago Actions #9

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom