Conversation
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)
Contributor
|
[approve ci clang-analyzer] |
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.
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.
Cherry-picks for the 10.1.5 release, taken from the
ATS v10.1.xproject items atstatus
For v10.1.1. Picked in master-mergedAtorder. Every commit carries a(cherry picked from commit ...)trailer.Draft on purpose — please land by fast-forward, not via the merge button.
Landed (11)
Adaptation notes
#13322 — 10.1.x lacks #13215 (
slice: Avoid redundant prefetch re-scheduling), whichadded the
bytes 10-14/18 hit-freshcache-log line. That entry was dropped from the newexpected_cache_entrieslist so the assertions match what this branch actually emits (perthe branch's own gold file, now removed by this commit).
#13290 — this branch's
ats_replay.test.extpredates master'serror_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_expressionhelper,enable_quic,http_ports/https_ports/http3_portspopping). Added the
import rethat master already had. The four new replay files only usetraffic_outvalidation,multiline,enable_tlsandenable_quic, all of which thisbranch supports (
MakeATSProcesstakesenable_quic;AddVerifierClientProcesstakeshttp3_ports;Testers.ContainsExpressiontakesreflags).#13323 — kept this branch's
MAX_MEMORY_USAGEearly-return block, which master does nothave, and applied the new
expect_log_entryhelper 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 wasbackported first (
c2b40948d2), without #13390 underneath. Resolved by taking master'spost-hardening
ImageTransform.cc— the resulting file is byte-identical to master atb4a40d1b13, 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.ccdoes not exist here. The equivalent fix is appliedto
LogAccess::marshal_client_host_port(), the same accessor on this branch. This also linesup with
marshal_client_host_ip(), which already readst_state.effective_client_addr, sothe logged client IP and port now come from the same endpoint.
effective_client_addris populated identically on both branches (HttpSM.cc, fromnetvc->get_effective_remote_addr()).#13410 — scoped-enum drift only:
field_find(std::string_view)→ the branch'sfield_find(MIME_FIELD_CONTENT_LENGTH, MIME_LEN_CONTENT_LENGTH),HTTPStatus::NO_CONTENT→HTTP_STATUS_NO_CONTENT, andHttpTunnelType_t::CACHE_WRITE→HT_CACHE_WRITE. Insertionand deletion counts match upstream exactly.
Not picked
Fix connect attempt retries) — carries theIncompatiblelabel, andlegitimately: it changes retry behavior and renames
connect_attempts_max_retries_down_servertoconnect_attempts_max_retries_suspect_server(old name deprecated). Left atFor v10.1.1, milestone untouched, for the RM to decide.Share HTTP accept properties) — an 18-file architectural refactor(new shared HTTP acceptor base, acceptor lifetime changes), labeled
Cleanup, milestoned11.0.0, and not present on 10.2.x. Backporting it to 10.1.x would leave the oldermaintenance 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.xdirectly, so there is nothing tocherry-pick; it needs review and merge.
Local verification
cmake --preset dev+cmake --build build-dev: clean.ctest: 105/106 pass. The one failure istest_jsonrpcserver(Subprocess aborted), theknown 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.