Repository navigation
Description
Description
Main nightly Sysbench read-write encounters real server-side fileservice idle-source timeouts under the 1TP+2AP weekly workload. This is an observed supported-workload failure; its product versus infrastructure root cause is not yet established and requires investigation.
Environment
- MatrixOne main SHA:
294076edf4965fdccce9eeddfca80bfa15f49098; workflow SHAfa3d3d802955497730e333c11279c25817b8a7f9. - TKE 1TP+2AP, CN 14 CPU / 55 GiB, shared TN 14 CPU / 32 GiB. Sysbench 10 tables × 10 million rows, 1000 threads, planned 300 seconds. AP TPCH 1T loading was concurrent by the weekly workload contract.
- Failing job: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/43727826481/job/132868106387 (attempt 2).
Steps to reproduce
- Run the documented weekly TKE TP/AP family workload, including Sysbench 1000W read_write / 1000 threads and concurrent AP TPCH 1T loading, using the version and resources above.
- Observe Sysbench client errors and matching TP CN server logs. This is a workload-level reproducer, not yet a minimized deterministic reproduction.
Actual behavior
At 2026-11-15 17:15:20.970 UTC, client and TP server reported 20101 fileservice: no bytes from the source within the idle timeout for SELECT c FROM sbtest8 WHERE id=9537982; an UPDATE on sbtest5 failed with the same error immediately afterwards. The configured source idle interval in this version is 20 seconds. The case did not complete successfully.
Expected behavior
Valid reads and updates complete without fileservice idle timeout under the declared workload and resource contract.
Stability and controls
- The same error was also observed in prior nightly https://github.com/matrixorigin/mo-nightly-regression/actions/runs/43607872311 and an isolated Warm old-version comparison: old
bc9b822cd1f5d742b550f8366516fd836936ba70read-write failed once in three rounds; subsequent mainc71e0c6904f444f45c4f4095be0e9f088b0c3b50passed three rounds. These were sequential with differing cache/order, and Warm CN memory was 48 GiB rather than nightly 55 GiB; they do not establish a fix or exclude environment effects. - Not reproduced 3/3 on latest main. Full post-DML physical consistency and failure atomicity were not independently verified.
Evidence and analysis
- TP server
readutil/reader.go:877andfrontend/session.go:4912confirm the same failure as the client. TP CPU 2-minute average was 13.75/14 cores and CFS throttled-period ratio 75.4%; the latter is not percentage of CPU time lost. - During 17:05–17:20 UTC, TN S3 read rate was roughly 743–778 MB/s (two-minute rate); goroutine samples contain merge-object → load block → S3FS.Read. TN logged merge scheduler pause for its low available-memory budget. This is not proof of OOM kill or that TPCH caused all the traffic or the timeout.
- Need request/object-level latency and network/storage evidence to discriminate product fileservice behavior from shared-resource or infrastructure contention. No regression commit is established.
Regression coverage
After diagnosis, add a targeted read/write and fileservice regression with controlled shared-I/O load and assertions for errors, data correctness, cleanup and cancellation.
Related
- [Bug]: Main Wiki IVF 10M drops to ~2 QPS with S3 read amplification and RPC failures (suspected #32697 regression) #32760 reports Wiki IVF index-cache/S3 amplification with a similar idle error. The direct IVF index-file preload path differs from this ordinary-table read; a shared underlying cause is unproven and duplication remains possible.
Activity
jiangxinmeng1 commentedon Nov 16, 2026
I traced the exact server error
fileservice: no bytes from the source within the idle timeoutto PR #32697, merged intomainasb465f868241on 2026-11-14. That commit addedsourceIdleTimeout = readWriteTimeout(20 seconds),idleReader, and this error string inpkg/fileservice/disk_cache_download.go. Its parent does not contain the check. The failing MO SHA294076edf4965fdccce9eeddfca80bfa15f49098contains it; the comparison SHA5009da9d29cad96ea4a8ad120af061aa1bc539e2does not.PR #32382 was a stacked dependency of #32697, but #32382 itself was closed without merging. The check entered
mainthrough #32697.This establishes which PR introduced the 20-second idle-source check and error. It does not yet establish that the PR caused the underlying source-read stalls. In the failing TP CN, both a range read and a whole-object/cache-fill read took about 20 seconds immediately before the SQL errors; the source of those stalls still needs investigation.
cpegeric commentedon Nov 16, 2026
Root cause found and reproduced. The 20 s idle timeout from #32697 also counts the time a read waits for a free connection in the HTTP pool, not only stalls of a download in progress.
Mechanism
idleReader(disk_cache_download.go:346-379) starts its timer at the firstRead. Both object readers send their GET lazily, on that firstRead:lazyObjectReader;max-conns-per-hostconnections (128) are busy, the GET waits innet/http.(*Transport).getConn, and that wait runs on the 20 s idle clock.readFullObjectToDiskCacheStreaming) passes the error to the query. A failed range flight falls back to the reader fetching its own bytes, so there the error becomes a long wait instead.Reproduction
max-conns-per-hostA goroutine profile in the 13-connection run showed 308 reads parked in
Transport.getConnunderidleReader.Read.Fix (PR to follow)
Start the idle timer at the first byte received. Waiting for a connection and for the response headers is then bounded by the query's context, as before perf(fileservice): keep IVF-Flat entries objects in the index-file cache #32697. A body that stalls mid-download is still detected. A test build of this change gave:
max-conns-per-hostLet a failed whole-object fill fall back to range reads, as a failed range flight already does, instead of failing the query.
Queueing for connections remains under extreme contention: with 13 connections, reads still waited up to 17 s. That is waiting, not an error. #32796 (remote scans reading block by block, without prefetch) adds to the connection pressure on AP CNs, and its fix should reduce it.
cpegeric commentedon Nov 16, 2026
Fixed in #32812, which lands #32697 again after its revert in #32809.
The rule now:
Same MinIO starvation load as above, against the fix:
max-conns-per-hostRevert "perf(fileservice): keep IVF-Flat entries objects in the index…
cpegeric commentedon Nov 24, 2026
Decision (2026-11-24, won't change):
max-conns-per-hostbelow 64 is rejected at startup.This answers the review finding on
object_storage_arguments.go:197(1–63 now fails file-service initialization).0keeps the default pool (128 per host). Any value of at least 64 is used as configured, and background downloads hold at most half of it.0or to at least 64 before upgrading. The startup error names the setting and the value.This is recorded in
docs/design/20261110-object-prefetcher.md(Compatibility, rollout and operations).