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(directory_mail): CommandSink has no timeout — a mail program that never exits hangs the directory request forever · Issue #1788 · developing-today/code

id(directory_mail): CommandSink has no timeout — a mail program that never exits hangs the directory request forever #1788

New issue
Copy link
New issue
Copy link
Closed
#4031
Closed
id(directory_mail): CommandSink has no timeout — a mail program that never exits hangs the directory request forever#1788
#4031
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 jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

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

Bug

pkgs/id/src/directory_mail.rs — CommandSink::send runs the configured mail program and waits for it with no timeout:

  • directory_mail.rs:107 — let status = child.wait().context("wait for mail program")?; — a bare wait() with no deadline, and the child is never killed on any path.
  • The sibling sink in the same file is bounded: SmtpSink sets RELAY_TIMEOUT = Duration::from_secs(10) (directory_mail.rs:115) on connect/read/write. OutboxSink is a single file write. Only CommandSink can block forever.

The wait is on a live request path. WorldService::directory() (pkgs/id/src/world_session/mod.rs:108) awaits the send for every mail-carrying directory action (addemail, signin):

tokio::task::spawn_blocking(move || sink.send(&mail)).await

So a mail program that hangs (waiting on a lock, a network mount, a full pipe, a prompt) hangs that directory request — the SSH explorer / web request that asked for a confirmation or sign-in code — forever. Each retry spawns another blocked spawn_blocking thread and another hung child process; nothing is ever reaped or reported.

Evidence (verified this run)

Laptop probe (worktree of origin/main e561ab5 at ~/git/fleet/wt-laneB-mdprobe, directory_mail.rs sha256 dc6f7935…, identical to sandbox main e91098f), pkgs/id/tests/mail_probe.rs: CommandSink pointed at /bin/sh -c 'sleep 30' —

send STILL BLOCKED after 3.000162752s (program sleeps 30s; no timeout in CommandSink)

i.e. send() returns only when the program exits, however long that takes; a program that never exits blocks it indefinitely.

Why it matters

The command sink is one of the three documented mail transports an admin can configure for a world (id serve, commands/serve.rs:468). A single wedged helper program silently wedges every email-code flow for that world — no error, no log line, no recovery short of restarting the server — while the SMTP transport next door fails cleanly in 10 s.

Acceptance criteria

  • CommandSink::send bounds the wait: after a deadline (a named constant; reusing the file's existing 10 s scale or a justified program-specific value is the triage pin), it kills the child, reaps it, and returns an error that says the program timed out.
  • A test with a program that sleeps past the deadline returns the timeout error in bounded time (test uses a short injected deadline, not a real multi-second sleep).
  • A slow-but-finite program inside the deadline still succeeds; a program exiting non-zero still errors as before (a_failing_command_is_an_error keeps passing).
  • Existing directory_mail tests pass (laptop or CI).

Found by new-issue-creator-code-b. Dedup: gh issue list --search 'directory_mail OR CommandSink OR "mail program"' and 'mail timeout hang' (open + closed) returned nothing on 2026-10-28.

Activity

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

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

    CODE-728

  3. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-b (issue creator, Lane B)
    • Session / ID: cron job new-issue-creator-code-b, run 2026-10-28 14:20 CDT
    • Found via: filed this run
    • Task: Triage the CommandSink no-timeout hang: pin the deadline value, bound CommandSink::send (kill + reap on expiry), add the bounded-time regression test.
    • Expectation: effort/s — done looks like: send() errors with a timeout message in bounded time against a never-exiting program, slow-but-finite programs still succeed, existing directory_mail tests pass.
    • Links: evidence in the issue body; probe at ~/git/fleet/wt-laneB-mdprobe (laptop, pkgs/id/tests/mail_probe.rs, directory_mail.rs sha256 dc6f7935 on main e91098f)
  4. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    on Nov 1, 2026
  6. 18 remaining items

  7. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked (PR awaiting safe verification)

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Session / ID: queue task 5039; retry after 20 minutes
    • State: PR fix(id): bound directory mail command runtime (#1788) #4031 is open on queue/5039-1788-command-timeout (commit 1e47e202c; worktree /home/user/git/fleet/5039). Production cargo check --lib passes.
    • Blocker: targeted tests fail before execution on both PR branch and clean main: pkgs/id/src/idset.rs:755 has a ChainExt initializer missing note (E0063). PR checks have no normal test result; CodeRabbit skipped, two daily workflows failed without jobs/logs, and Codex review was still running. No merge performed.
    • Resume condition: after the unrelated main test compile error is fixed or an isolated valid test path is available, rerun directory_mail tests and inspect PR checks; merge only when green and verified.
    • Links: PR fix(id): bound directory mail command runtime (#1788) #4031 · task 5039
  8. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane D shift
    • Session / ID: task 5039
    • Found via: queue claim (resume)
    • Task: resume PR fix(id): bound directory mail command runtime (#1788) #4031 for issue id(directory_mail): CommandSink has no timeout — a mail program that never exits hangs the directory request forever #1788 — the resume blocker (pkgs/id test target failing to compile at idset.rs:755, issue id: lib tests do not compile — idset.rs ChainExt initializer missing the note field #4044) was fixed and merged this shift via PR fix(id): tag-key decoders reject non-3 field counts (#1832) #4046, so directory_mail tests can now run. Also dispositioning PR fix(id): bound directory mail command runtime (#1788) #4031's two open Codex P2 findings (process-group termination on timeout; final-poll success race) before merge.
    • Expectation: effort s; done = Codex findings fixed or replied, directory_mail tests green on the updated branch, PR fix(id): bound directory mail command runtime (#1788) #4031 merged, issue id(directory_mail): CommandSink has no timeout — a mail program that never exits hangs the directory request forever #1788 closed
    • Links: PR fix(id): bound directory mail command runtime (#1788) #4031 · branch queue/5039-1788-command-timeout
  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 1, 2026
  10. dezren39
    added 3 commits that reference this issue on Nov 1, 2026

    fix(id): kill the mail command tree on timeout; observed exit always …

    db70193

    test(id): zombie-aware descendant probe for the mail timeout test (#1788

    86f21f9

    Merge pull request #4031 from developing-today/queue/5039-1788-comman…

    20087ab
  11. dezren39
    closed this as completedin #4031on Nov 1, 2026
  12. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), Lane D shift
    • Session / ID: task 5039
    • Found via: queue claim (resume)
    • Task: issue id(directory_mail): CommandSink has no timeout — a mail program that never exits hangs the directory request forever #1788 — bound CommandSink program wait and reap timed-out child
    • Expectation: done — PR fix(id): bound directory mail command runtime (#1788) #4031 merged (20087ab), issue id(directory_mail): CommandSink has no timeout — a mail program that never exits hangs the directory request forever #1788 closed
    • Links: PR fix(id): bound directory mail command runtime (#1788) #4031 · branch queue/5039-1788-command-timeout · final head 86f21f9
    • Result: resumed the parked PR after its blocker (issue id: lib tests do not compile — idset.rs ChainExt initializer missing the note field #4044 test-compile break) was fixed via PR fix(id): tag-key decoders reject non-3 field counts (#1832) #4046. Merged current main into the branch, then dispositioned all three Codex P2 findings: (1) timeout now SIGKILLs the child's whole process group (spawned as group leader) so wrapper-script descendants die too — new regression test proves a backgrounded descendant is gone after timeout; (2) an observed exit status always wins over the deadline (the elapsed check that replaced late-seen successes with timeouts is deleted); (3) the new test's liveness probe treats Linux zombies as terminated, so it does not depend on the host init reaping orphans. Codex re-review of the final head: completed, no findings. Laptop: directory_mail tests 11 passed / 0 failed.
  13. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  14. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    agent-note:v1
    event: done
    task: 5039 (repo-health-code-pilot, OpenChamber scheduled lane)
    state: Fresh GitHub confirms #1788 CLOSED and PR #4031 MERGED. Queue task completed as already_done. Prior checkpoint reported targeted directory_mail tests 11 passed; this attempt did not rerun tests.

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 jobtask/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.