Skip to content

[Improvement-18311][Task] Support killing shell task process group#18367

Closed
qiuyanjun888 wants to merge 1 commit into
apache:devfrom
qiuyanjun888:Improvement-18311
Closed

[Improvement-18311][Task] Support killing shell task process group#18367
qiuyanjun888 wants to merge 1 commit into
apache:devfrom
qiuyanjun888:Improvement-18311

Conversation

@qiuyanjun888

Copy link
Copy Markdown
Contributor

Was this PR generated or assisted by AI?

YES. AI assisted with code implementation and PR preparation. I reviewed the changes before submission.

Purpose of the pull request

Improve shell task termination by making the task process run in its own process group, so the worker can kill the whole shell task process group instead of relying only on the parent process tree.

Closes #18311.

Brief change log

  • Add a configurable shell task process group kill switch.
  • Wrap local Linux shell task commands with process-group setup support.
  • Add process-group kill utilities for shell task termination.
  • Add unit coverage for shell interceptor process-group command generation and process-group kill behavior.
  • Document the new configuration in common properties, Helm values, and configuration docs.

Verify this pull request

This change added tests and can be verified as follows:

  • ./mvnw -pl dolphinscheduler-task-plugin/dolphinscheduler-task-api -am -Dspotless.check.skip=true -Djacoco.skip=true -Dtest=ProcessUtilsTest,BaseLinuxShellInterceptorBuilderTest test

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md.

@SbloodyS SbloodyS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setsid can also lead to orphan process. Compared with the current way, there is no optimization. I'll close this PR until reach consensus in #18311

@SbloodyS SbloodyS closed this Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Workflow remains READY_STOP when task kill status check misclassifies child processes

2 participants