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

stacks-node never terminates on Ctrl-C if bitcoind is unavailable #3734

Closed
diwakergupta opened this issue Jun 2, 2023 · 1 comment
Closed
Assignees
Labels
bug Unwanted or unintended property causing functional harm help wanted Open source contributions actively sought. locked

Comments

@diwakergupta
Copy link
Member

Describe the bug

If you start stacks-node and bitcoind is unavailable, and then you hit Ctrl-C to interrupt the process, stacks-node never exits. Here are the debug logs that demonstrate this.

DEBG [1685718425.108811] [src/burnchains/bitcoin/spv.rs:813] [main] Initialized block headers at /tmp/stacks-node-1685718425068/mainnet/headers.sqlite
WARN [1685718425.110183] [src/chainstate/coordinator/mod.rs:3138] [main] Sortition DB /tmp/stacks-node-1685718425068/mainnet/burnchain/sortition does not exist; ass
uming it will be instantiated with the correct version
WARN [1685718425.110204] [src/chainstate/coordinator/mod.rs:3154] [main] Chainstate DB /tmp/stacks-node-1685718425068/mainnet/chainstate does not exist; assuming it
 will be instantiated with the correct version
INFO [1685718425.110219] [testnet/stacks-node/src/run_loop/neon.rs:406] [main] Start syncing Bitcoin headers, feel free to grab a cup of coffee, this can take a whi
le
WARN [1685718425.110241] [src/burnchains/burnchain.rs:698] [main] Failed to stat burnchain DB path '/tmp/stacks-node-1685718425068/mainnet/burnchain/burnchain.sqlit
e': Os { code: 2, kind: NotFound, message: "No such file or directory" }
DEBG [1685718425.110276] [testnet/stacks-node/src/run_loop/neon.rs:422] [main] Burnchain DB does not exist or does not have blocks; synchronizing to first burnchain
 block height 666051
DEBG [1685718425.111046] [src/burnchains/burnchain.rs:635] [main] Fetch burnchain headers, headers_height: 0, first_block_height: 666050
DEBG [1685718425.111058] [src/burnchains/bitcoin/indexer.rs:433] [main] Sync all headers starting at block 0
DEBG [1685718425.111795] [src/burnchains/bitcoin/spv.rs:813] [main] Initialized block headers at /tmp/stacks-node-1685718425068/mainnet/headers.sqlite
DEBG [1685718425.111937] [src/burnchains/bitcoin/indexer.rs:339] [main] (Re)establish peer connection
ERRO [1685718425.112316] [src/burnchains/bitcoin/network.rs:210] [main] Failed to connect to peer ::1:8333: connection to peer could not be (re-)established
ERRO [1685718428.077030] [src/burnchains/bitcoin/network.rs:210] [main] Failed to connect to peer ::1:8333: connection to peer could not be (re-)established
^CGraceful termination request received (signal `CtrlC`), will complete the ongoing runloop cycles and terminate
^CGraceful termination request received (signal `CtrlC`), will complete the ongoing runloop cycles and terminate
^CGraceful termination request received (signal `CtrlC`), will complete the ongoing runloop cycles and terminate
ERRO [1685718435.584377] [src/burnchains/bitcoin/network.rs:210] [main] Failed to connect to peer ::1:8333: connection to peer could not be (re-)established
WARN [1685718435.585073] [src/burnchains/bitcoin/network.rs:224] [main] Connection broken; retrying in 15.88437146075716 sec...
^CGraceful termination request received (signal `CtrlC`), will complete the ongoing runloop cycles and terminate
^CGraceful termination request received (signal `CtrlC`), will complete the ongoing runloop cycles and terminate
^CGraceful termination request received (signal `CtrlC`), will complete the ongoing runloop cycles and terminate

Steps To Reproduce

  • Make sure bitcoind is unavailable
  • Start stacks-node in follower mode
  • Press ctrl-c a bunch of times, observe that process never terminates

Expected behavior
stacks-node should terminate gracefully, whether or not bitcoind is available.

Environment (please complete the following information):

  • OS: Mac Ventura on M1
  • Rust version: 1.69.0
@diwakergupta diwakergupta added bug Unwanted or unintended property causing functional harm help wanted Open source contributions actively sought. labels Jun 2, 2023
@pavitthrap pavitthrap self-assigned this Jun 6, 2023
@blockstack-devops
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Unwanted or unintended property causing functional harm help wanted Open source contributions actively sought. locked
Projects
Archived in project
Development

No branches or pull requests

3 participants