stacks-core
stacks-core copied to clipboard
bug: peernetwork bind error
Describe the bug
Panic: BUG: PeerNetwork could not bind or is already bound: BindError
Steps To Reproduce
via regtest-env feat/signer (8cbcecc) which uses STACKS_BLOCKCHAIN_COMMIT (08ebb7fdcf3dad516811b8e46e34ad717ae236ca)
Additional context Only other changes locally are:
- - &MINE_INTERVAL_EPOCH25 ${MINE_INTERVAL_EPOCH25:-10s} # 10 second bitcoin block times in epoch 2.5
- - &MINE_INTERVAL_EPOCH3 ${MINE_INTERVAL_EPOCH3:-600s} # 10 minute bitcoin block times in epoch 3
+ - &MINE_INTERVAL_EPOCH25 ${MINE_INTERVAL_EPOCH25:-3s} # 10 second bitcoin block times in epoch 2.5
+ - &MINE_INTERVAL_EPOCH3 ${MINE_INTERVAL_EPOCH3:-4s} # 10 minute bitcoin block times in epoch 3
docker compose logs stacks-node
stacks-node-1 | INFO [1710526057.225715] [testnet/stacks-node/src/run_loop/boot_nakamoto.rs:181] [epoch-2/3-boot] Epoch-3.0 boundary reached, stopping Epoch-2.x run loop
stacks-node-1 | INFO [1710526057.226990] [testnet/stacks-node/src/run_loop/neon.rs:1206] [main] Runloop: Downloaded burnchain blocks up to height 130; target height is 129; remote_chain_height = 130 next_sortition_height = 130, sortition_db_height = 129
stacks-node-1 | INFO [1710526057.227815] [testnet/stacks-node/src/neon_node.rs:4880] [main] Received burnchain block #130 including block_commit_op (winning) - miEJtNKa3ASpA19v5ZhvbKTEieYjLpzCYT (b113703549e698b2c4d97eb59116db54bd7090720de65a33fee28b1369086e23)
stacks-node-1 | INFO [1710526057.227988] [testnet/stacks-node/src/run_loop/neon.rs:1323] [main] Runloop: Synchronized full burnchain up to height 130. Proceeding to mine blocks
stacks-node-1 | ERRO [1710526057.228021] [testnet/stacks-node/src/run_loop/neon.rs:1332] [main] Runloop: Block relayer and miner hung up, exiting.
stacks-node-1 | INFO [1710526057.228421] [testnet/stacks-node/src/run_loop/boot_nakamoto.rs:134] [main] Reached Epoch-3.0 boundary, starting nakamoto node
stacks-node-1 | INFO [1710526057.228470] [testnet/stacks-node/src/event_dispatcher.rs:1141] [main] Registering event observer at: stacks-signer-1:30001
stacks-node-1 | INFO [1710526057.228484] [testnet/stacks-node/src/event_dispatcher.rs:1141] [main] Registering event observer at: stacks-api:3700
stacks-node-1 | INFO [1710526057.228485] [testnet/stacks-node/src/event_dispatcher.rs:1141] [main] Registering event observer at: stacks-signer-2:30002
stacks-node-1 | INFO [1710526057.228486] [testnet/stacks-node/src/event_dispatcher.rs:1141] [main] Registering event observer at: stacks-signer-3:30003
stacks-node-1 | INFO [1710526057.229454] [testnet/stacks-node/src/run_loop/neon.rs:327] [main] Error setting up signal handler, may have already been set
stacks-node-1 | INFO [1710526057.230868] [stackslib/src/chainstate/coordinator/mod.rs:3468] [main] Migrating sortition DB to the latest schema version
stacks-node-1 | INFO [1710526057.231195] [stackslib/src/chainstate/coordinator/mod.rs:3472] [main] Migrating chainstate DB to the latest schema version
stacks-node-1 | INFO [1710526057.232429] [testnet/stacks-node/src/run_loop/neon.rs:430] [main] Start syncing Bitcoin headers, feel free to grab a cup of coffee, this can take a while
stacks-node-1 | INFO [1710526057.245889] [testnet/stacks-node/src/run_loop/nakamoto.rs:189] [main] Miner node: checking UTXOs at address: miEJtNKa3ASpA19v5ZhvbKTEieYjLpzCYT
stacks-node-1 | INFO [1710526057.247720] [testnet/stacks-node/src/run_loop/nakamoto.rs:194] [main] UTXOs found - will run as a Miner node
stacks-node-1 | WARN [1710526057.291049] [testnet/stacks-node/src/neon_node.rs:4390] [main] Without a peer to bootstrap from, the node will start mining a new chain
stacks-node-1 | ERRO [1710526057.304693] [stackslib/src/net/poll.rs:94] [main] Failed to bind to 0.0.0.0:20444: Os { code: 98, kind: AddrInUse, message: "Address already in use" }
stacks-node-1 | ERRO [1710526057.304771] [testnet/stacks-node/src/main.rs:270] [main] Process abort due to thread panic: panicked at testnet/stacks-node/src/nakamoto_node/peer.rs:186:14:
stacks-node-1 | BUG: PeerNetwork could not bind or is already bound: BindError
stacks-node-1 | INFO [1710526057.462516] [testnet/stacks-node/src/neon_node.rs:4292] [p2p-(0.0.0.0:20444,0.0.0.0:20443)] P2P: Relayer hang up with p2p channel
stacks-node-1 | INFO [1710526057.462535] [testnet/stacks-node/src/neon_node.rs:4646] [p2p-(0.0.0.0:20444,0.0.0.0:20443)] P2P thread exit!
stacks-node-1 | ERRO [1710526057.822649] [testnet/stacks-node/src/main.rs:272] [main] Panic backtrace: 0: stacks_node::main::{{closure}}
stacks-node-1 | at /stacks/testnet/stacks-node/src/main.rs:271:18
stacks-node-1 | 1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2029:9
stacks-node-1 | std::panicking::rust_panic_with_hook
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:783:13
stacks-node-1 | 2: std::panicking::begin_panic_handler::{{closure}}
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:657:13
stacks-node-1 | 3: std::sys_common::backtrace::__rust_end_short_backtrace
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:171:18
stacks-node-1 | 4: rust_begin_unwind
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
stacks-node-1 | 5: core::panicking::panic_fmt
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
stacks-node-1 | 6: core::result::unwrap_failed
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1649:5
stacks-node-1 | 7: core::result::Result<T,E>::expect
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1030:23
stacks-node-1 | stacks_node::nakamoto_node::peer::PeerThread::new_all
stacks-node-1 | at /stacks/testnet/stacks-node/src/nakamoto_node/peer.rs:185:9
stacks-node-1 | stacks_node::nakamoto_node::peer::PeerThread::new
stacks-node-1 | at /stacks/testnet/stacks-node/src/nakamoto_node/peer.rs:148:9
stacks-node-1 | 8: stacks_node::nakamoto_node::StacksNode::spawn
stacks-node-1 | at /stacks/testnet/stacks-node/src/nakamoto_node.rs:193:26
stacks-node-1 | 9: stacks_node::run_loop::nakamoto::RunLoop::start
stacks-node-1 | at /stacks/testnet/stacks-node/src/run_loop/nakamoto.rs:478:24
stacks-node-1 | 10: stacks_node::run_loop::boot_nakamoto::BootRunLoop::start_from_neon
stacks-node-1 | at /stacks/testnet/stacks-node/src/run_loop/boot_nakamoto.rs:153:9
stacks-node-1 | stacks_node::run_loop::boot_nakamoto::BootRunLoop::start
stacks-node-1 | at /stacks/testnet/stacks-node/src/run_loop/boot_nakamoto.rs:102:45
stacks-node-1 | 11: stacks_node::main
stacks-node-1 | at /stacks/testnet/stacks-node/src/main.rs:448:9
stacks-node-1 | 12: core::ops::function::FnOnce::call_once
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
stacks-node-1 | std::sys_common::backtrace::__rust_begin_short_backtrace
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:155:18
stacks-node-1 | 13: std::rt::lang_start::{{closure}}
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:166:18
stacks-node-1 | 14: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:284:13
stacks-node-1 | std::panicking::try::do_call
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
stacks-node-1 | std::panicking::try
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
stacks-node-1 | std::panic::catch_unwind
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
stacks-node-1 | std::rt::lang_start_internal::{{closure}}
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:48
stacks-node-1 | std::panicking::try::do_call
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
stacks-node-1 | std::panicking::try
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
stacks-node-1 | std::panic::catch_unwind
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
stacks-node-1 | std::rt::lang_start_internal
stacks-node-1 | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:20
stacks-node-1 | 15: main
stacks-node-1 | 16: <unknown>
stacks-node-1 | 17: __libc_start_main
stacks-node-1 | 18: _start
stacks-node-1 |
stacks-node-1 | Dumping core for pid 1
Sounds like exactly the same issue I ran into https://github.com/stacks-network/stacks-core/issues/4531
This should be solved at the same time as https://github.com/stacks-network/stacks-core/issues/4355