Fix data race on query MemoryReservation during normal query finish by Ergus · Pull Request #108395 · ClickHouse/ClickHouse · GitHub
Skip to content

Fix data race on query MemoryReservation during normal query finish#108395

Closed
Ergus wants to merge 1 commit into
ClickHouse:masterfrom
Ergus:Fix_issue_108393
Closed

Fix data race on query MemoryReservation during normal query finish#108395
Ergus wants to merge 1 commit into
ClickHouse:masterfrom
Ergus:Fix_issue_108393

Conversation

@Ergus

@Ergus Ergus commented Jun 24, 2026

Copy link
Copy Markdown
Member

Closes: #108393

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix a data race and possible use-after-free of a query's memory reservation when a query finishes while its pipeline executor threads are still running (workload memory scheduling).

@clickhouse-gh

clickhouse-gh Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jun 24, 2026
@Ergus Ergus requested a review from azat June 24, 2026 17:02

@azat azat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, but there is already #108391
Which looks better since it release query slot earlier

@azat azat closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ThreadSanitizer: data race in QueryStatus memory reservation (releaseWorkloadResources vs getMemoryReservation) (STID: 4071-3348)

2 participants