Post

Replies

Boosts

Views

Activity

Reply to Diagnosing pre-main latency in a short-lived macOS child process while preserving its parent
One important clarification after reviewing our original design and implementation: my previous reply omitted why the separate query process was introduced. This is a controlled validation harness for a fixed native host, not a general-purpose process-identity service. The intended sequence is: Observer creates the target using POSIX_SPAWN_START_SUSPENDED. Before resuming it, Query checks dynamic code validity, the expected build identity, and the required runtime/library-validation status bits. Observer resumes the target only after validating the complete result, observing stdout/stderr EOF, and confirming that Query exited successfully and was reaped. Observer then checks the target’s fixed synthetic output and termination. The goal is to observe these properties without modifying the host being validated. This is a limited diagnostic observation, not a claim of continuous protection or production authentication. The separate Query process was introduced because the Security calls are synchronous: if a call blocks, Observer must remain able to handle cancellation, terminate Query and the still-suspended target, and perform bounded cleanup. Observer owns both children. An outer watchdog addresses Observer stalls, but does not guarantee descendant cleanup after a forced termination. Therefore, moving the synchronous check directly into Observer’s supervision loop would lose an intended failure-isolation property unless another supported mechanism replaces it. The existing 1000 ms query deadline is an application/test budget, not an OS guarantee. We have not established that this particular value is appropriate. Given this more specific goal, is a disposable helper a reasonable isolation boundary, or would you recommend another supported design that preserves cancellation and bounded cleanup without relying on fast per-check process startup?
2w
Reply to Diagnosing pre-main latency in a short-lived macOS child process while preserving its parent
Thank you, Quinn. You are right that my original post focused too heavily on the diagnostic machinery and did not explain the goal clearly. The immediate goal is a reliable native process-identity check within an automated test workflow. If the check times out or cannot establish the identity, the workflow must not treat that as a successful verification. The target is synthetic in these tests. The supervisor/watchdog/observer/query chain is our current test arrangement. I have not established that all of those process boundaries are necessary for the actual functionality. Preserving the chain was a constraint for comparing diagnostic runs with the original failing test, not a claim that this is the best production architecture. Likewise, the 1000 ms deadline is an existing application/test requirement, not an expectation that macOS guarantees process startup within that time. We are not trying to optimize posix_spawn itself. We are trying to understand whether the intermittent timeout points to a problem in our implementation or to a fragile design assumption: starting a fresh helper and completing the identity check within that deadline. The successful instrumented runs showed substantial elapsed time before main(), but they did not establish the cause of the original failure. Before collecting more traces, would you recommend first reconsidering the per-check helper process—for example, performing the check in an existing process or using a longer-lived helper? What functional or isolation requirements would you need us to clarify to assess that choice? We have not changed the implementation or relaxed the existing acceptance criteria.
2w
Reply to Diagnosing pre-main latency in a short-lived macOS child process while preserving its parent
One important clarification after reviewing our original design and implementation: my previous reply omitted why the separate query process was introduced. This is a controlled validation harness for a fixed native host, not a general-purpose process-identity service. The intended sequence is: Observer creates the target using POSIX_SPAWN_START_SUSPENDED. Before resuming it, Query checks dynamic code validity, the expected build identity, and the required runtime/library-validation status bits. Observer resumes the target only after validating the complete result, observing stdout/stderr EOF, and confirming that Query exited successfully and was reaped. Observer then checks the target’s fixed synthetic output and termination. The goal is to observe these properties without modifying the host being validated. This is a limited diagnostic observation, not a claim of continuous protection or production authentication. The separate Query process was introduced because the Security calls are synchronous: if a call blocks, Observer must remain able to handle cancellation, terminate Query and the still-suspended target, and perform bounded cleanup. Observer owns both children. An outer watchdog addresses Observer stalls, but does not guarantee descendant cleanup after a forced termination. Therefore, moving the synchronous check directly into Observer’s supervision loop would lose an intended failure-isolation property unless another supported mechanism replaces it. The existing 1000 ms query deadline is an application/test budget, not an OS guarantee. We have not established that this particular value is appropriate. Given this more specific goal, is a disposable helper a reasonable isolation boundary, or would you recommend another supported design that preserves cancellation and bounded cleanup without relying on fast per-check process startup?
Replies
Boosts
Views
Activity
2w
Reply to Diagnosing pre-main latency in a short-lived macOS child process while preserving its parent
Thank you, Quinn. You are right that my original post focused too heavily on the diagnostic machinery and did not explain the goal clearly. The immediate goal is a reliable native process-identity check within an automated test workflow. If the check times out or cannot establish the identity, the workflow must not treat that as a successful verification. The target is synthetic in these tests. The supervisor/watchdog/observer/query chain is our current test arrangement. I have not established that all of those process boundaries are necessary for the actual functionality. Preserving the chain was a constraint for comparing diagnostic runs with the original failing test, not a claim that this is the best production architecture. Likewise, the 1000 ms deadline is an existing application/test requirement, not an expectation that macOS guarantees process startup within that time. We are not trying to optimize posix_spawn itself. We are trying to understand whether the intermittent timeout points to a problem in our implementation or to a fragile design assumption: starting a fresh helper and completing the identity check within that deadline. The successful instrumented runs showed substantial elapsed time before main(), but they did not establish the cause of the original failure. Before collecting more traces, would you recommend first reconsidering the per-check helper process—for example, performing the check in an existing process or using a longer-lived helper? What functional or isolation requirements would you need us to clarify to assess that choice? We have not changed the implementation or relaxed the existing acceptance criteria.
Replies
Boosts
Views
Activity
2w