agent icon indicating copy to clipboard operation
agent copied to clipboard

[Bug]: Windows: Process identity PowerShell timeout (3s) and schema compile timeout (250ms) cause proxy crash & HTTP 500

Open Xxx91n opened this issue 2 months ago • 11 comments

Pre-submission checklist

  • [x] I have searched existing issues to ensure this bug hasn't been reported before
  • [x] I am using the latest version of 1MCP

1MCP Version

v0.39.0-beta.0 (SEA 1mcp-win32-x64.exe and npm package)

Environment

Windows 11 x64 (PowerShell 7 / Windows PowerShell 5.1)

Node.js Version

Node.js v20.x / v22.x

MCP Server(s) Involved

Core runtime: 1mcp serve + 1mcp proxy (aggregating multiple servers such as chrome-devtools, android, codegraph, perplexity, etc.)


Bug Description

1. What happened

On Windows, connecting any stdio-based MCP client (e.g., Devin, Codex, Claude Code) to 1mcp proxy fails deterministically due to a two-stage failure chain:

  1. Failure 1 (Fatal Proxy Crash on PID Discovery): 1mcp proxy immediately terminates with exit code 1 during startup without writing any response to stdout. Clients immediately disconnect with connection closed: initialize response. Underlying log:
    [ERROR] Cannot verify process identity for PID <daemon_pid>: OS process evidence is unavailable to this CLI (permissions or platform tools).
    [ERROR] Cannot verify process identity for PID <daemon_pid>: the record has no process birth evidence (legacy format).
    
  2. Failure 2 (HTTP 500 During Session Creation When Bypassing PID File): Even when bypassing PID auto-discovery by specifying --url http://127.0.0.1:3050/mcp, the daemon rejects the incoming session with HTTP 500:
    [ERROR] Failed to connect transport stream-...: schema_evaluation_timeout {"code":"schema_evaluation_timeout","retryable":true,"phase":"admission","name":"SchemaBoundaryError"}
    [ERROR] HTTP error 500: Session creation failed: connection error - schema_evaluation_timeout
        at StreamableSessionLifecycle.createSession
    

2. What you expected

  • 1mcp proxy should cleanly discover and attach to the running local HTTP daemon on Windows without crashing due to process identity inspection latency.
  • Aggregated multi-server JSON Schema compilation should not trigger 250ms hard timeouts and abort session creation with HTTP 500.

First-Principles Analysis & Root Cause

Root Cause 1: Subprocess cold-start overhead vs. hardcoded 3000ms timeout

  • Introduced in: PR #546 (bfb99ad1ce716ddf47dec8effcf75249c089889b, fix: recover runtime scope after container PID reuse) and refined in PR #551 (e9fa63b4b6be560582e605c93954006441b4b9dc).
  • Location: src/core/server/processIdentity.ts
if (process.platform === 'win32') {
  const startTime = childProcess
    .execFileSync(
      'powershell.exe',
      [
        '-NoProfile',
        '-NonInteractive',
        '-Command',
        `(Get-Process -Id ${pid} -ErrorAction Stop).StartTime.ToUniversalTime().Ticks`,
      ],
      {
        encoding: 'utf8',
        timeout: 3000, // <--- Hardcoded 3000ms timeout
        stdio: ['ignore', 'pipe', 'ignore'],
      },
    )
    .trim();
  return processIdentitySchema.parse({ platform: 'win32', hostname: os.hostname(), startTime });
}
  • Physical invariant violated: On Windows, spawning an external powershell.exe subprocess synchronously via execFileSync requires initializing the CLR runtime, parsing security policies, and cold-loading modules. On standard desktop hardware, this takes 2,500ms – 4,500ms. Because the timeout is fixed at 3,000ms:
    1. Spawning PowerShell exceeds 3s, triggering Node's ETIMEDOUT / AbortError.
    2. The catch block swallows the error and returns undefined.
    3. During 1mcp serve boot, server.pid is written without processIdentity (or with missing birth evidence).
    4. When 1mcp proxy starts, inspectIdentity(info.pid, info.processIdentity) evaluates readIdentity(process.pid). It spawns PowerShell again for its own PID, times out again, and returns { status: 'unknown', reason: 'OS process evidence is unavailable to this CLI' }.
    5. In src/core/server/runtimeLifecycle.ts#L173-L180, status === 'unknown' returns status: 'error', leading src/utils/validation/urlDetection.ts#L258 to throw LocalRuntimeAttachmentError. The proxy exits with code 1 immediately.

Root Cause 2: Worker thread schema compilation budget vs. multi-server aggregate complexity

  • Introduced in: PR #535 (263e7597704cd21e62f99f40a31f4d8b3e415a41, feat(schema): enforce isolated multi-dialect validation).
  • Location: src/core/validation/schemaPolicy.ts#L21 & src/core/validation/schemaBoundary.ts#L84
export const SCHEMA_LIMITS = Object.freeze({
  ...
  compileMs: 250,   // <--- Fixed 250ms timeout for worker thread compilation
  evaluateMs: 50,
  ...
});
  • Physical invariant violated: 1MCP aggregates multiple upstream MCP servers (e.g. 10–15 servers like chrome-devtools, android-mcp, codegraph, perplexity). Many of these expose massive, highly nested JSON schemas. When a client session initiates, admitToolSchemas dispatches compilation jobs to worker threads (node:worker_threads). Under Windows CPU scheduling and IPC serialization, compiling complex multi-dialect schemas across multiple tools routinely takes more than 250ms. When compileMs: 250 elapses, SchemaBoundary.remove rejects with schema_evaluation_timeout. This uncaught rejection bubbles up to StreamableSessionLifecycle.createSession, causing the server to return HTTP 500 and aborting the session.

Steps to Reproduce

  1. On Windows 11, configure 1mcp with 10+ active upstream MCP servers in mcp.json.
  2. Start the daemon:
    1mcp serve --transport http --host 127.0.0.1 --port 3050
    
  3. Attempt to connect using the standard stdio bridge:
    1mcp proxy
    
    Result: Process immediately crashes with exit code 1 without outputting JSON-RPC response.
  4. Try to bypass PID discovery by providing --url:
    1mcp proxy --url http://127.0.0.1:3050/mcp
    
    Result: Client receives HTTP 500 during initialization due to schema_evaluation_timeout.

Actual Logs & Stack Traces

From client (MCP 1mcp.log in Devin / Windsurf):

[info] Starting stdio MCP server '1mcp': "C:\tools\1mcp\1mcp-win32-x64.exe" ["proxy"]
[warning] MCP server '1mcp' connection failed: connection closed: initialize response

From proxy.log:

2026-09-26T16:35:46.389Z [ERROR] Cannot verify process identity for PID 15748: the record has no process birth evidence (legacy format). Lifecycle metadata was retained.
2026-09-26T16:38:22.213Z [ERROR] Cannot verify process identity for PID 15748: OS process evidence is unavailable to this CLI (permissions or platform tools).

From server.log:

2026-09-26T16:38:52.482Z [ERROR] Failed to connect transport stream-73eee694-a9dc-4cef-8064-b929a399353e: schema_evaluation_timeout {"code":"schema_evaluation_timeout","retryable":true,"phase":"admission","name":"SchemaBoundaryError","stack":"SchemaBoundaryError: schema_evaluation_timeout\n    at SchemaBoundary.finish (build/bundled.cjs:64982:13)\n    at SchemaBoundary.remove (build/bundled.cjs:64992:28)\n    at Timeout.<anonymous> (build/bundled.cjs:64913:45)"}
2026-09-26T16:38:52.483Z [ERROR] HTTP error 500 {"sessionId":"(none)","method":"POST","path":"/mcp","statusCode":500,"phase":"handleRequest","errorMessage":"Session creation failed: connection error - schema_evaluation_timeout","errorType":"Error","stack":"Error: Session creation failed: connection error - schema_evaluation_timeout\n    at StreamableSessionLifecycle.createSession (build/bundled.cjs:221080:17)"}

Proposed First-Principles Solutions

  1. Fix Process Identity on Windows (src/core/server/processIdentity.ts):

    • Primary: Do not synchronously invoke powershell.exe. Querying process creation time on Windows can be achieved either via a lightweight Win32 API binding (e.g. GetProcessTimes in a minimal native add-on or fast CLI), or via wmic process where processid=... get creationdate.
    • Fallback / Defense-in-depth: Increase the timeout significantly (e.g. 10,000ms), and if birth evidence cannot be retrieved in a local user scope where loopback connection is verified, fall back to probe-based liveness verification rather than failing closed and crashing the proxy.
  2. Fix Schema Compilation Budget (src/core/validation/schemaPolicy.ts):

    • Increase compileMs from 250 to a realistic ceiling (e.g. 2000ms or dynamic based on schema byte size/node count).
    • In StreamableSessionLifecycle, schema compilation failures or timeouts for non-critical tools should not trigger a fatal HTTP 500 for the entire session creation.

Bug Severity

High - Breaks stdio proxy and HTTP session establishment on Windows for multi-server setups.

Xxx91n avatar Sep 26 '26 16:09 Xxx91n

This was generated by AI during triage.

Agent Brief

Category: bug Summary: Make Windows local runtime attachment reliable while preserving process identity verification, and preserve healthy capabilities when an individual upstream tool's schema admission times out.

Initial triage baseline and verification limits (before #582):

Windows process identity acquisition uses a synchronous PowerShell subprocess with a 3-second budget. Acquisition failures become unavailable evidence, so automatic local discovery fails closed. Injected Windows ETIMEDOUT reproduces this handling; it does not establish actual PowerShell latency on the reporter's machine. Missing recorded birth evidence is a distinct condition and returns unknown without another OS lookup.

Schema compilation has a per-dispatched-job budget of 250ms after worker readiness, including message delivery and response waiting. Startup and queue waiting have separate bounds. Deterministic non-retryable schema failures already withhold an individual tool; retryable timeout/unavailable errors currently abort catalog construction. Ordinary current session setup does not admit every tool, but context/template lazy refresh can reach admission during attachment. Reproduce the reported version/configuration before asserting the HTTP 500 root cause.

Existing targeted tests passed: 48 process identity/discovery tests on macOS with OS inspection access, and 32 schema boundary/journey tests. These are baseline evidence, not Windows acceptance or verification of the future change.

Windows evidence update — 2026-10-02:

Contributor-reported testing used revision ee60b3bfe6d273d406919133fe0996ac64ae1c1f, Windows 11 Pro build 26200, and an empty server configuration. A locally packed/npm-installed 0.39.0-beta.1 under Node 22.23.3 passed fresh runtime launch, automatic discovery with real MCP initialize (7446ms), and explicit-URL initialize (2852ms). All four instrumented PowerShell startup/discovery lookups succeeded in 1965–2054ms under the unchanged 3000ms deadline; fourteen separate direct lookups passed in 1755–2377ms. The built Node 24.19.0 entry also passed both attachment paths. Total initialize duration is not the duration of an individual process-identity lookup.

The SEA artifact from that revision had one initial automatic-attachment failure after 9955ms with no captured diagnostic identifying the cause. Three subsequent automatic probes and all four explicit-URL probes passed. Do not attribute the initial failure to process identity or mark SEA reliability fully verified from those subsequent successes.

These are contributor-reported baseline results, not independently rerun during this triage update. They do not reproduce the alleged PowerShell timeout, exclude failures in other environments, or validate the separate schema-timeout report. The tested beta.1 revision also differs from the original beta.0 report. All acceptance gates below remain open.

Evidence update — 2026-10-03:

  • Linux contributor report: repeated catalog acquisition submitted repeated schema compile jobs, with worker-cache eviction causing sustained recompilation at higher tool counts. Reported 255-tool acquisition time improved from approximately 2800ms to 60ms after successful compile-verdict reuse and worker LRU caching. The standalone benchmark did not reproduce timeouts; restart bursts on a busy machine did. Whole-catalog duration is not directly comparable to the 250ms per-job deadline.
  • PR #582 is merged at ce0a69590519a065a5536b514b0a107c65659305. It addresses repeated compilation, not Windows process identity, and does not establish that cold compilation or timeout propagation is resolved. The measurements remain contributor-reported; merge status does not prove reporter acceptance or release availability.
  • Reporter Windows identity reproduction: isolated beta.0 SEA scopes on Windows build 26100 reportedly reproduced first-run missing runtime.owner/owner.json process identity and attachment failure, one failure in four warm idle attempts, and two failures in three attempts with concurrent PowerShell load. Explicit-URL probes passed. The reporter distinguishes process birth evidence in owner.json from scope identity in runtime-identity.json. These experiments provide concrete scenarios, but no captured underlying acquisition error yet proves ETIMEDOUT; antivirus involvement remains inference.
  • The same report says manually removing processIdentity from owner.json still allowed attachment, while also claiming missing evidence makes later discovery fail. Resolve this discrepancy using exact artifact, before/after metadata, and the actual discovery/ownership path. Do not assume every reported failure shares one cause or conflate owner records with PID records.
  • Reporter Windows schema reproduction: in an isolated beta.0 scope with 13 upstreams, five concurrent explicit-URL attaches during backend startup reportedly produced four failures, 20 timeout log occurrences, and session-creation HTTP 500s. Configuration includes lazyLoading.mode="metatool" and asyncLoading.minServers=20. Capture these settings in the reproduction fixture and verify their version-specific behavior; the reported three-meta-tool observation was against the downgraded 0.38.0 daemon. These results support a startup-burst failure scenario, but do not independently prove cache churn is its sole cause.

The new experiments and performance results have not been independently rerun in this triage update. Per-experiment artifacts were offered by the reporters but are not yet attached/verified here. Windows acceptance remains open.

Investigation priority:

  1. Re-run the reporter's Windows startup-burst scenario against an exact revision containing merged #582, recording npm and SEA artifact identities. Compare with the beta.0 reproduction where feasible; identify residual cold-start, admission, and session failures without reimplementing the merged cache optimization.
  2. Progress identity diagnosis using the supplied reproduction scenarios. Obtain sanitized per-experiment logs, before/after ownership metadata, actual discovery paths, and cold-start lookup timings with underlying error codes. Resolve the manual-removal discrepancy and unexplained SEA failure before changing acquisition strategy or timeout values. Preserve fail-closed ownership verification; loopback reachability is not replacement identity evidence.
  3. Continue the accepted individual-upstream admission-timeout isolation contract. Reduced repeated compilation and bounded failure isolation address different concerns; preserve shared-validator/internal-tool failure semantics and explicit partial-result reporting.

Desired behavior:

  • Automatic local Runtime Scope discovery requires matching process identity evidence. Improve Windows evidence acquisition reliability and actionable diagnostics without replacing ownership verification with PID-only or loopback reachability checks. Explicit --url retains its existing target-selection and authentication behavior.
  • An admission timeout attributable to an individual upstream tool withholds that tool from listing and invocation while retaining healthy capabilities. Timeout is not proof of an invalid schema. Continue enforcing validation and bounded worker resources.
  • Return explicit structured incompleteness, a tool-admission-specific failure category, and recovery guidance. Preserve this status through affected catalog, listing, and refresh consumers; do not silently discard it when storing aggregate results. Recovery guidance restarts listing from the first page.
  • Reattempt admission on a fresh first-page listing or existing capability refresh. Continuations retain the original snapshot and partial status, subject to existing generation invalidation. No new automatic background retry loop is required.
  • Shared validator unavailability and runtime-owned tool admission failure still fail the operation. Do not treat every retryable schema error as an isolatable upstream timeout.
  • If all upstream tools time out, an empty upstream result is allowed only with explicit partial status. A partial result must not replace the last complete configured-tool discovery record as if discovery succeeded completely; retained discovery records do not authorize invocation of withheld tools.
  • Any adjustment to process or schema timeout budgets must follow measured reproduction evidence. Do not assume the reporter's suggested timeout values solve the problem.

Key interfaces:

  • readProcessIdentity / inspectProcessIdentity: trustworthy birth evidence and fail-closed local discovery, with actionable acquisition failure diagnostics.
  • SchemaBoundary / SchemaBoundaryError: bounded execution and distinction between admission timeout and shared validator unavailability.
  • acquireRuntimeCapabilityCatalog and capability refresh consumers: isolate only the accepted upstream failure class and preserve partial-result facts.
  • Capability Pagination Walk, Partial Capability Walk, and configured-tool discovery publication: stable continuation behavior and honest completeness.

Acceptance criteria:

  • [ ] Validate the reporter's 13-upstream metatool startup-burst scenario on an exact revision containing #582, for both Windows npm and SEA artifacts, and record residual failures separately from the historical beta.0 baseline.
  • [ ] Capture underlying process-evidence acquisition errors and reconcile the reported successful attachment after manual removal of owner-record identity. Do not treat missing metadata, PowerShell timeout, and all SEA attachment failures as interchangeable.
  • [ ] Reproduce and document each failure independently, recording exact revision/artifact, Windows and Node versions, relevant sanitized configuration/schema fixture, and timing/error evidence. Distinguish old missing-identity metadata from new acquisition failure and from target mismatch.
  • [ ] Both Windows npm and SEA artifacts pass cold-start runtime launch, proxy automatic discovery, and explicit-URL attachment with a real MCP initialize exchange on the implementation revision.
  • [ ] Exercise the schema fixture that triggers the failure on both Windows artifact forms; document that healthy tools remain discoverable and callable while the timed-out tool is withheld and incompleteness is visible.
  • [ ] Missing, mismatched, or unreadable identity evidence never permits automatic attachment, process termination, or metadata cleanup through weakened ownership checks; existing lifecycle protections remain covered.
  • [ ] A single upstream admission timeout preserves healthy tools. Direct invocation cannot bypass admission of the withheld tool; schema validation remains mandatory.
  • [ ] All-upstream-timeout, shared validator unavailable, and runtime-owned admission failure have the distinct outcomes described above.
  • [ ] Fresh listing/refresh can restore a successfully admitted tool; an existing pagination walk stays consistent and partial through its final page. Existing generation-change behavior remains intact.
  • [ ] Partial discovery does not erase the last complete configured-tool inventory or falsely publish complete-target discovery. Partial status survives the affected refresh/aggregation paths.
  • [ ] Existing malicious-schema/resource-budget tests and regression tests for the new failure boundaries pass. Run repository-required lint, typecheck, build, and unit checks, plus documentation build for documentation changes.
  • [ ] Report any missing Windows access, unavailable artifact, or absent triggering fixture as an unresolved acceptance gate. Do not substitute mock tests or macOS results for Windows acceptance.

Out of scope:

  • Removing process ownership checks, automatically trusting a reachable loopback service, or changing legacy runtime recovery guarantees.
  • Bypassing schema validation, treating shared worker failure as successful partial discovery, or allowing withheld tools to execute without successful admission.
  • General validator caching/scheduling redesign, new background retry services, unrelated timeout tuning, or broad new observability surfaces.
  • Merge, release, or deployment authorization.

xizhibei avatar Sep 27 '26 16:09 xizhibei

Checked the Windows process-identity slice on main ee60b3bfe6d273d406919133fe0996ac64ae1c1f, Windows 11 Pro build 26200. A locally packed and npm-installed 0.39.0-beta.1 artifact under Node 22.23.3 passed a fresh runtime launch, automatic discovery and real MCP initialize (7446 ms), then explicit-URL initialize (2852 ms), with {"mcpServers":{}}. A diagnostic wrapper timed the real PowerShell calls without changing their arguments, timeout or results: all four startup/discovery lookups succeeded in 1965–2054 ms with the existing 3000 ms deadline. Fourteen separate direct lookups also passed in 1755–2377 ms. The built Node 24.19.0 entry passed both attachment paths too.

The Windows SEA built from the same revision had one initial automatic-attachment failure: connection closed after 9955 ms, with no captured diagnostic establishing its cause. Three subsequent automatic probes passed (5128/5407/5334 ms), as did all four explicit-URL probes. I cannot attribute that first failure to process identity.

No source changes or timeout increase yet. This empty-server baseline does not test the separate schema-timeout report. Could you share a cold-start lookup trace with the underlying error code from a fresh scope that fails to record or verify birth evidence? That would distinguish acquisition failure from retained legacy metadata before changing this path.

Hasnaathussain avatar Oct 02 '26 12:10 Hasnaathussain

On the schema-timeout half of this: we hit schema_evaluation_timeout on Linux too, only during bursts (agents reconnecting right after a gateway restart), and it looks like a load problem rather than a slow machine.

Every tools/call acquires a Capability Snapshot, and every acquisition admits every visible tool schema, which sends a compile job to a worker each time. Workers cache up to 128 validators and evict in insertion order. Once the gateway exposes more schemas than that, a full pass evicts each validator right before it's needed again, so nothing is ever cached.

Measured with real tool schemas (Slack, Notion, Paper and a small internal server) replayed through admitToolSchemas the way one acquisition does it, after warm-up:

 85 tools: ~35 ms per acquisition
255 tools: ~2800 ms per acquisition, every time

I couldn't reproduce timeouts with the benchmark alone; they showed up when that compile load landed on a busy machine during gateway startup. Since a timeout replaces the worker and drops its cache, one timeout tends to bring more. As your triage notes, a retryable timeout aborts the whole catalog construction, so the client just sees the call fail.

A compile verdict only depends on the schema, its dialect and the fixed limits, so I made the coordinator remember successful verdicts by dialect and schema digest (bounded, no validators kept outside the workers, failures not remembered) and switched the worker cache to LRU. Same measurement after that: 255 tools go from ~2800 ms to ~60 ms per acquisition. In our restart-burst test (10 clients connecting during startup) we saw two timeouts in one of four runs before, and none in five runs after. PR: #582

This doesn't touch the Windows process identity part, and it won't make a genuinely cold first compile faster.

lenstr avatar Oct 02 '26 19:10 lenstr

By Agent @Hasnaathussain — the cold-start evidence you asked for, and why both error lines are real

First, context that reframes the thread: I am the reporter. This issue was filed from this same machine, and every original log came from it: Windows 11 x64 (build 26100), upgraded in place 0.38.0 → 0.39.0-beta.0 (SEA, same config directory, 13 upstream servers: 11 stdio + 2 http), then downgraded back to 0.38.0 on Sep 30 — which is why everything stopped after Sep 29. The currently running install is the 0.38.0 SEA (C:\tools\1mcp\1mcp-win32-x64.exe, daemon on 127.0.0.1:3050).

All experiments below used the official 1mcp-win32-x64.zip (sha256 d3bd4d3cdc5ed921d9c4a63cb505c4cfacb0f08a1addafbf5226eba82e601e87) in isolated --config-dir scopes on separate ports; the production daemon was never touched.

You asked for a cold-start lookup trace with the underlying error code, to distinguish acquisition failure from retained legacy metadata. On this machine both branches fired, from my original captures:

proxy_fail.log      2026-09-26T16:35:46.389Z [ERROR] Cannot verify process identity for PID 15748: the record has no process birth evidence (legacy format). Lifecycle metadata was retained. ...
proxy_debug_now.log 2026-09-26T16:38:22.213Z [ERROR] Cannot verify process identity for PID 15748: OS process evidence is unavailable to this CLI (permissions or platform tools). Lifecycle metadata was retained. ...

Two findings reconcile them:

1. Where the recorded birth evidence lives. It is the processIdentity field in runtime.owner/owner.json — not in runtime-identity.json (that file only carries runtimeScopeId; the 0.38.0-written one on this machine is 62 bytes). "Legacy format" = owner.json without processIdentity.

2. The acquisition itself is the fragile half on Windows. Extracted from the release binary (matches src/core/server/processIdentity.ts):

execFileSync("powershell.exe",
  ["-NoProfile", "-NonInteractive", "-Command",
   "(Get-Process -Id <pid> -ErrorAction Stop).StartTime.ToUniversalTime().Ticks"],
  { encoding: "utf8", timeout: 3000, stdio: ["ignore", "pipe", "ignore"] })

Timed on this machine, 10 consecutive runs against a live PID, no code changes: 1629 / 1665 / 1683 / 1793 / 2109 / 1705 / 1681 / 1642 / 1717 / 1629 ms — avg 1761 ms. Your own measurements (1755–2377 ms) agree. Each verification performs up to two such calls (one for the verifying CLI's own PID, one for the target). A 3 s budget over a ~1.8 s real cost leaves only ~1.2–1.8× headroom; anything that adds latency — first run of a freshly-written 113 MB exe, 13 backends spawning at startup, general load — pushes individual calls past it.

Controlled reproduction (empty mcpServers so only the identity chain is exercised):

experiment condition serve wrote owner.json processIdentity proxy auto-discovery
A1 fresh scope, beta.0 exe first-ever run NO (serve's own acquisition missed the budget) exit 1, zero stdout — the client-visible symptom in this issue
A2 scope seeded with the 0.38-era legacy runtime-identity.json YES pass
A3 fresh scope, exe already warm YES 1 crash in 4 idle runs
A3' processIdentity removed from owner.json by hand absent pass (missing evidence alone does not deterministically crash)
A3-load 10 parallel PowerShell processes while attaching — 2 crashes in 3 runs
— explicit --url (any of the above) — always passes — it bypasses identity verification

Separating observation from inference, so nothing is overstated:

  • Observed: A1's serve really did write owner.json without processIdentity on the exe's first run; the crash signature is exit code 1 with no stdout and no JSON-RPC response (matches "connection closed: initialize response"); the idle/load crash rates above.
  • Inferred (not separately instrumented): the first-run write failure is most plausibly real-time antivirus scanning of the freshly written exe before the 3 s budget closes; and the same first-run latency profile may explain the one unexplained 9955 ms SEA automatic-attach failure in your baseline.

So the direct answer to your question is: both. A serve-side acquisition failure produces records without birth evidence (every later discovery then hits the "legacy format" branch), and a proxy-side acquisition timeout produces "OS process evidence is unavailable" — one root budget, two observable branches. Your empty-server baseline passing is fully consistent: warm exe + idle machine + your hardware keep every call inside 3 s.

What this suggests for the fix (aligned with the triage brief): the fail-closed contract is fine — the acquisition method is the fragile part. Replacing the synchronous 3 s powershell.exe probe (native API, or async with a larger budget), and/or treating a live PID with verified loopback ownership as sufficient liveness evidence when birth evidence is merely unavailable (instead of unknown → crash), would remove both branches. This machine reproduces the crash on demand (idle 1/4, load 2/3) — happy to test patches.

Artifacts (per-experiment logs, owner.json states, extracted code windows, timings) are saved locally; I can attach anything on request.

(Posting the schema_evaluation_timeout half as a separate reply below for @lenstr.)

Xxx91n avatar Oct 03 '26 05:10 Xxx91n

By Agent @lenstr — your mechanism reproduces on Windows, in the reporter's exact scenario

Context (I'm the reporter; fuller write-up in my reply above): the failing install was 0.39.0-beta.0 on this same Windows 11 machine with 13 upstream servers, downgraded back to 0.38.0 on Sep 30 — which is when the errors stopped.

  • Historical: my server.log carries 342 lines with schema_evaluation_timeout and 37 HTTP error 500 lines; first 2026-09-26T16:35:30.355Z, last 2026-09-29T04:21:54.556Z; none after the downgrade. My proxy_test.log shows an attach succeeding at 16:35:29.950 and the session creation killed ~0.4 s later in phase="admission" — exactly your acquisition-timeout description.

  • Burst replay with the real 13-server config on beta.0, isolated scope: the HTTP endpoint was ready 8 s after launch while backends were still loading; 5 concurrent explicit-URL attaches at that moment → 4/5 failed; the serve log recorded 20 schema_evaluation_timeout occurrences and session-creation HTTP 500s:

2026-10-03T05:14:11.115Z [ERROR] Failed to connect transport stream-84ce29db-...: schema_evaluation_timeout {"code":"schema_evaluation_timeout","retryable":true,"phase":"admission","name":"SchemaBoundaryError", ...}
2026-10-03T05:14:11.116Z [ERROR] HTTP error 500 {"sessionId":"(none)","method":"POST","path":"/mcp","statusCode":500,"errorMessage":"Session creation failed: connection error - schema_evaluation_timeout", ...}
2026-10-03T05:14:12.610Z [ERROR] Failed to connect transport stream-06bb659e-...: schema_evaluation_timeout ...
2026-10-03T05:14:13.463Z [ERROR] Failed to connect transport stream-4cf7260b-...: schema_evaluation_timeout ...
  • A config detail that may matter for the fix: my config.toml has lazyLoading.mode="metatool" (the exposed surface is only 3 meta-tools — verified via a read-only tools/list against the currently running 0.38.0 daemon) and asyncLoading.minServers=20 with only 13 configured servers, so the async-ready threshold is never reached. Admission still timed out during the burst — consistent with admission evaluating the backend catalog rather than the exposed meta-tool surface, i.e. the same "every acquisition admits every visible schema" load model you measured (your numbers: 85 tools ≈ 35 ms, 255 tools ≈ 2800 ms per acquisition against the 250 ms budget).

What this suggests for the fix (aligned with the triage brief): #582 addresses the validator cache; on top of that, the triage point stands — a retryable admission timeout should degrade to withholding the individual capability instead of aborting the whole session creation with an HTTP 500.

Artifacts (per-experiment logs, timings) are saved locally; I can attach anything on request.

Xxx91n avatar Oct 03 '26 05:10 Xxx91n

@Xxx91n Could you test #583 (7c4cccb8) on your Windows machine with both npm and SEA builds, using your real 13-upstream config in isolated scopes? Windows CI passed automatic/explicit MCP attachment and a synthetic five-client startup burst, but your exact reproduction remains unverified.

Please repeat the cold-start/burst scenario and share Windows/Node versions, artifact/revision, and sanitized logs if process-identity errors, schema timeouts, or HTTP 500s remain. Thanks!

xizhibei avatar Oct 04 '26 11:10 xizhibei

By Agent

PR #582 verified on Windows with the reporter's real 13-upstream config: warm bursts fully clean, cold-start burst window remains

Context: I'm the reporter — all original logs in this issue came from this machine (Windows 11 x64, build 26100). Tested v0.39.0-beta.2, the first release containing #582 (tag verified via merge-base to include the merge commit ce0a695905; 1mcp-win32-x64.zip sha256 a8389197336cb053604431e6c51175b1bb7461b3cddc15b88fe521ace6cb81d5 matches the release digest). Production install untouched; isolated --config-dir + separate ports; real config copy: 13 upstream servers (11 stdio + 2 http), lazyLoading.mode="metatool", asyncLoading.minServers=20.

Scenario identical to the original report: gateway cold start (HTTP ready at ~8–9 s while backends are still loading), then 5 concurrent explicit-URL attaches at that instant (the "agents reconnecting after a gateway restart" burst), a second wave at +60 s, and an 8-way pressure wave.

wave beta.0 (no fix) beta.2 (#582)
cold burst (5 concurrent, at HTTP-ready) 4/5 failed, 20× schema_evaluation_timeout 0/5 passed — all 5 failed, 25× schema_evaluation_timeout, 5× session-creation HTTP 500
warm burst (+60 s, 5 concurrent) (historical: 342 timeouts over 3 days — warm failed repeatedly too) 5/5 pass (6.3–8.3 s)
pressure (8 concurrent) not tested 8/8 pass (4.8–8.5 s)

beta.0 cold-burst serve log (baseline):

2026-10-03T05:14:11.115Z [ERROR] Failed to connect transport stream-84ce29db-...: schema_evaluation_timeout {"code":"schema_evaluation_timeout","retryable":true,"phase":"admission","name":"SchemaBoundaryError", ...}
2026-10-03T05:14:11.116Z [ERROR] HTTP error 500 {"sessionId":"(none)","method":"POST","path":"/mcp","statusCode":500,"errorMessage":"Session creation failed: connection error - schema_evaluation_timeout", ...}
2026-10-03T05:14:12.610Z [ERROR] Failed to connect transport stream-06bb659e-...: schema_evaluation_timeout ...
2026-10-03T05:14:13.463Z [ERROR] Failed to connect transport stream-4cf7260b-...: schema_evaluation_timeout ...

Verdict on #582: exactly what @lenstr described — compile-verdict reuse eliminates re-compilation across acquisitions, so once the first pass is cached, bursts are fully clean (13/13 warm+pressure). The stated limitation is confirmed on Windows too: the genuinely cold first compile still blows the 250 ms per-job budget under a startup burst, so the reconnect window right after a gateway restart still fails. That cold-start window is what #583 targets — results in the follow-up comment.

Xxx91n avatar Oct 04 '26 14:10 Xxx91n

@xizhibei — #583 (7c4cccb8) tested on Windows with the real 13-upstream config, npm + SEA: the schema-admission half is fully resolved on both builds, including the cold burst. Process-identity auto-discovery still fails intermittently (unchanged by this PR, as documented) — and your new diagnostics finally captured the underlying error code for it.

Environment

  • Windows 11 x64, build 26100
  • PowerShell 7.4.17
  • npm build: @1mcp/[email protected] (version string from package.json at 7c4cccb8), run under Node v24.3.0
  • SEA build: 1mcp-win32-x64.exe (--version reports 0.39.0-beta.1, same revision)
  • Artifact/revision: built from exactly 7c4cccb8e6f0333915df75b30acb64a95febaae3. The upstream PR CI uploads no npm/SEA artifacts, so I dispatched build-binaries.yml on my fork with release_sha pinned to that commit (run 37207117452, all 6 jobs green; the workflow's checkout uses release_sha when provided, so the built code is exactly the revision you named — note the PR head has since advanced to faa842a2)
  • Fixture: real 13-upstream config (11 stdio + 2 http), isolated --config-dir per build, production 0.38.0 daemon untouched

Scenario (your request: repeat the cold-start/burst scenario): gateway cold start to HTTP-ready (SEA 8 s, npm ~10 s; backends still loading), then at that instant wave 1 = 5 concurrent explicit-URL attaches + 1 automatic-discovery attach (no --url); wave 2 = same at +60 s.

Results:

build explicit-URL wave 1 (cold) explicit-URL wave 2 (warm) serve log
SEA @ 7c4cccb8 5/5 pass (9.6–10.3 s) 5/5 pass (3.0–3.8 s) schema_evaluation_timeout=0, HTTP error 500=0
npm @ 7c4cccb8 (Node v24.3.0) 5/5 pass 5/5 pass schema_evaluation_timeout=0, HTTP error 500=0

20/20 explicit-URL attaches across cold and warm bursts with zero schema timeouts and zero HTTP 500s — on the same fixture where beta.0 failed 4/5 with 20 timeouts and where beta.2 (#582 alone) still failed the entire cold wave. Partial availability behaved as designed during startup:

2026-10-04T13:59:02.834Z [INFO] message="Proceeding with partial MCP availability: 3/12 servers ready"

Process-identity auto-discovery (unchanged by this PR, as documented) — and your diagnostics paid off. Automatic discovery (1mcp proxy without --url) still fails intermittently: SEA 0/2 (exit 1, empty stderr, 3.9 s / 1.4 s), npm 1/2 (cold failed at 10.2 s, warm passed at 6.9 s). Empty stderr on failure matches the original report's observation gap. But the new server-side diagnostic captured what we could not see before:

2026-10-04T13:58:58.246Z [WARN] message="Process birth evidence acquisition failed" platform="win32" pid=6560 elapsedMs=3027 code="ETIMEDOUT"

That line is the cold-start answer in one sentence: the Windows birth-evidence acquisition hits its 3000 ms deadline with ETIMEDOUT. For scale: the PowerShell probe costs 1629–2109 ms idle on this machine (avg 1761 ms; your own baseline measured 1755–2377 ms), and a startup burst pushes it past 3 s. Explicit-URL attaches on the same daemon succeed because they bypass discovery entirely.

Bottom line: with #582 + #583 the schema/admission half of this issue is resolved on Windows for both npm and SEA, including the reporter's cold-start burst. The remaining failure mode is automatic discovery's fail-closed process-identity check — acquisition method and deadline are intentionally unchanged here, and they are still marginal on Windows (ETIMEDOUT at ~3 s under load). All experiment logs are saved locally; happy to attach or re-run any variant.

Xxx91n avatar Oct 04 '26 14:10 Xxx91n

@xizhibei — following up on my test results above: with the schema-admission half resolved by #582 + #583, I went through the source at 7c4cccb8 to understand why automatic discovery still failed in my runs, and the three failure signatures I observed map exactly onto three code paths. Below is a first-principles analysis and a concrete fix proposal that stays inside the contracts this PR explicitly keeps (ADR 0012 fail-closed discovery, ADR 0017 verified ownership, "process acquisition methods and 3000ms deadlines are unchanged"). It is offered as input to this PR or a follow-up — happy to test any patch on demand (this machine reproduces the failures reliably).

1. First principles: what must attach-time ownership verification actually prove?

The proxy must confirm: (a) the PID in server.pid is alive, and (b) the process behind that PID is the runtime that owns this Runtime Scope — not an unrelated or recycled PID. What it does NOT need: the exact creation-time of that process measured through the OS. Creation time is one implementation of anti-recycling evidence, not the contract itself.

Cost of the available evidence sources, measured on this machine:

evidence cost strength
synchronous powershell.exe birth-evidence probe (current, 2 calls per verification) 1629–2109 ms each, avg 1761 ms; ETIMEDOUT at 3027 ms under startup load (captured by this PR's new diagnostic) exact anti-recycling, but fails closed exactly when the machine is busy — the failure scenario of this issue
GET /.well-known/1mcp/runtime-identity + runtimeScopeId match ~7 ms (my serve logs: statusCode=200 duration="7ms") live process + it is a 1MCP runtime answering for this scope
process.kill(pid, 0) liveness ~0 ms live
cooperative control challenge (connectRuntimeControl, claimId-signed) ms-scale, already implemented in this PR cryptographically bound to the scope owner — strictly stronger than birth-time matching

2. The three observed failure signatures, mapped to code at 7c4cccb8

Auto-discovery (detectServer1mcpUrl, src/utils/validation/urlDetection.ts) has two stages, and both fail closed in cases where the MCP endpoint is demonstrably alive (explicit --url passed 20/20 on the same daemons, same seconds):

Signature A — fast fail (1.4 s), control-socket startup race. connectRuntimeControl (src/core/server/runtimeControl.ts:277) finds the control file but the control endpoint is not accepting yet; the internal fetch (5 s AbortSignal.timeout) rejects → the code throws "Runtime control is unreachable..." → wrapped as LocalRuntimeAttachmentError → process.exit(1). The catch in urlDetection.ts only re-throws RuntimeProbeError and never falls through — so a startup race on the control channel kills the attach even though the pid-file URL is up and would validate over HTTP in milliseconds.

Signature B — slow fail (3.9 s), PowerShell budget in the fallback. When control is unavailable, discoverScopedRuntime (src/core/server/runtimeLifecycle.ts:147) runs inspectProcessIdentity(info.pid, info.processIdentity) unconditionally as Tier 1, before any HTTP probe. On Windows that is two synchronous PowerShell spawns (self + target, ~3.4–3.9 s total here), which end in ETIMEDOUT → status: 'error' → LocalRuntimeAttachmentError → exit 1. Your new diagnostic confirmed the underlying code server-side during my cold-start run:

2026-10-04T13:58:58.246Z [WARN] message="Process birth evidence acquisition failed" platform="win32" pid=6560 elapsedMs=3027 code="ETIMEDOUT"

Note that pid=6560 is the serve process acquiring its own birth evidence — a process always knows its own start time without asking the OS.

Signature C — slow fail (10.2 s), stacked control timeouts. Same as A with the control fetch timing out in addition to the fallback never being reached.

3. Proposed fix — three surgical changes

Fix A — serve records self-known birth evidence (removes the "legacy format" branch at the root). The serve process knows its own start time at boot (process.uptime()-derived, captured once at entry). Write processIdentity into runtime.owner/owner.json directly from that, with the PowerShell probe demoted to an optional async cross-check with retries. My cold-start SEA run showed serve failing to record processIdentity on first-ever run (AV scan of a fresh 113 MB exe pushes the probe past 3 s) — self-knowledge removes that OS dependency entirely.

Fix B — attach ownership proof goes over HTTP first (removes PowerShell from the attach path). Reorder discoverScopedRuntime: run the HTTP readiness + identity check (validateServer1mcpUrl → fetchRuntimeIdentity, ~7 ms, with runtimeScopeId match — the validation machinery already exists in this PR) before any OS inspection; treat a responding endpoint with matching scope as sufficient ownership evidence for attach. Keep inspectProcessIdentity where the endpoint cannot answer: dead-PID cleanup decisions and legacy recovery (serve --stop/--restart). This is strictly consistent with the comment already in the code — a live PID owning its Runtime Scope "even when the endpoint rejects or cannot satisfy the probe" — an endpoint that answers with the right scope is stronger evidence than a birth-time match, and it does not fail closed under load.

Fix C — control-channel startup race falls back instead of fatal (removes Signature A/C). In the pidfile path, when connectRuntimeControl fails because the control endpoint is not ready (file exists, fetch rejects), fall through to the pidfile-URL HTTP validation instead of exiting. The fail-closed cooperative-control semantics remain for recovery operations; attach evidence is carried by Fix B's HTTP chain.

Hygiene: log the actual failure reason synchronously to stderr before process.exit(1) (every auto-discovery failure I captured exited with empty stderr — clients like Devin/Windsurf only see "connection closed: initialize response", which is why this issue took a week to triage); parallelize and relax the deadline of the two remaining PowerShell calls in the recovery-only path.

4. Why this preserves the stated contracts

  • ADR 0012 (probe failures precede runtime absence): unchanged — discovery still stops instead of port-scanning, still fails closed for a genuinely unreachable runtime; we only stop demanding OS-level birth evidence when the runtime itself answers over HTTP.
  • ADR 0017 (verified ownership): strengthened — the cooperative control channel (claimId-signed challenge/response, already implemented in this PR) is cryptographically stronger than creation-time tick comparison, and it is attempted first exactly as your PR description states.
  • This PR's own scope note: "process acquisition methods and 3000ms deadlines are unchanged" — I read that as a scoping decision, not a requirement; Fix A/B/C move acquisition out of the attach path rather than changing its deadline.

Bottom line: after #582 + #583, the only remaining failure mode on Windows is attach-time evidence acquisition, and it is removable without touching the fail-closed contracts: the runtime already publishes everything needed over HTTP in ~7 ms. All line references are at 7c4cccb8 (the PR head has since advanced to faa842a2). Every experiment log is saved locally — glad to re-run anything or test patches; the auto-discovery failure reproduces here on demand.

Xxx91n avatar Oct 04 '26 15:10 Xxx91n

@xizhibei Follow-up with a reproduced cold-start crash on the released 0.39.3 SEA build, live evidence from the very machine issue #564 was reported on. This is field data for the fix proposal I posted earlier (https://github.com/1mcp-app/agent/issues/564#issuecomment-5981776436): the acquisition-side failure chain (F1) that #583 intentionally leaves untouched is still firing in production today. Everything below is reproducible; all source citations are against main (= 0.39.3).


1. Environment

  • OS: Windows 11 Pro (10.0.26100 x64)
  • Build: SEA binary C:\tools\1mcp\1mcp-win32-x64.exe, --version = 0.39.3 (placed 2026-10-15)
  • Launch: Windows Scheduled Task 1mcp-daemon:
C:\tools\1mcp\1mcp-win32-x64.exe serve --transport http --host 127.0.0.1 --port 3050
  --config-dir "C:\Users\Administrator\AppData\Roaming\1mcp" --enable-async-loading
  --async-batch-notifications --enable-config-reload --config-reload-debounce 500
  --log-level info --log-file "C:\Users\Administrator\AppData\Roaming\1mcp\logs\server.log"
  • Real 13-upstream config, 290 tools / 4 resources / 8 prompts once fully loaded.

2. What actually happened today (timeline, from server.log + task scheduler)

Local time (UTC+8) Event
14:28:29.724 Cold start SUCCEEDED — runtime.owner/owner.json written: {"pid":6408,"kind":"foreground-http","claimedAt":"2026-10-17T06:28:29.724Z"}
14:29:43 – 14:31:25 Healthy serving: 13/13 upstreams, 290 tools, qoder client sessions completing with HTTP 200
17:08:30 Last log line ever written (Cleaned up 1 expired/corrupted files)
17:52:11 Scheduled task re-launch: LastTaskResult = 1 (process exited with code 1)
17:52 – now Zero new server.log lines; port 3050 unbound; daemon dead until manually started

Same binary, same config, same task: one cold start won the race at 14:28, the 17:52 cold start died. Classic margin-dependent failure.

3. Reproduction (3/3 crashes, foreground, output captured)

Re-running the exact task command line in a captured shell, three attempts, all identical:

EXITCODE=1
--- stdout ---
2026-10-17T14:35:19.895Z [ERROR] message="Server error: <private>" event="serve.server.error.a68bf449" error_kind="other" error_code="other"
--- stderr ---
(empty)
  • Wall time from spawn to exit: ~3.4 s every time.
  • server.log received 0 lines from these runs (no entries match the run timestamps; the file logger transport is not attached yet when the error fires).
  • stderr is empty by construction — see §5.3.
  • The single stdout line is the only observable, and the error message is privacy-redacted to <private>, with error_kind="other" error_code="other" — even a plain errno like EADDRINUSE would be masked (§5.3).

4. Ruled out: stale ownership record

Before claiming, I renamed runtime.owner/owner.json (which held the dead pid 6408 record) out of the way and retried — identical crash (~3.4 s, exit 1, zero log output). The crashed runs never got far enough to write a new owner.json. Conclusion: the crash happens before ownership claim completes, i.e. inside the claim's identity read itself, not in stale-owner recovery.

5. Source-level root cause (0.39.3 / main)

5.1 The claim path reads its OWN birth evidence via a 3-second synchronous PowerShell round-trip

src/sdk/legacy/commands/serve.ts:402:

runtimeOwnership = claimRuntimeScope(runtimeScope, {
  kind: parsedArgv.transport === 'stdio' ? 'foreground-stdio' : 'foreground-http',
});

src/core/server/runtimeScopeOwnership.ts:141 (inside claimRuntimeScope — note process.pid: this is the self case):

: { processIdentity: readProcessIdentity(claimant.pid ?? process.pid) }),

src/core/server/processIdentity.ts:107-124 (win32 branch — unchanged by #582/#583 by design):

if (process.platform === 'win32') {
  const startTime = childProcess
    .execFileSync(
      'powershell.exe',
      ['-NoProfile', '-NonInteractive', '-Command',
       `(Get-Process -Id ${pid} -ErrorAction Stop).StartTime.ToUniversalTime().Ticks`],
      { encoding: 'utf8', timeout: 3000, stdio: ['ignore', 'pipe', 'ignore'] },
    )

5.2 The 3000 ms budget is below real-world latency on this machine — today

Measured today, same command shape, valid target PID, 5 sequential samples (git-bash wall-clock around the exact spawn the app performs):

run1: 3127ms rc=0   <-- EXCEEDS the 3000ms budget; execFileSync would kill it
run2: 2425ms rc=0
run3: 2199ms rc=0
run4: 2518ms rc=0
run5: 2782ms rc=0

For comparison, when I profiled this machine for the original issue report the same probe measured 1629–2109 ms. Under today's load it drifts to 2199–3127 ms. The deadline leaves ~1.1–1.8x headroom on a good day and gets breached on a bad one. Timeout → fail-closed throw → §5.3's catch → exit 1. That is the entire crash, and it explains both today's 14:28 success and the 17:52 / 22:33 / 22:35 / 22:38 failures: it is a coin flip on PowerShell startup latency.

5.3 And when it throws, the failure is invisible

src/sdk/legacy/commands/serve.ts:769-774 (the single catch wrapping the whole startup):

} catch (_error) {
  runtimeOwnership?.release();
  if (parsedArgv.background || parsedArgv.restart)
    process.stderr.write(`Error: ${describeServeLifecycleFailure(_error)}\n`);
  logger.error('serve.server.error.a68bf449', { error: _error });
  process.exit(1);
}

Three stacked observability gaps for the most common launch mode (foreground HTTP under a scheduler):

  1. stderr is only written for --background / --restart — a foreground scheduled-task launch prints nothing to stderr (matches the empty stderr above, and matches every exit 1 + silent report pattern from #564);
  2. the logger.error fires before the --log-file transport is attached, so server.log gets nothing;
  3. the event registry maps the field to a redacted placeholder — src/observability/events/registry.ts:4148 defines 'Server error: <private>' with { error: 'error' }, and src/observability/privacy/fields.ts:200 drops error-rule values entirely (if (rule === 'error') return undefined;). Even error_code is folded to 'other' unless it is in a closed allowlist of gateway codes.

Net effect: an operator with a dead scheduled task sees one redacted line on stdout (only if they capture it at all) and nothing else. This is exactly why the original #564 reports were so hard to triage.

6. What resolves it (restating the proposal with today's evidence)

Fix A from my proposal (comment) addresses precisely this call site: when the process reads its own birth evidence, it already knows it — process.uptime() / process.argv0 / boot-time derivation — no OS query is needed. readProcessIdentity(process.pid) in the claim path (runtimeScopeOwnership.ts:141) is the self case; serving it from in-process state removes the 3000 ms PowerShell round-trip — and therefore the entire cold-start coin flip — while keeping OS-based inspection only for cross-process recovery flows, which is where ADR-0012/ADR-0017 actually need it. Fix B (attach ownership proof via the existing ~7 ms /.well-known/1mcp/runtime-identity HTTP endpoint before ever reaching for PowerShell) covers the cross-process side.

Hygiene, independent of A/B:

  • write the describeServeLifecycleFailure output to stderr for foreground runs too (or attach the file transport before the first fallible step);
  • let error_kind / error_code surface real values for non-credential error classes (a bare ETIMEDOUT would have made today's diagnosis a five-minute job instead of a source dive).

Happy to test any candidate build on this machine — it reproduces on demand right now (3/3 in the last hour).


Appendix: raw captured outputs

Scheduled task state:

TaskName        : 1mcp-daemon
State           : Ready
LastRunTime     : 2026/10/17 17:52:11
LastTaskResult  : 1
Execute         : C:\tools\1mcp\1mcp-win32-x64.exe

owner.json written by the successful 14:28 start:

{"version":1,"pid":6408,"claimId":"2ab67775-5511-4991-b2ce-0b98017eb69c","kind":"foreground-http","claimedAt":"2026-10-17T06:28:29.724Z"}

server.log boundary: last service activity 2026-10-17T06:31:25.070Z [INFO] [POST] /mcp completed {"statusCode":200,...}, then 2026-10-17T09:08:30.582Z [INFO] Cleaned up 1 expired/corrupted files; zero entries exist at the crashed-run timestamps (14:33Z / 14:35Z / 14:38Z).

Xxx91n avatar Oct 17 '26 15:10 Xxx91n

Continuation: #685. The reproduced root cause is distinct from the original probe-timeout inference: the timeout still lets serve start, but persists an ownership record without processIdentity; the next launch then fails closed. #685 carries the reproduction and the scoped fix.

Xxx91n avatar Oct 22 '26 19:10 Xxx91n