Repository navigation
[v3-4-test] Run a language SDK runtime in its own process group (#75707) - #75731
Merged
vatsrahul1001 merged 1 commit intoOct 27, 2026
Merged
Conversation
…he#75707) Stopping a task that a language SDK runs signalled the runtime's pid alone, so anything the task had started was reparented to PID 1 and kept running. While such a child is alive it also holds the runtime open, so the runtime itself survived until the SIGKILL escalation `killed_task_cleanup_time` later. The runtime now starts with `process_group=0` and the supervisor is told the child has its own group, so the existing `os.killpg` path reaches the whole tree, as it has for Python tasks since apache#65505. A startup that fails signals the group too, and a runtime that exits before connecting is already reaped, so its group is reached by the leader's pid. This covers every way the supervisor stops a task -- a cleared task, `execution_timeout`, repeated heartbeat failures and task-success overtime -- for the TypeScript, Java and executable runtimes alike. (cherry picked from commit 750f849) closes: apache#75533 Co-Authored-By: Claude <noreply@anthropic.com>
jason810496
requested review from
amoghrajesh,
ashb and
uranusjr
as code owners
October 27, 2026 08:18
vatsrahul1001
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v3-4-testWhy
Stopping a task that a language SDK runs signalled the runtime's pid alone, so a CLI the task had started was reparented to PID 1 and kept running. That child also holds the runtime open, so the runtime itself survived until the SIGKILL escalation
killed_task_cleanup_time(60 s by default) later. The issue is reported against 3.4.0b, so the fix is worth having on the release branch.How
A clean cherry-pick of 750f849 apart from one test-file conflict.
TestPopenActivitySubprocessExecutionTimeoutis context in the original hunk but does not exist here, since #74869 was reverted fromv3-4-testin #75469. Dropping that context is the only change; the resulting diff is otherwise identical to the one onmain.v3-4-testalready hasnew_process_groupin the supervisor from #65738, so nothing else needed adapting.Was generative AI tooling used to co-author this PR?