Skip to content

record stop fails under host load because owner-identity ps probes have a fixed 1s timeout, leaving the recording in cleanup-pending #2549

Description

@janicduplessis

What happened

agent-device 0.21.1 (also 0.20.10), macOS, iOS simulator. During an Xcode build on the same host (load average around 350), agent-device record stop failed with:

/bin/ps timed out after 1000ms

exit 1, empty output. The same ps -ax -o pid=,ppid=,command= takes 0.09 s from a shell when the host is idle. After the failure the recording resource stayed in cleanup-pending, record start refused with "recording already in progress" for the rest of the session, and the only way out was to SIGINT the simctl recordVideo process by hand and record with simctl io recordVideo directly.

Where

dist/src/owner-identity.js: every /bin/ps -p <pid> -o lstart=|command=|state= probe runs with timeoutMs: 1000 (the m=1e3 constant). The daemon uses those probes to confirm the recorder's identity (pid + start time) before signalling it; when ps exceeds a second the stop refuses instead of signalling.

Proposal

Scale the probe timeout with load, or retry once with a longer budget before refusing; and when identity cannot be confirmed within the budget, say so and leave the recording in a state record stop can retry, rather than cleanup-pending.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions