Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues. The earlier remote-cache report [Bug]: fileservice remote cache panics on malformed keys and response indexes #25885 covers invalid RPC shape and index handling. This report covers the test's ownership of a successful fallback read.
Branch Name
4.2-dev
Commit ID
Official branch comparison 835b9e4a8974c4313b379f8d295fe545878d287e. Observed in #33094 at e5ab449709cf4f9119ef4db75cccbc22a78dd86a.
Other Environment Information
- CI runner: Linux/x86, Go 1.26.4, CGO enabled,
matrixone_testtag,-short,-covermode=set. - Focused comparison: Darwin/arm64 with the same Go version, CGO, build tag, and coverage mode. Debug allocator sampling and more frequent GC expose the leaked buffer with a narrow test selection.
Actual Behavior
Run 45163821269, attempt 1, failed in UT Coverage on Ubuntu/x86 when the tagged go test coverage command exited 1. The reporting step attributed the failure to package pkg/fileservice. The allocation stack identifies TestLocalFSFallsBackAfterInvalidRemoteCacheHit even though the asynchronous finalizer raised the panic during TestS3FS/default_policy/file_service/basic. Workflow run · UT Coverage job 137656203402
panic: missing free: address <address>, size 3
(*IOEntry).prepareData pkg/fileservice/io_entry.go:119
(*LocalFS).read pkg/fileservice/local_fs.go:800
(*LocalFS).Read pkg/fileservice/local_fs.go:615
TestLocalFSFallsBackAfterInvalidRemoteCacheHit
pkg/fileservice/remote_cache_test.go:370
The Coverage merge failed at Verify coverage prerequisites because UT Coverage published no complete profile. It did not calculate a coverage verdict. Coverage job 137678059763
Expected Behavior
The regression test releases the successful fallback read's owned IOVector buffer after asserting the returned bytes. The fileservice package then exits normally and can publish its coverage profile.
Steps to Reproduce
- Run the existing regression at official
4.2-devcommit835b9e4a8974c4313b379f8d295fe545878d287e. - Enable checked allocation for every allocation and run the exact test repeatedly to make its finalizer observable.
GOTOOLCHAIN=go1.26.4 GOWORK=off CGO_ENABLED=1 GOGC=10 MO_MALLOC_DEBUG=1 \
go test -mod=readonly -count=32 -json -short -v -tags matrixone_test \
-timeout 120s -p 8 -covermode=set -coverprofile=/tmp/mo-fs-fallback-cover.out \
-coverpkg=./pkg/fileservice,./pkg/common/malloc \
-run '^TestLocalFSFallsBackAfterInvalidRemoteCacheHit$' ./pkg/fileserviceAdditional information
- Official
4.2-devand the PR head both exited 1 with the same 3-bytemissing freestack. The test's successfulLocalFS.Readassigns an owned buffer throughIOEntry.prepareData. The test reads the bytes and returns without releasing the vector. Adding onlydefer vector.Release()immediately after a successful read in a temporary official-source test overlay yielded 32/32 passes with the same allocator and test flags. - The PR's complete diff has no intersection with the failing test's Go dependency closure and does not change the workflow. The exact Linux CI JSON records
TestPointIndexSelectionAfterAnalyzeand the focused cache and planner regressions as passed. - Planned CI action for Improve point-index selection for skewed equality predicates (4.2-dev backport) #33094 is one failed-jobs rerun of the linked run after attempt 1 reaches a terminal state.
Activity
[4.2-dev] fix(fileservice): release fallback read buffer in test (#33106