v1.18: Fix BankForks::new_rw_arc memory leak (backport of #1893)#2065
Closed
mergify[bot] wants to merge 1 commit intov1.18from
Closed
v1.18: Fix BankForks::new_rw_arc memory leak (backport of #1893)#2065mergify[bot] wants to merge 1 commit intov1.18from
mergify[bot] wants to merge 1 commit intov1.18from
Conversation
(cherry picked from commit d441c0f) # Conflicts: # core/benches/banking_stage.rs # core/benches/consumer.rs # core/src/banking_stage/consume_worker.rs # core/src/banking_stage/consumer.rs # core/tests/unified_scheduler.rs # ledger/benches/blockstore_processor.rs # ledger/src/blockstore_processor.rs # program-runtime/src/loaded_programs.rs # programs/sbf/tests/programs.rs # runtime/src/bank.rs # runtime/src/bank/tests.rs # runtime/src/bank_forks.rs # svm/src/transaction_processor.rs # svm/tests/conformance.rs # svm/tests/integration_test.rs # unified-scheduler-pool/src/lib.rs
Author
|
Cherry-pick of d441c0f has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
|
@andreisilviudragnea the cherry-pick to the v1.18 branch has merge conflicts. Would you like to triage it? |
|
@pgarg66 I will try to triage it over the weekend. |
|
this is not a backport candidate to any branch |
|
Closing this PR, as backports to v1.18 is limited to critical fixes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
BankForks::new_rw_arcleaks memory becauseBankForksholds anArcto aBankand theBankholds anArctoBankForksthrough theBank::transaction_processor: TransactionBatchProcessor<BankForks>,TransactionProcessor<FG: ForkGraph>::program_cache: Arc<RwLock<ProgramCache<FG>>>,ProgramCache<FG: ForkGraph>::fork_graph: Option<Arc<RwLock<FG>>>reference cycle.Summary of Changes
Changed the
fork_graphfield topub fork_graph: Option<Weak<RwLock<FG>>>to break the reference cycle. Thetest_bank_forks_new_rw_arc_memory_leakfails before the bug fix because of leaked threads from thread pools insideAccountsDb.This bug has been introduced in solana-labs#33776. This bug affects also v1.18 and v1.17.
This is an automatic backport of pull request #1893 done by Mergify.