-
-
Notifications
You must be signed in to change notification settings - Fork 361
fix sparktest segfault #1575
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 sparktest segfault #1575
Conversation
WalkthroughThe changes introduce new methods and functions to improve thread management and shutdown procedures across wallet and Spark-related components. The Changes
Sequence Diagram(s)sequenceDiagram
participant TestTeardown as SparkTestingSetup::~SparkTestingSetup
participant Wallet as pwalletMain->sparkWallet
participant ThreadPool as ParallelOpThreadPool
TestTeardown->>Wallet: FinishTasks()
Wallet->>ThreadPool: Shutdown()
ThreadPool->>ThreadPool: Shutdown and join all threads
sequenceDiagram
participant SparkState as CSparkState::Reset()
participant WalletGlobal as ShutdownWallet()
participant Wallet as pwalletMain
participant SparkWallet as sparkWallet
participant ThreadPool as ParallelOpThreadPool
SparkState->>WalletGlobal: ShutdownWallet()
WalletGlobal->>Wallet: (if exists)
Wallet->>SparkWallet: FinishTasks()
SparkWallet->>ThreadPool: Shutdown()
ThreadPool->>ThreadPool: Shutdown and join all threads
WalletGlobal->>Wallet: Clear address books and key values
SparkState->>SparkState: Clear Spark state data
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
🚧 Files skipped from review as they are similar to previous changes (8)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
0484b09
to
3ca4daa
Compare
3ca4daa
to
b185d94
Compare
PR intention
Fixing spark test random fails:
https://github.com/firoorg/firo/actions/runs/14621407026/job/41022138619#step:9:265
https://github.com/aleflm/firo/actions/runs/14784900125/job/41511473433#step:9:265
https://github.com/aleflm/firo/actions/runs/14783545040/job/41507522710#step:9:211
CSparkWallet
has its own thread pool. The problem isCSparkWallet::threadPool
, which has type ofParallelOpThreadPool
might still be active with active tasks, while we are removingpmainwallet
here:firo/src/test/test_bitcoin.cpp
Line 141 in 7f56324