Project

General

Profile

Actions

Bug #9494

open
SB VJ

threads: intermittent shutdown failure in offline-replay-determinism SV test on FreeBSD CI

Bug #9494: threads: intermittent shutdown failure in offline-replay-determinism SV test on FreeBSD CI

Added by Suri Bot about 6 hours ago. Updated about 6 hours ago.

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

Description

The suricata-verify test offline-replay-determinism (SV commit 64c2ae47, merged to SV master 2026-11-26 via SV PR #3581) fails intermittently in the GitHub CI "FreeBSD 15.1" job. Other platforms are not affected, and most FreeBSD runs pass.

Failures seen

Run Branch Result
https://github.com/OISF/suricata/actions/runs/46445730811/job/141943265827 main (321d52d6f) exit code 1
https://github.com/OISF/suricata/actions/runs/46635598065/job/142601524077 icmp-error-fixes/v1 exit code -6 (SIGABRT)
https://github.com/OISF/suricata/actions/runs/46321523243/job/141535109086 8339-async-counters/v8 exit code -6 (SIGABRT)

The previous main push run (29088cfc8) passed FreeBSD with the same test.

main failure

The pcap is read to EOF normally, then shutdown hangs and the engine is killed after the 60s timeout:

Info: pcap: pcap file .../offline-replay-determinism/test.pcap end of file reached (pcap err code 0)
Notice: suricata: Signal Received.  Stopping engine.
Error: threads: Engine unable to disable packet  threads. Killing engine [TmThreadDisablePacketThreads:tm-threads.c:1563]

That is the FatalError in TmThreadDisablePacketThreads() (src/tm-threads.c) when the packet threads don't reach the flow loop / done state within 60s.

For the -6 (SIGABRT) runs the debug output has no stderr, so it is not yet known whether they come from the same path.

Notes

The test runs 4 workers (threading.set-cpu-affinity + worker-cpu-set threads) and by design at least 2 of them never see a packet. This looks like a shutdown hang or race involving idle workers, exposed on the slower FreeBSD qemu VM.

VJ Updated by Victor Julien about 6 hours ago Actions #1

Wonder if this is related to

** CID 1711685:       Concurrent data access violations  (MISSING_LOCK)
/src/tm-threads.c: 2417           in TmThreadsGetMinimalTimestamp()

_____________________________________________________________________________________________
*** CID 1711685:         Concurrent data access violations  (MISSING_LOCK)
/src/tm-threads.c: 2417             in TmThreadsGetMinimalTimestamp()
2411             Thread *t = &thread_store.threads[s];
2412             /* unregistering clears a slot in place, so a hole tells us nothing
2413              * about the entries after it */
2414             if (t->in_use == 0) {
2415                 continue;
2416             }
>>>     CID 1711685:         Concurrent data access violations  (MISSING_LOCK)
>>>     Accessing "t->type" without holding lock "Thread_.spin". Elsewhere, "Thread_.type" is written to with "Thread_.spin" held 2 out of 2 times.
2417             if (t->type != TVT_PPT) {
2418                 continue;
2419             }
2420             SCTime_t pktts = SC_ATOMIC_GET(t->pktts);
2421             if (SCTIME_CMP_GT(pktts, maxts)) {
2422                 maxts = pktts;

Actions

Also available in: PDF Atom