Skip to content

[Bug] RuntimeState should be destructed after DataSink - #3709

Merged
morningman merged 1 commit into
apache:masterfrom
gaodayue:fix-runtimestate-destructed-before-datasink
May 28, 2020
Merged

[Bug] RuntimeState should be destructed after DataSink#3709
morningman merged 1 commit into
apache:masterfrom
gaodayue:fix-runtimestate-destructed-before-datasink

Conversation

@gaodayue

Copy link
Copy Markdown
Contributor

Fixes#3706

DataSink uses instance and query MemTracker from RuntimeState, therefore it should be destructed before RuntimeState. Otherwise memory corruption and segfault could happen.

@gaodayuegaodayue added the kind/fix Categorizes issue or PR as related to a bug. label May 28, 2020
@gaodayuegaodayue self-assigned this May 28, 2020
@gaodayue
gaodayue requested a review from chaoyliMay 28, 2020 03:46

@morningmanmorningman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@morningmanmorningman added approved Indicates a PR has been approved by one committer. area/load Issues or PRs related to all kinds of load labels May 28, 2020
@morningman
morningman merged commit 9c85d05 into apache:masterMay 28, 2020
acelyc111 pushed a commit to acelyc111/incubator-doris that referenced this pull request Jan 20, 2021
Fixesapache#3706 DataSink uses instance and query MemTracker from RuntimeState, therefore it should be destructed before RuntimeState. Otherwise memory corruption and segfault could happen.
BiteTheDDDDt pushed a commit to BiteTheDDDDt/incubator-doris that referenced this pull request Feb 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.area/loadIssues or PRs related to all kinds of loadkind/fixCategorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BE cores because RuntimeState is deallocated before DataSink when fragment is cancelled

2 participants

@gaodayue@morningman