Skip to content

Conversation

@Yukang-Lian
Copy link
Collaborator

Pick #33131

…3131)

Problem: When the process stops, there is a heap use after free error
with the WAL manager.

Reason: During the startup process, if the storage engine does not
initialize successfully and the main program directly returns 0, the WAL
manager, which was created during initialization and started a thread to
periodically check disk space, will encounter an issue. When the program
exits and returns 0, local variables are destroyed first before the
thread is properly terminated. If the thread attempts to access those
local variables at this point, it leads to a heap use after free error.

Solution: Ensure that the thread for periodically checking disk space is
only started after the storage engine has been successfully initialized.

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->

## Further comments

If this is a relatively large or complex change, kick off the discussion
at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why
you chose the solution you did and what alternatives you considered,
etc...
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@Yukang-Lian
Copy link
Collaborator Author

run buildall

@dataroaring dataroaring merged commit 3922fdd into apache:branch-2.1 Aug 19, 2024
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.

3 participants