Skip to content

Conversation

fxrlv
Copy link
Contributor

@fxrlv fxrlv commented Jul 17, 2025

Describe Your Changes

The chunkedbuffer is released twice, leading to concurrent use of the buffer after it's acquired from a pool by two different goroutines.

Checklist

The following checks are mandatory:

Copy link
Contributor

@f41gh7 f41gh7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@f41gh7
Copy link
Contributor

f41gh7 commented Jul 17, 2025

@fxrlv nice catch! Could you please mention bugfix at changelog? It looks like a serious bug to me, which could lead to data races and data loss.

@f41gh7
Copy link
Contributor

f41gh7 commented Jul 17, 2025

Issue was introduced at v1.115.0 at the following commit 5b87aff

Copy link

codecov bot commented Jul 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.90%. Comparing base (8aaa828) to head (4359930).
Report is 3442 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (8aaa828) and HEAD (4359930). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (8aaa828) HEAD (4359930)
2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9466      +/-   ##
==========================================
- Coverage   60.37%   54.90%   -5.48%     
==========================================
  Files         411      522     +111     
  Lines       76609    81676    +5067     
==========================================
- Hits        46253    44844    -1409     
- Misses      27794    34443    +6649     
+ Partials     2562     2389     -173     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fxrlv
Copy link
Contributor Author

fxrlv commented Jul 17, 2025

Could you please mention bugfix at changelog?

Sure, done

@f41gh7 f41gh7 merged commit 8d11b9f into VictoriaMetrics:master Jul 17, 2025
@f41gh7
Copy link
Contributor

f41gh7 commented Jul 17, 2025

Thanks for contribution!

@fxrlv fxrlv deleted the double-put branch July 17, 2025 18:44
@f41gh7 f41gh7 added the waiting for release The change was merged to upstream, but wasn't released yet. label Jul 17, 2025
@rtm0
Copy link
Contributor

rtm0 commented Jul 21, 2025

The bugfix has been included into v1.122.0.

@rtm0 rtm0 removed the waiting for release The change was merged to upstream, but wasn't released yet. label Jul 21, 2025
@hagen1778
Copy link
Collaborator

Such typos seem like a good candidate for golangci-lint checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants