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

fix: panic on using WaitGroup after it is freed (#1464) #13

Closed
wants to merge 1 commit into from

Conversation

0xcb9ff9
Copy link

Description

upstream PR: #1464

bnb-chain#1379 try to fix the random UT fail of TestLargeReorgTrieGC, while it introduced another bug.
It could cause panic crash, since wg could be used after it is freed, since there is an asynchronous risk.
For detail of the panic, you may refer: bnb-chain#1456

Rationale

To fix the UT fail, we only need to make sure triedb.Dereference(root.(common.Hash)) can be done in tryCommitTrieDB(), so we can just add another WaitGroup in tryCommitTrieDB() for synchronization.

@0xcb9ff9
Copy link
Author

merge to #10

@0xcb9ff9 0xcb9ff9 closed this Apr 20, 2023
@0xcb9ff9 0xcb9ff9 deleted the upstream/fix-waitgroup branch April 20, 2023 03:59
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.

2 participants