From 3ae698f5be98e7ccffe7cf93844eb293ca3d1cc6 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Wed, 14 Oct 2026 13:07:58 +0800 Subject: [PATCH] Raise the test origin's listen backlog socketserver listens with a backlog of 5. With concurrent connections through the proxy on a loaded machine (parallel ctest), the backlog overflows, the kernel resets the origin connection, and the proxy correctly drops the client, which surfaced as intermittent alloc_audit_report failures ("getpeername: Invalid argument" in ss-local, "Connection reset by peer" in ss-server). Reproduced reliably at 64 concurrent connections; gone with a backlog of 256. --- tests/interop.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/interop.py b/tests/interop.py index 7b7efb48..a03da926 100644 --- a/tests/interop.py +++ b/tests/interop.py @@ -34,6 +34,10 @@ class UDPHandler(socketserver.BaseRequestHandler): class TCPOrigin(socketserver.ThreadingTCPServer): daemon_threads = True + # socketserver's default listen backlog is 5. Concurrent connections + # through the proxy overflow it on a loaded machine; the kernel then + # resets the origin connection, which looks like a proxy failure. + request_queue_size = 256 class UDPOrigin(socketserver.ThreadingUDPServer):