actions / actions/runner

Github runner application exit code is not propagated via launcher

Open
#2,769 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug keep
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug
The wrapper script for Runner.Listener does not propagate the exit code when invoked, and always exists 0.
This makes it impossible for any systemd unit error handling to correctly handle the runner exit status.

Submitted a fix here, https://github.com/actions/runner/pull/2719 but it has not had any attention in over three weeks.

To Reproduce
Steps to reproduce the behavior:

  1. Force the runner listener process to exit non-zero (I did this via an invalid registration)
  2. Allow any retries to exhaust.
  3. Check the exit code of the process, note that it is 0.

Expected behavior
The error code is propagated to the caller.

Runner Version and Platform

Version of your runner?
v2.308.0

OS of the machine running the runner? OSX/Windows/Linux/...
Linux

What's not working?

N/A

Job Log Output

N/A

Runner and Worker's Diagnostic Logs

N/A

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the wrapper script that invokes Runner.Listener and the linked pull request #2719, then reproduce the invalid-registration case on Linux. Done means the launcher returns the Runner.Listener exit code instead of always returning 0.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.