GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(protocol): MetaProtocol accept is sequential with no stream deadline — one idle or trickling stream stalls every meta request on the connection · Issue #2086 · developing-today/code

id(protocol): MetaProtocol accept is sequential with no stream deadline — one idle or trickling stream stalls every meta request on the connection #2086

New issue
Copy link
New issue
Copy link
Closed
#4240
Closed
id(protocol): MetaProtocol accept is sequential with no stream deadline — one idle or trickling stream stalls every meta request on the connection#2086
#4240
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:in-reviewtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

Problem

MetaProtocol::accept — the /id-meta/1 handler (META_ALPN) served by id serve — handles streams strictly one at a time, with no deadline on any stream:

  • pkgs/id/src/protocol.rs:705-727 — the accept loop awaits recv.read_to_end(MAX_REQUEST_BYTES) (line 708) and then self.handle(&remote, req).await inline before accepting the next stream. There is no tokio::time::timeout anywhere in the function, and no per-stream spawn.
  • read_to_end caps the request size (1 MiB, MAX_REQUEST_BYTES at protocol.rs:238) but waits indefinitely for the peer to finish (or close) the stream. A peer that opens a stream and sends a partial request — or nothing — and never finishes it stalls the loop forever.
  • The client side reuses ONE connection per server: MetaClient::Remote holds a single Connection (pkgs/id/src/meta_client.rs, MetaClient::open/connect_node), and every request goes through request_over(&conn, …) opening a new stream on that same connection. So one stalled stream on a connection black-holes every subsequent meta request (Put/Get/List/Find/Delete/Rename/…) on it, not just one call.

Why this is the outlier

Sibling acceptors in the same crate do both things this one does not:

  • log_sync.rs — SyncProtocol::accept spawns each stream into a JoinSet and wraps sessions in timeout(SESSION_DEADLINE) (60 s, log_sync.rs:59).
  • world_net.rs:73-95 — WorldProtocol::accept spawns per-stream sessions under a Semaphore (MAX_SESSIONS_PER_CONNECTION), refusing only the over-limit stream.
  • world_ssh.rs:123 — SshTunnelProtocol spawns per stream under a semaphore.
  • event_sync.rs:40,48 — sessions bounded by SESSION_DEADLINE (60 s) and even the post-session close wait is bounded (CLOSE_WAIT 5 s).

Related but distinct: #2084 covers the envelope + artifact-push acceptors (answer_frames). The meta protocol does not use answer_frames and is not in that issue's scope — it is the remaining sequential, deadline-free acceptor in id serve's router (serve.rs:941).

Why it matters

The meta protocol is the primary request path into a running id serve — local CLI/REPL clients and remote peers both use it. An idle or trickling stream is free for any connected peer to create and currently pins the connection's handler indefinitely; because clients multiplex all their requests over that one connection, the failure mode is a silent total stall of that client's meta operations, with no error and no recovery short of reconnecting.

Evidence (verified this run, main 39e8410)

  • Read protocol.rs:705-727 directly: sequential loop, inline read_to_end + handle awaits, no timeout, no spawn.
  • Read meta_client.rs: MetaClient::Remote holds one Connection; request_over opens a stream per request on it.
  • Contrast reads: log_sync.rs:59 + JoinSet accept; world_net.rs:73-95; world_ssh.rs:123-147; event_sync.rs:40-48,136.
  • Enumerated every ProtocolHandler impl in pkgs/id/src: MetaProtocol is the only production acceptor that is both sequential and deadline-free besides the two in id(envelope_net): envelope + artifact-push acceptors answer streams one at a time with no deadline — an idle or trickling peer stream stalls the whole connection forever #2084 (ArtifactPull is filed separately — its waits are single-stream and its close-wait is unbounded, a different shape).
  • Dedup: gh issue list --state all searches for "MetaProtocol", "meta protocol stall", "answer_frames" returned no existing issue for this (closest: id(envelope_net): envelope + artifact-push acceptors answer streams one at a time with no deadline — an idle or trickling peer stream stalls the whole connection forever #2084, envelope/artifact-push only; id: match_kind is defined four times — CLI, REPL, protocol and a dead helpers copy can silently diverge #697, closed, unrelated match_kind duplication).

Acceptance criteria

  • A meta stream that does not deliver a complete request within a bounded deadline (triage pins the value — log_sync/event_sync's 60 s is the in-repo precedent) is abandoned/closed, and the acceptor moves on.
  • One stalled or slow stream no longer blocks later streams on the same connection (per-stream spawn, or an equivalent structure; a per-connection concurrency bound like world_net's semaphore is welcome).
  • Regression test: a peer that opens a stream and sends nothing (or a partial request) does not prevent a second stream's request from being answered; the stalled stream is closed at the deadline.
  • Existing protocol/meta tests still pass; well-behaved one-request-per-stream clients (the current request_over paths) are unaffected.

Activity

Next
  1. developing-today commented on Oct 29, 2026

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1000

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 29, 2026
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane A, new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a run 2026-10-29T02:05Z
    • Found via: filed this run
    • Task: Filed after verifying on main 39e8410 that MetaProtocol::accept (protocol.rs:705-727) is sequential with no stream deadline, unlike the log_sync/world_net/world_ssh/event_sync acceptors; enqueued a triage packet to pin the deadline + concurrency structure.
    • Expectation: effort/s — triage pins the deadline value and spawn/semaphore structure, then routes a small_fix packet with a stalled-stream regression test.
    • Links: packet queue-pilot/packet-2086-triage.json (repo-health-code-pilot)
  4. github-actions
    assigned
    dezren39
    on Oct 29, 2026
  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  6. 127 remaining items

  7. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 2, 2026
  8. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    agent-note:v1
    event: parked
    task: 5081 (repo-health-code-pilot, repo-worker-code — OpenChamber scheduled lane)
    state: Parked for 30 minutes after fresh metadata-only revalidation.
    fresh_evidence: #2086 remains OPEN and assigned to dezren39 (Drewry Pope); task-bound PR #4240 remains OPEN and authored by dezren39.
    hard_stop: Prior checkpoint forbids inspecting or modifying PR #4240 contents, branch/worktree, CI, reviews, or test log. No repository artifacts accessed or changed.
    resume: After explicit handoff/release or PR #4240 closes/merges; revalidate issue and PR metadata before proceeding.
    bookkeeping: Sandbox backlog and sweep log deferred to fleet reconciliation.

  9. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 2, 2026
  10. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane B shift
    • Session / ID: task 5081
    • Found via: queue claim — resume from awaiting_ci on PR id(protocol): bound concurrent MetaProtocol streams (fix #2086) #4240
    • Task: task 5081 — fix issue id(protocol): MetaProtocol accept is sequential with no stream deadline — one idle or trickling stream stalls every meta request on the connection #2086 (bound concurrent MetaProtocol streams). Fresh labels on issue id(protocol): MetaProtocol accept is sequential with no stream deadline — one idle or trickling stream stalls every meta request on the connection #2086 / PR id(protocol): bound concurrent MetaProtocol streams (fix #2086) #4240 carry no held, user/owned, do-not-merge, or do-not-auto-edit stop. PR id(protocol): bound concurrent MetaProtocol streams (fix #2086) #4240 is OPEN at 8a55435 (the head lane D advanced after fixing Codex P2s).
    • Expectation: verify Codex disposition + targeted tests on the laptop; merge when standing criteria are met, otherwise park with the exact resume condition.
    • Links: issue id(protocol): MetaProtocol accept is sequential with no stream deadline — one idle or trickling stream stalls every meta request on the connection #2086 id(protocol): MetaProtocol accept is sequential with no stream deadline — one idle or trickling stream stalls every meta request on the connection #2086 · PR id(protocol): bound concurrent MetaProtocol streams (fix #2086) #4240 id(protocol): bound concurrent MetaProtocol streams (fix #2086) #4240
  11. dezren39
    added a commit that references this issue on Nov 2, 2026

    fix(id): drain admitted meta stream handlers on connection close (#2086)

    b94f333
  12. dezren39
    closed this as completedin #4240on Nov 2, 2026
  13. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
  14. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane B shift
    • Session / ID: task 5081
    • Task: Fix for issue id(protocol): MetaProtocol accept is sequential with no stream deadline — one idle or trickling stream stalls every meta request on the connection #2086 merged via PR id(protocol): bound concurrent MetaProtocol streams (fix #2086) #4240 (squash merge a205ae3); issue id(protocol): MetaProtocol accept is sequential with no stream deadline — one idle or trickling stream stalls every meta request on the connection #2086 is CLOSED; queue task 5081 is done.
    • What this shift changed: Resumed PR id(protocol): bound concurrent MetaProtocol streams (fix #2086) #4240 at 8a55435. Codex review of that head raised one new P2: JoinSet::shutdown() on connection close could abort a mutating handler mid-flight (e.g. FileOps::rename). Fixed in b94f333 by draining admitted handlers with join_next() instead of aborting them; replied on the Codex thread; Codex re-review on b94f333 completed with no findings. The two earlier P2s were already fixed in a4ed016 with replies on their threads.
    • Tests: cargo test --manifest-path pkgs/id/Cargo.toml --lib protocol on the laptop — 40 passed, 0 failed, both on 8a55435 and on the final head tree b94f333 (includes stalled-stream and excess-stream regressions). GitHub checks were still in the fleet runner backlog at merge; merged under the standing merge authority (verified on laptop + Codex clean).
  15. developing-today
    added
    status:in-review
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:in-reviewtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.