What happened
After stopping a local offckb node, ckb miner processes can survive as orphans (PPID=1) and keep running indefinitely.
Observed on macOS with @offckb/cli / CKB 0.204.0:
ckb miner -C ~/Library/Application Support/offckb-nodejs/devnet
Two leftover miners were still running ~32 days later. The node was gone (127.0.0.1:8114 not listening). Each miner was polling RPC every 1s (ckb-miner.toml poll_interval = 1000) against a dead endpoint, with no TCP connection, Dummy worker, and a small but constant CPU cost (~0.1–1.3% each).
stdout/stderr of the orphans pointed at dead unix sockets, so they no longer wrote useful logs. Later offckb start/stop cycles (including a clean ctrl-c that did stop that session’s miner) did not reap the old processes.
Expected
Stopping the node / exiting offckb should also stop the miners it started. A later offckb start should not leave extra miners from previous runs.
Actual
Miner processes can outlive the parent, get adopted by launchd (PPID=1), and sit there until killed by hand.
Notes
Not a LaunchAgent; they do not come back after a reboot. Killing them with SIGTERM worked. Local chain data was left untouched.
Happy to provide more process/log details if useful.
What happened
After stopping a local
offckbnode,ckb minerprocesses can survive as orphans (PPID=1) and keep running indefinitely.Observed on macOS with
@offckb/cli/ CKB0.204.0:Two leftover miners were still running ~32 days later. The node was gone (
127.0.0.1:8114not listening). Each miner was polling RPC every 1s (ckb-miner.tomlpoll_interval = 1000) against a dead endpoint, with no TCP connection, Dummy worker, and a small but constant CPU cost (~0.1–1.3% each).stdout/stderr of the orphans pointed at dead unix sockets, so they no longer wrote useful logs. Later
offckbstart/stop cycles (including a clean ctrl-c that did stop that session’s miner) did not reap the old processes.Expected
Stopping the node / exiting
offckbshould also stop the miners it started. A lateroffckbstart should not leave extra miners from previous runs.Actual
Miner processes can outlive the parent, get adopted by launchd (
PPID=1), and sit there until killed by hand.Notes
Not a LaunchAgent; they do not come back after a reboot. Killing them with SIGTERM worked. Local chain data was left untouched.
Happy to provide more process/log details if useful.