savagearts-tech opened a new issue, #71131:
URL: https://github.com/apache/doris/issues/71131

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   4.1.5 (doris-4.1.5-release-917b20be838)
   
   ### What's Wrong?
   
   ### Environment / Version
   - Apache Doris **4.1.5 release**, FE and BE all report 
`doris-4.1.5-release-917b20be838`
   -   (= upstream commit 917b20be83878e98f94e3ebf7efccc80346e3e50, "add 4.1.5 
release (#68884)")
   - - Disaggregated storage-compute deployment on Kubernetes: 3 FE + 5 BE
   - - - Shared storage: S3-compatible object storage (self-hosted MinIO); 
local file cache and
   - - -   StoragePageCache enabled
   - - - - Workload: large cold scans (~25 GB, ~1.27B rows per query)
   ### Symptom
   Starting 2026-11-27 02:03 (local time), every query touching one specific 
tablet failed with:
   
   ```
   [INTERNAL_ERROR]Size information unmatched, _data.size:65570, 
_num_elements:16384, expected size is 65552. tablet=1795747680826
   ```
   
   Key observations:
   - 65570 = 65552 + 18: the `Slice` handed to the page decoder is exactly 18 
bytes longer
   -   than the expected page size.
   - - The failure came from a single BE — the one that had just executed a 
cold scan of the
   - -   whole table. Other BEs served the same tablet without errors during 
the whole window.
   - - - It persisted for ~15 hours despite query retries, and healed 
spontaneously between
   - - -   17:10-17:20 while normal load continued — consistent with the bad 
entry finally being
   - - -   evicted from the in-memory page cache (LRU), not with any data or 
network repair.
   - - - - After recovery the tablet reads normally and has not failed again.
   ### Evidence that the remote object is intact
   - S3 `HEAD` before and after the failure window returned identical `ETag` and
   -   `Content-Length` (490,046,621 bytes); the object was never rewritten 
during the incident.
   - - A byte-range GET of the affected page region (offset ~159,443,956, well 
before the
   - -   segment footer) returns a well-formed zstd page (magic `28 b5 2f fd`) 
that decodes
   - -   correctly. The 18 extra bytes do not exist in the object — they only 
exist inside the
   - -   BE's in-memory page-cache entry.
   ### What we believe happened (hypothesis + code refs on master as of Nov 
2026)
   1. During the cold scan at 02:02:56, a data-page read populated a 
StoragePageCache entry
   2.    whose `Slice` retained 18 trailing bytes beyond the expected page size 
(65552 expected,
   3.    65570 cached) — i.e. an over-long slice got cached; the object itself 
was never wrong.
   4. 2. On every subsequent read, `BitshufflePageDecoder::init()`
   5.    (be/src/storage/segment/bitshuffle_page.h:308) rejected the cached 
slice with
   6.    `Status::InternalError("Size information unmatched ...")` — note this 
is
   7.    `INTERNAL_ERROR`, not `CORRUPTION`.
   8. 3. The read path actually has two self-healing mechanisms, but neither 
can fire here:
   9.    - `PageIO`'s erase-and-retry (be/src/storage/segment/page_io.cpp:303 
and :328) only
   10.      triggers when the status is `ErrorCode::CORRUPTION` (:303 
additionally requires cloud
   11.      mode). `INTERNAL_ERROR` is returned to the query untouched, so the 
poisoned cache
   12.      entry is never erased.
   13.    - `FileColumnIterator::_read_data_page` 
(be/src/storage/segment/column_reader.cpp:3292)
   14.      has a `retry_original` lambda (:3305) that erases the 
StoragePageCache entry and
   15.      re-reads bypassing the cache — but it is gated on 
`context.retry_on_error`, which
   16.      defaults to `false` (be/src/storage/segment/column_reader.h:621) 
and is only set to
   17.      `true` by the read-ahead iterator
   18.      (be/src/storage/segment/read_ahead_file_column_iterator.cpp:76-79). 
Our failing
   19.      queries did not use read-ahead, so the retry was never armed.
   20. 4. Net effect: one bad in-memory cache entry kept a tablet unreadable 
for ~15 hours on one
   21.    BE. Query retries can never succeed, and neither built-in self-heal 
path covers this
   22.    error class.
   ### Related data point
   The same error signature has also been reported against the StarRocks fork 
(shared code
   lineage): 
[starrocks/starrocks#62841](https://github.com/StarRocks/starrocks/issues/62841)
 —
   `Size information unmatched, _data.size:65573, ... expected size is 65552` 
on a
   shared-data Kubernetes deployment with data cache enabled. Notably the 
expected size is
   identical to ours (65552 = 64 KiB page body + 16-byte Bitshuffle header) 
while the
   overrun differs (+21 vs our +18), which suggests the over-read happens at the
   remote-read/file-cache boundary rather than in Bitshuffle decoding itself. 
That issue was
   closed as stale without a fix; #63783 in the same repo reports the same 
error family
   (Invalid encoding type / invalid pos) on heavy scans with spilling.
   
   ### What You Expected?
   
   Queries touching the affected tablet should keep succeeding — or at least 
recover on
   retry. A page-size mismatch on a cached data-page `Slice` looks like cache 
corruption and
   should be treated as `CORRUPTION`, so the existing erase-and-retry path in 
`PageIO` can
   evict the poisoned StoragePageCache entry and re-read the page from remote 
storage.
   Instead, it surfaces as `INTERNAL_ERROR`, bypasses both self-heal paths, and 
keeps the
   tablet unreadable for ~15 hours on one BE until LRU eviction happens to 
clear it.
   
   ### How to Reproduce?
   
   Not deterministically reproducible yet. Conditions when it occurred 
(2026-11-27):
   1. Doris 4.1.5, disaggregated storage-compute on Kubernetes (3 FE + 5 BE), 
shared storage
   2.    = self-hosted MinIO (S3-compatible), local file cache + 
StoragePageCache enabled.
   3. 2. A large cold scan (~25 GB, ~1.27B rows) ran at 02:02:56 on one BE.
   4. 3. From 02:03 onward, every query touching one specific tablet failed on 
that BE only
   5.    with the error above (65570 vs expected 65552, +18 bytes); other BEs 
served the same
   6.    tablet fine the whole time.
   7. 4. Retries never succeeded; the error disappeared between 17:10-17:20 
during normal load,
   8.    consistent with the bad entry being evicted from the in-memory page 
cache (LRU).
   9.    Restarting the BE would also clear it (not exercised — we waited for 
LRU).
   
   ### Anything Else?
   
   ### Questions
   1. Is this known / already fixed somewhere? We found no existing issue for 
this error
   2.    signature in apache/doris (searched 2026-11-30), and no commits on 
branch-4.1 have
   3.    touched any of the files above since the 4.1.5 release commit.
   4. 2. Which read path can produce a cached data-page `Slice` with trailing 
bytes beyond the
   5.    expected page size (65552 + 18)? The page lies well before the segment 
footer and the
   6.    range GET proves the extra bytes are not in the object. Any pointer on 
where the slice
   7.    length could get inflated (multi-range read boundary, over-read that 
includes the page
   8.    footer or an adjacent structure, cache-block padding) would help us 
reproduce.
   9. 3. Would you consider classifying this page-size mismatch as `CORRUPTION` 
(so the existing
   10.    cache erase + retry path can self-heal), or defaulting 
`retry_on_error` to `true` for
   11.    the plain column iterator in cloud/disaggregated mode? Either change 
seems cheap and
   12.    would have turned a ~15h outage into a sub-second retry.
   13. 4. Is there any mitigation on 4.1.5 besides waiting for LRU eviction / 
restarting the BE —
   14.    e.g. a safe way to flush StoragePageCache entries for one file?
   Happy to provide be.INFO excerpts, be.conf (cache-related settings only) and 
a hexdump of
   the affected page region (no business data). Thanks!
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • [I] [Bug] (be) "Size inform... savagearts-tech (via GitHub) via commits

Reply via email to