Fix flaky autests for timeout, sigusr2, and thread_config#13012
Merged
bryancall merged 5 commits intoapache:masterfrom Mar 25, 2026
Merged
Fix flaky autests for timeout, sigusr2, and thread_config#13012bryancall merged 5 commits intoapache:masterfrom
bryancall merged 5 commits intoapache:masterfrom
Conversation
The ssl-delay-server test helper could die unexpectedly when a client disconnects during the handshake delay. SIGPIPE from the broken connection kills the process, or accept() returns EINTR under heavy parallel load. Add SIGPIPE ignore and EINTR retry to keep the server alive for the StillRunningAfter check.
Test 1's Default process had Ready = When.FileExists(diags.log), but by the time Default starts, rotate_diags_log has already moved diags.log to diags.log_old. This creates a deadlock: Default waits for diags.log to exist, but only SIGUSR2 (sent by Default) would cause TS to recreate it. The StartBefore chain already guarantees correct ordering (ts → rotate → Default), so the Ready condition is unnecessary and harmful.
Under ASAN, the ATS process CWD may differ from the expected ts_path. Fall back to matching ts_path in the process command line arguments so the test can find the correct traffic_server process.
Contributor
There was a problem hiding this comment.
Pull request overview
Test-only PR to stabilize three flaky AuTests under parallel ASAN runs by hardening helper behavior and improving AuTest process sequencing / matching.
Changes:
- Update
ssl-delay-serverhelper to ignoreSIGPIPEand retryaccept()onEINTR. - Make
thread_config’s thread-count helper identify the correcttraffic_serverprocess more reliably under ASAN by matching via CWD or command line. - Adjust
sigusr2test process ordering to remove a deadlocking Ready condition and clarify the intended startup chain.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/gold_tests/timeout/ssl-delay-server.cc |
Improves helper robustness against SIGPIPE and EINTR during accept. |
tests/gold_tests/thread_config/check_threads.py |
Improves ATS process identification under ASAN by broadening the matching criteria. |
tests/gold_tests/logging/sigusr2.test.py |
Removes deadlocking Ready gating and documents intended process ordering for SIGUSR2 log rotation. |
accept() returns -1 on error but fd 0 is a valid descriptor (e.g. if stdin is closed). The <= 0 check would incorrectly treat a valid connection as failure.
bneradt
requested changes
Mar 24, 2026
This reverts commit 3db0ce7.
bneradt
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
tls_conn_timeoutandthread_configautests fail intermittently under parallel ASAN runs. Thessl-delay-serverhelper dies when a client disconnects during the handshake delay (SIGPIPE) or whenaccept()is interrupted (EINTR), failing theStillRunningAftercheck. Thethread_configtest can't find the correcttraffic_serverprocess under ASAN because the process CWD differs from the expectedts_path.Changes
ssl-delay-server-- ignore SIGPIPE to prevent the helper from dying when a client disconnects during the TLS handshake delay.accept()on EINTR -- under heavy parallel load,accept()can return EINTR; retry instead of treating it as a fatal error.accept()error check -- use< 0instead of<= 0since fd 0 is a valid descriptor when stdin is closed.check_threads.py-- fall back to matchingts_pathin process command line arguments when the CWD doesn't match, which happens under ASAN.Testing