Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy chunk bytes in TSDB store before sending to client #6202

Closed
wants to merge 1 commit into from

Conversation

fpetkovski
Copy link
Contributor

During head compaction mmaped memory gets released while gRPC is marshaling bytes from that same memory region. This leads to a fatal segfault and crashes the receiver. The segfault happens when marshaling chunks specifically.

This commit modifies the TSDB store server to copy chunk bytes before sending them to the client. I tried running this for a while and saw no significant increase in memory usage.

Fixes #6196.

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

During head compaction mmaped memory gets released while gRPC is
marshaling bytes from that same memory region. This leads to a fatal
segfault and crashes the receiver. The segfault happens when marshaling
chunks specifically.

This commit modifies the TSDB store server to copy chunk bytes before
sending them to the client. I tried running this for a while and saw
no significant increase in memory usage.
@fpetkovski
Copy link
Contributor Author

I'll raise this PR against 0.31.

@fpetkovski fpetkovski closed this Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Receive panic during compact
1 participant