From 1d623196ebc4d67e85ab65ea460e00be0566f569 Mon Sep 17 00:00:00 2001 From: Dario Mirovic Date: Tue, 31 Mar 2026 02:24:51 +0200 Subject: [PATCH] test: cluster: fix syslog listener datagram ordering race UnixSockerListener used ThreadingUnixDatagramServer, which spawns a new thread per datagram. The notification barrier in get_lines() relies on all prior datagrams being handled before the notification. With threading, the notification handler can win the lock before an audit entry handler, so get_lines() returns before the entry is appended. clear_audit_logs() then clears an incomplete buffer, and the late entry leaks into the next test's before/after diff. Switch to sequential UnixDatagramServer. The server thread now handles datagrams in kernel FIFO order, so the notification is always processed after all preceding audit entries. Refs SCYLLADB-1277 --- test/cluster/test_audit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cluster/test_audit.py b/test/cluster/test_audit.py index e270cb2f74..daf16f7173 100644 --- a/test/cluster/test_audit.py +++ b/test/cluster/test_audit.py @@ -345,7 +345,7 @@ class UnixSockerListener: elif data != "Initializing syslog audit backend.": self.server.parent_instance.lines.append(data) - class UnixDatagramServer(socketserver.ThreadingUnixDatagramServer): + class UnixDatagramServer(socketserver.UnixDatagramServer): def __init__(self, socket_path, handler, parent_instance, lock): self.parent_instance = parent_instance self.mutex = lock