Skip to content

rate_limit_sni_expiry AuTest is flaky: the holder races FIFO removal #13714

Closed

Description

@moonchen

Summary

rate_limit_sni_expiry can fail before exercising queue expiry: the helper removes the holder's FIFO before the background process opens it. Without the holder occupying the single slot, the next connection is admitted immediately and the expected too old message never appears.

Observed

AuTest build 43964, shard 2of4 for #13712 at 5168392148496eb83305e61fffcab3edbcf68e21, finished with 143 passed, 1 failed, and 5 skipped:

file .../ts/log/traffic.out : a queued connection was expired - Failed
    Reason: ... did not contains expression: "too old"

The saved sandbox contains this in the client's stream.stderr.txt:

.../rate_limit_sni_expiry_client.sh: line 57: /tmp/rl_holder.MoWFrK/fifo: No such file or directory

traffic.out shows only two connections reserving and releasing the slot, at 18:21:53 and 18:21:58. Neither queues. ATS exits normally, the underflow/abort assertion passes, and the helper still prints rate_limit-expiry-done and returns 0.

Cause

The holder setup does this:

mkfifo "$fifo"
${OSSL} <"$fifo" >/dev/null 2>&1 &
exec 3<>"$fifo"
rm -rf "$fifo_dir"
sleep 3

The parent's read/write open of the FIFO does not wait for the background child to open its read end. If the parent removes the directory first, the child's redirection fails and the holder never connects. The later sleep cannot recover from that failure, and the helper does not check the holder's status.

Suggested fix

Keep the FIFO available until the holder has opened it, or establish the required descriptors before launching the holder. Wait for the holder to reserve the slot before starting the queued connection, and report holder startup failures directly. Preserve the assertion that expiry was actually exercised.

Notes

Related to #13679, which covered the separate rate_limit_sni_queue test's short handshake window. This failure is in rate_limit_sni_expiry and includes a concrete FIFO-open error. Found while checking CI for #13712; that PR does not change this helper.

Activity

  1. self-assigned this
    on Sep 23, 2026
  2. added this to the 11.0.0 milestone on Sep 23, 2026
  3. added a commit that references this issue on Sep 23, 2026
    b63c370
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

AuTestBugTestsrate_limit

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions