actions / runner

The Runner for GitHub Actions :rocket:
https://github.com/features/actions
MIT License
4.64k stars 892 forks source link

Log "Kill entire process tree" does not match actual behavior #3341

Open carlcsaposs-canonical opened 2 weeks ago

carlcsaposs-canonical commented 2 weeks ago

I have no experience with .NET, so I apologize if I am misunderstanding and this is not a bug

Describe the bug The log "Kill entire process tree..." https://github.com/actions/runner/blob/3f28dd845f5665426c4df81f2ef230d1cb1dd2da/src/Runner.Sdk/ProcessInvoker.cs#L463 does not match the actual behavior of the runner: https://github.com/actions/runner/blob/3f28dd845f5665426c4df81f2ef230d1cb1dd2da/src/Runner.Sdk/ProcessInvoker.cs#L861

.Kill(), from my understanding, only kills that process. It does not kill children processes. To kill the entire process tree, use .Kill(true)

To Reproduce Look at source code or run job with

steps:
   - run: sleep 360
     timeout-minutes: 1

and look at logs in ~/actions-runner/_diag/Worker_*.log

Expected behavior Log says "Kill process" instead of "Kill entire process tree"

Runner Version and Platform

Version of your runner? v2.317.0

OS of the machine running the runner? Ubuntu 22.04

What's not working?

Log says "Kill entire process tree"