Conversation
When serving historical queries, rootmulti.Store.Query() opens a read-only memiavl instance (mmap'd), queries it, and defers Close(). The response byte slices (Key, Value) may point directly into the mmap'd region. When the deferred Close() unmaps the memory before JSON marshaling reads the response, the process segfaults. Copies res.Key and res.Value for non-latest queries so they survive the mmap unmap.
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3098 +/- ##
=======================================
Coverage 58.71% 58.71%
=======================================
Files 2094 2094
Lines 172970 172975 +5
=======================================
+ Hits 101555 101560 +5
Misses 62430 62430
Partials 8985 8985
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
yzang2019
approved these changes
Mar 20, 2026
philipsu522
approved these changes
Mar 20, 2026
github-actions bot
pushed a commit
that referenced
this pull request
Mar 20, 2026
When serving historical queries, rootmulti.Store.Query() opens a read-only memiavl instance (mmap'd), queries it, and defers Close(). The response byte slices (Key, Value) may point directly into the mmap'd region. When the deferred Close() unmaps the memory before JSON marshaling reads the response, the process segfaults (observed on `arctic-1`. Copies res.Key and res.Value for non-latest queries so they survive the mmap unmap. Separated out from #3095 to capture a clear commit history of changes for the future archeologists. (cherry picked from commit 145f854)
|
Successfully created backport PR for |
masih
added a commit
that referenced
this pull request
Mar 20, 2026
Backport of #3098 to `release/v6.4`. Co-authored-by: Masih H. Derkani <m@derkani.org>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 21, 2026
## Describe your changes and provide context This PR completely disable zero copy for SC to avoid segfault exception. It also reverts #3098 ## Testing performed to validate your change --------- Co-authored-by: Masih H. Derkani <m@derkani.org>
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.
When serving historical queries, rootmulti.Store.Query() opens a read-only memiavl instance (mmap'd), queries it, and defers Close(). The response byte slices (Key, Value) may point directly into the mmap'd region. When the deferred Close() unmaps the memory before JSON marshaling reads the response, the process segfaults (observed on
arctic-1.Copies res.Key and res.Value for non-latest queries so they survive the mmap unmap.
Separated out from #3095 to capture a clear commit history of changes for the future archeologists.