Skip to content

0.83.2: control-plane accept loops pause after accept errors - #377

Merged
fylorn merged 1 commit into
mainfrom
fix/control-accept-backoff
Oct 26, 2026
Merged

fylorn merged 1 commit into
mainfrom
fix/control-accept-backoff

Conversation

@fylorn

@fylorn fylorn commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Same class of defect as #372, found while reviewing it: a background loop that can wake immediately forever.

  • accept_loop on the local control socket (lib.rs) and on the remote control port (remote.rs) logged an accept error and accepted again at once. For errors that are not about the one connection (for example EMFILE when core runs out of file descriptors) the next accept fails the same way, so the loop spun a CPU core and wrote a warning per iteration.
  • New accept_backoff: refused, aborted and reset connections are skipped right away; any other accept error waits one second before the next accept. This matches what axum already does on the gateway ports.
  • The local loop now takes the accept result out of select! before sleeping, so the watch::Ref from wait_for is not held across the await and the future stays Send.
  • sync.rs: the two comments added in fix(sync): stop idle CPU spin after local configuration changes #372 now follow the file's language.
  • Version 0.83.2 with release notes covering fix(sync): stop idle CPU spin after local configuration changes #372 and this change. Protocol version, store schema and message codes are unchanged.

Validation

  • cargo fmt --all -- --check, cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo test --locked --workspace: 4097 passed, 0 failed, including the new accept_errors_pause_unless_only_that_connection_went_away and fix(sync): stop idle CPU spin after local configuration changes #372's early_round_returns_consume_the_dirty_deadline
  • python3 scripts/release_notes_test.py

🤖 Generated with Claude Code

- tw-control: add accept_backoff. An accept error other than a refused,
  aborted or reset connection (for example EMFILE) now waits one second
  before the next accept, on both the local control socket and the
  remote control port, matching axum on the gateway ports. Retrying at
  once returned the same error and spun a CPU core.
- The local loop takes the result out of select! before sleeping, so the
  future stays Send.
- sync.rs: the two comments added with #372 follow the file's language.
- Version 0.83.2 with release notes covering #372 and this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn merged commit 3501739 into main Oct 26, 2026
7 checks passed
@fylorn
fylorn deleted the fix/control-accept-backoff branch October 26, 2026 03:35
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant