[GH-ISSUE #4790] [Other] Windows nested-job supervision: supported creation-handle integration #2198

Open
opened 2026-11-04 01:57:25 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @mrdenisborisov25-art on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4790

We are integrating Strata into a custom Windows application with an independent process supervisor.

Environment: Windows build 10.0.26300; .NET 10 application targeting net10.0 (the exact loaded servicing patch was not captured). Control 0.1.51, commit 562a0c2ed7; native engine 0.1.50, commit 1aff6d1411, Windows x86-64/CUDA 13.0; bundled Python 3.12.15.

The supervisor owns a private kill-on-close Job containing a worker and Control. Control also uses its own Job for subprocess containment. During startup, the supervisor enumerated its own Job and called OpenProcess for one returned PID with PROCESS_QUERY_LIMITED_INFORMATION | SYNCHRONIZE (0x00101000), with handle inheritance disabled. This returned ERROR_ACCESS_DENIED (5).

The failure occurred before executable identity and creation time could be established. We therefore cannot identify that PID as strata.exe or attribute the denial to Strata protection. This was observed in our custom integration; it has not been reproduced with the stock launcher.

The supervisor stopped immediately, without retrying or requesting broader access, terminated its own Job, and confirmed an empty Job in two subsequent queries. No generation request was sent.

Does Control provide a supported process-creation or lifecycle interface that would let an independent supervisor retain a creation-time process handle and verify Job membership, creation time, termination and exit code without reopening descendants by PID? The reviewed Windows containment code uses Popen._handle, which is not a public Popen interface.

We need to preserve independent deadlines, resource monitoring and fail-closed cleanup. We are not seeking changes to ACLs, elevation, Windows protections, or a workaround for denied access. Please advise on a supported integration contract and any relevant documented limitations.

Originally created by @mrdenisborisov25-art on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4790 We are integrating Strata into a custom Windows application with an independent process supervisor. Environment: Windows build 10.0.26300; .NET 10 application targeting net10.0 (the exact loaded servicing patch was not captured). Control 0.1.51, commit 562a0c2ed7169ff6373f893b162106d55a828297; native engine 0.1.50, commit 1aff6d14117b, Windows x86-64/CUDA 13.0; bundled Python 3.12.15. The supervisor owns a private kill-on-close Job containing a worker and Control. Control also uses its own Job for subprocess containment. During startup, the supervisor enumerated its own Job and called OpenProcess for one returned PID with PROCESS_QUERY_LIMITED_INFORMATION | SYNCHRONIZE (0x00101000), with handle inheritance disabled. This returned ERROR_ACCESS_DENIED (5). The failure occurred before executable identity and creation time could be established. We therefore cannot identify that PID as strata.exe or attribute the denial to Strata protection. This was observed in our custom integration; it has not been reproduced with the stock launcher. The supervisor stopped immediately, without retrying or requesting broader access, terminated its own Job, and confirmed an empty Job in two subsequent queries. No generation request was sent. Does Control provide a supported process-creation or lifecycle interface that would let an independent supervisor retain a creation-time process handle and verify Job membership, creation time, termination and exit code without reopening descendants by PID? The reviewed Windows containment code uses Popen._handle, which is not a public Popen interface. We need to preserve independent deadlines, resource monitoring and fail-closed cleanup. We are not seeking changes to ACLs, elevation, Windows protections, or a workaround for denied access. Please advise on a supported integration contract and any relevant documented limitations.
Author
Owner

@Niko1221 commented on GitHub (Oct 31, 2026):

Control keeps its own kill-on-close job for what it starts (strata_control/runtime.py). There is no interface that hands out a creation-time process handle. The supported ways to follow a run are strata launch --status / --stop and the HTTP interface in docs/MANAGEMENT_PROTOCOL.md; we have not documented the job layout as a contract. We can look at a documented, supported handle hand-over if you describe what your supervisor needs to verify.

<!-- gh-comment-id:6547929006 --> @Niko1221 commented on GitHub (Oct 31, 2026): Control keeps its own kill-on-close job for what it starts (strata_control/runtime.py). There is no interface that hands out a creation-time process handle. The supported ways to follow a run are `strata launch --status` / `--stop` and the HTTP interface in docs/MANAGEMENT_PROTOCOL.md; we have not documented the job layout as a contract. We can look at a documented, supported handle hand-over if you describe what your supervisor needs to verify.
Author
Owner

@mrdenisborisov25-art commented on GitHub (Oct 31, 2026):

Thanks for clarifying. Our independent supervisor needs to:

  1. Associate each process with a specific launch and verify executable identity and creation time without PID-reuse races.
  2. Verify containment in our own Job without depending on Control's undocumented Job layout.
  3. Monitor resource limits and enforce an independent deadline even if Control or its management interface hangs.
  4. On cancellation, timeout or startup failure, terminate only that run's processes, confirm actual termination, retrieve exit codes and verify that no owned processes remain.

For a supported creation-time handle hand-over, what would the ownership/lifetime rules, minimum rights and hand-over point be? How would failures before hand-over be handled?

Which of these guarantees do the existing status/stop commands and management interface provide? Does a successful stop response confirm process exit and descendant cleanup, or only acknowledge the request? An existing supported approach meeting these requirements would also work.

We are not requesting elevation, ACL changes or a workaround for denied access. The earlier denial was observed in our custom integration; we have not attributed it to Strata.

<!-- gh-comment-id:6550203064 --> @mrdenisborisov25-art commented on GitHub (Oct 31, 2026): Thanks for clarifying. Our independent supervisor needs to: 1. Associate each process with a specific launch and verify executable identity and creation time without PID-reuse races. 2. Verify containment in our own Job without depending on Control's undocumented Job layout. 3. Monitor resource limits and enforce an independent deadline even if Control or its management interface hangs. 4. On cancellation, timeout or startup failure, terminate only that run's processes, confirm actual termination, retrieve exit codes and verify that no owned processes remain. For a supported creation-time handle hand-over, what would the ownership/lifetime rules, minimum rights and hand-over point be? How would failures before hand-over be handled? Which of these guarantees do the existing status/stop commands and management interface provide? Does a successful stop response confirm process exit and descendant cleanup, or only acknowledge the request? An existing supported approach meeting these requirements would also work. We are not requesting elevation, ACL changes or a workaround for denied access. The earlier denial was observed in our custom integration; we have not attributed it to Strata.
Author
Owner

@mrdenisborisov25-art commented on GitHub (Nov 4, 2026):

Hi Niko, just following up on our questions above. We’re still waiting for your guidance on the supported process handle and cleanup guarantees. Could you please take a look when you have a chance? Thank you.

<!-- gh-comment-id:6623191556 --> @mrdenisborisov25-art commented on GitHub (Nov 4, 2026): Hi Niko, just following up on our questions above. We’re still waiting for your guidance on the supported process handle and cleanup guarantees. Could you please take a look when you have a chance? Thank you.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2198
No description provided.