Skip to content

10.1.x: cherry-picks for the 10.1.5 release - #13678

Draft
cmcfarlen wants to merge 14 commits into
apache:10.1.xfrom
cmcfarlen:10.1.x-picks-20260914
Draft

cmcfarlen wants to merge 14 commits into
apache:10.1.xfrom
cmcfarlen:10.1.x-picks-20260914

Conversation

@cmcfarlen

Copy link
Copy Markdown
Contributor

Cherry-picks for the 10.1.5 release, taken from the ATS v10.1.x project items at
status For v10.1.1. Picked in master-mergedAt order. Every commit carries a
(cherry picked from commit ...) trailer.

Draft on purpose — please land by fast-forward, not via the merge button.

Landed (11)

PR Title Pick
#13322 slice_prefetch.test.py: address cache.log flakiness adapted
#13290 Expand client IP debug logging test coverage adapted
#13372 autest: skip async handshake test when plugin is absent clean
#13323 stale_response.test.py: address log wait flakiness adapted
#13390 Handle webp_transform input robustly adapted
#13379 Preserve client port in transaction logs adapted
#13423 Fix Fedora OTEL and WAMR builds clean
#13432 healthchecks: reference count status file data clean
#13410 Cache empty chunked responses adapted
#13642 Proxy Verifier v3.2.0 clean
#13558 keep buflen in sync in dns_process address copy path clean

Adaptation notes

#13322 — 10.1.x lacks #13215 (slice: Avoid redundant prefetch re-scheduling), which
added the bytes 10-14/18 hit-fresh cache-log line. That entry was dropped from the new
expected_cache_entries list so the assertions match what this branch actually emits (per
the branch's own gold file, now removed by this commit).

#13290 — this branch's ats_replay.test.ext predates master's error_log /
access_log / server-log / client-log validation blocks and _requires_persistent_ats.
Auto-merge wanted to drag all of that in; only #13290's own changes were kept
(_contains_expression helper, enable_quic, http_ports/https_ports/http3_ports
popping). Added the import re that master already had. The four new replay files only use
traffic_out validation, multiline, enable_tls and enable_quic, all of which this
branch supports (MakeATSProcess takes enable_quic; AddVerifierClientProcess takes
http3_ports; Testers.ContainsExpression takes reflags).

#13323 — kept this branch's MAX_MEMORY_USAGE early-return block, which master does not
have, and applied the new expect_log_entry helper on top.

#13390 — inverted order relative to master. On master #13390 landed before
webp_transform: bound buffered body and ImageMagick decode; on 10.1.x that hardening was
backported first (c2b40948d2), without #13390 underneath. Resolved by taking master's
post-hardening ImageTransform.cc — the resulting file is byte-identical to master at
b4a40d1b13, i.e. exactly this branch's file plus #13390 and nothing else.
Not compile-checked locally (no ImageMagick/Magick++ on the build host, BUILD_MAGICK=FALSE);
relying on CI for that file.

#13379 — 10.1.x predates the LogData de-virtualization (#13123), so
src/proxy/logging/TransactionLogData.cc does not exist here. The equivalent fix is applied
to LogAccess::marshal_client_host_port(), the same accessor on this branch. This also lines
up with marshal_client_host_ip(), which already reads t_state.effective_client_addr, so
the logged client IP and port now come from the same endpoint.
effective_client_addr is populated identically on both branches (HttpSM.cc, from
netvc->get_effective_remote_addr()).

#13410 — scoped-enum drift only: field_find(std::string_view) → the branch's
field_find(MIME_FIELD_CONTENT_LENGTH, MIME_LEN_CONTENT_LENGTH), HTTPStatus::NO_CONTENT
HTTP_STATUS_NO_CONTENT, and HttpTunnelType_t::CACHE_WRITEHT_CACHE_WRITE. Insertion
and deletion counts match upstream exactly.

Not picked

  • Fix connect attempt retries #13102 (Fix connect attempt retries) — carries the Incompatible label, and
    legitimately: it changes retry behavior and renames
    connect_attempts_max_retries_down_server to
    connect_attempts_max_retries_suspect_server (old name deprecated). Left at
    For v10.1.1, milestone untouched, for the RM to decide.
  • Share HTTP accept properties #13514 (Share HTTP accept properties) — an 18-file architectural refactor
    (new shared HTTP acceptor base, acceptor lifetime changes), labeled Cleanup, milestoned
    11.0.0, and not present on 10.2.x. Backporting it to 10.1.x would leave the older
    maintenance branch carrying a refactor the newer one lacks, and needed 5 hand-resolved
    conflicts across the HTTP/2, HTTP/3 and Socks accept paths for no bugfix payoff. Left at
    For v10.1.1, milestone untouched.
  • 10.1.x: ocsp: add single-cert stapling fast path and certinfo RAII (#13229) #13467 — already an open PR targeting 10.1.x directly, so there is nothing to
    cherry-pick; it needs review and merge.

Local verification

cmake --preset dev + cmake --build build-dev: clean.
ctest: 105/106 pass. The one failure is test_jsonrpcserver (Subprocess aborted), the
known macOS-local unix-socket/restart-timing flake; nothing in this batch touches jsonrpc.
Autests were not run locally (macOS host, and the proxy-verifier fetch is blocked here) —
CI is the arbiter for the autest changes, which are the bulk of this batch.

bneradt and others added 11 commits September 14, 2026 14:53
Background slice prefetch requests can log around the client
transactions. A run can therefore contain the expected cache records
while still failing an ordered cache.log gold comparison.

This replaces the full-file gold comparison with per-entry log
assertions that verify the expected cache and prefetch records
independently of ordering, then removes the unused gold file.

Fixes: apache#13311
(cherry picked from commit c179b6b)
Before this patch, the client ip debug logging test only covered one
HTTP transaction, so regressions across protocols or persistent client
sessions could pass unnoticed.

This converts the test to replay-driven coverage for HTTP, HTTPS, and
HTTP/2, with an HTTP/3 scenario enabled when QUICHE is available. Each
replay sends multiple transactions on one client connection and checks
that all four request and response header dumps include per-transaction
markers.

This test found no issues, thus this is a test-only patch.

(cherry picked from commit a2c55e3)
The async_handshake test plugin is only built with OpenSSL
(TS_USE_TLS_ASYNC). SkipUnless does not evaluate its conditions where
it appears; it only registers them for the framework to check later,
so the test file keeps executing and PrepareTestPlugin ran at load
time and raised a ValueError when the plugin was missing, reported as
a test exception instead of a skip. Guard the call on file existence
so the test skips cleanly on non-OpenSSL builds.

(cherry picked from commit caf9c87)
The stale_response log checks can run before every directive that
they later assert has been written. Waiting for one marker with a
sleep-based process leaves the final content checks exposed to ATS log
flush timing when both stale directives are expected.

This replaces the sleep-based watcher with explicit await runs for each
directive being asserted. The test now waits for the matching
stale-while-revalidate and stale-if-error entries before performing the
final log content checks.

Fixes: apache#13301
(cherry picked from commit e3dc7e7)
Empty or mislabeled image responses need consistent handling by the
webp_transform plugin. These inputs should pass through unchanged while
valid images continue to be converted normally.

This checks the expected image signature before conversion and preserves
the original body and content type whenever conversion is bypassed.
Replay coverage exercises empty, invalid, and valid image bodies.

(cherry picked from commit f7f1d83)
Client source ports could be logged as zero when the live inbound
connection was cleared before transaction log marshalling. This
obscured the effective client endpoint in access logs.

This reads the port from the effective client endpoint retained by
HttpSM, keeping it available after connection cleanup.

(cherry picked from commit a92d8ba)

Backport note: 10.1.x predates the LogData de-virtualization (apache#13123),
so src/proxy/logging/TransactionLogData.cc does not exist on this
branch. The equivalent fix is applied to
LogAccess::marshal_client_host_port() in src/proxy/logging/LogAccess.cc,
which is the same accessor on this branch. This also matches
marshal_client_host_ip(), which already reads
t_state.effective_client_addr, so the logged client IP and port now come
from the same endpoint.
Fedora CI could silently omit the OTEL and WAMR plugins, while
BoringSSL builds mixed system OpenSSL headers and libraries. This made
the updated dependency image appear usable without proving either
plugin could load.

This makes the Fedora presets require both plugins and selects the
matching curl and TLS roots for system OpenSSL and BoringSSL builds.

This also distinguishes BoringSSL from OpenSSL 3 during configuration
and gives the WASM targets explicit OpenSSL dependencies so both TLS
variants build and load consistently.

(cherry picked from commit fa297c3)
Replaced file data was retired onto a freelist and freed after a
timeout, but its deadline came from a timestamp taken before a blocking
inotify read. That stale deadline let transactions retain references to
data that was already freed. Files exactly 16 KiB long were also
reported as empty because a final zero-byte read overwrote the saved
length.

This holds each immutable snapshot in an atomic shared_ptr. Every
transaction pins its snapshot, so data lives exactly as long as it is
referenced, without a freelist or request-path mutex. This also
preserves the last successful file-read length and adds AuTest coverage
for concurrent replacement and the 16 KiB boundary.

Fixes: apache#8735
(cherry picked from commit 16bd59a)
Empty chunked responses can complete without starting a cache write VIO,
or can start with an unknown length that is later finalized at zero.
ATS treats both as empty unwritten entries and sends later requests back
to origin. AuTests can also cross a log-rolling boundary before checking
custom logs, producing an unrelated intermittent failure.

This patch starts zero-byte cache writes and recognizes successfully
closed write VIOs whose final length is zero. This preserves the
empty-document state while keeping header-only cache updates distinct.

This also disables log rolling for stale-response log assertions and
covers negative and successful empty responses.

Fixes: apache#11313
(cherry picked from commit d0119c4)
This includes a body delay feature Masaori worked on. See:
https://github.com/yahoo/proxy-verifier#content-delay-specification

(cherry picked from commit 0265a52)
…e#13558)

When decoding a DNS response, the path that copies an unaligned A or AAAA
record into the host entry buffer moved the write position without updating
the count of space remaining, so the two disagreed for the rest of the
response. Update the count after the copy, the same way the name, CNAME and
PTR paths already do.

(cherry picked from commit 80e89e5)
@bneradt

bneradt commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

[approve ci clang-analyzer]

bneradt and others added 3 commits September 15, 2026 09:18
Newer Clang releases expose latent ownership and error-handling issues,
while the analyzer preset currently produces a GCC compilation database
that Clang cannot reliably consume.

This patch selects Clang explicitly for the analyzer preset, fixes the
reported leaks, unchecked stream calls, and directory scanning under a
mutex, and reshapes the remaining flagged code so the analyzer can
follow it. That gives ATS a clean diagnostic baseline before the job
moves to Ubuntu 26.04.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Uninitialized values and redundant initializations cause analyzer
warnings in the 10.1.x branch.

This patch initializes the affected locals and uses a value-initialized
container for volume sorting. It backports apache#12226.

(cherry picked from commit 0cf0f3e)
Clang 21 still flags the unguarded insertion-sort path used for SRV
records, even after the pointer array is initialized. This keeps the
10.1.x analyzer job failing after the earlier analyzer fixes.

This branch backports apache#13593 and
apache#12226, and uses stable sorting with the existing
SRV comparator. The sort preserves priority/key ordering while avoiding
the analyzer's unguarded-sort false positive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants