Skip to content

[6.42] [io] Do not serve unread blocks from the cache after a read error [rev 2] - #24249

Merged
dpiparo merged 5 commits into
root-project:v6-42-00-patchesfrom
root-project-bot:BP_6.42_pull_24224
Nov 19, 2026
Merged

dpiparo merged 5 commits into
root-project:v6-42-00-patchesfrom
root-project-bot:BP_6.42_pull_24224

Conversation

@root-project-bot

Copy link
Copy Markdown

Backport of #24224, requested by @jblomer.

chrisburr and others added 5 commits November 19, 2026 12:45
TFileCacheRead::ReadBufferExtNormal sorts the list of blocks to read,
which marks it as sorted, before reading them all into fBuffer with
TFile::ReadBuffers. When that read fails, e.g. on an XRootD socket
timeout, only the request that triggered it reports an error: the
following requests for blocks of the same list find them in the list
and are served from fBuffer, which still holds the blocks of the
previous list, or nothing at all.

The baskets of the rest of the cluster are thus unzipped and streamed
from unrelated data. Reading LHCb DSTs over XRootD, a single timeout
is followed by "Inconsistency found in header (nin=0, nbuf=0)" errors
and allocations of several GB from the bogus content.

Reset the list of blocks when reading them fails, so that subsequent
requests miss the cache and are read from the file.

Assisted-by: claude-code:claude-opus-5-5
(cherry picked from commit e4c1e0d)
TTreeCacheUnzip::GetUnzipBuffer reads the requested basket from the
file only when TTreeCache::ReadBufferExt reports a miss. When that
call itself fails to read the blocks of the cache, it returns -1, and
the basket is unzipped from whatever fCompBuffer holds: the previous
basket, or uninitialised memory.

This happens when learning prefill has filled the cache before the
first basket is requested. Treat a failure as a miss, so that the
basket is read from the file.

Assisted-by: claude-code:claude-opus-5-5
(cherry picked from commit 4eba8ff)
Co-authored-by: Philippe Canal <pcanal@fnal.gov>
(cherry picked from commit d62a3bd)
Co-authored-by: Philippe Canal <pcanal@fnal.gov>
(cherry picked from commit f7e7691)
@github-actions

Copy link
Copy Markdown

Test Results

    24 files      24 suites   4d 0h 31m 43s ⏱️
 3 892 tests  3 889 ✅ 0 💤 3 ❌
83 863 runs  83 860 ✅ 0 💤 3 ❌

For more details on these failures, see this check.

Results for commit ee84759.

@pcanal

pcanal commented Nov 19, 2026

Copy link
Copy Markdown
Member

(arbritary comment to test email filter - please ignore - thanks ;) ).

@dpiparo
dpiparo merged commit 78b4eae into root-project:v6-42-00-patches Nov 19, 2026
38 of 40 checks passed
@dpiparo
dpiparo deleted the BP_6.42_pull_24224 branch November 19, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants