actions / actions/runner

musl libc detection doesn't work correctly

Open
#3,852 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
musl libc detection doesn't work as expected. There are some hard coded checks for Alpine Linux, but they are fragile as musl libc is not exclusive to Alpine Linux.

To Reproduce

  1. Run any action, for example.
jobs:
  chimera:
    runs-on: ubuntu-latest
    container:
      image: chimeralinux/chimera:latest

    steps:
      - uses: actions/checkout@v4
  1. Runner will download glibc version of node binaries, that fail to run, because there is no glibc available...
exec /__e/node20/bin/node: no such file or directory

no such file or directory in this case relates in this case to the glibc dynamic linker, which is not available on musl based distro.

Workaround
This is "fixable" by lying that we are Alpine, but naive checks like that are fragile and fails with any non-glibc distribution that happens to be not Alpine.

Adding this before checkout step make it work.

      - name: ...
        run: |
          # We are Alpine now! Apparently, only Alpine is allowed to use musl...
          # Needed for actions/checkout.
          sed '/^ID="/s/chimera/alpine/' /etc/os-release > /tmp/os-release
          mv /tmp/os-release /etc/os-release

Expected behavior
Detection on musl libc works and downloads correct node binaries.

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

Start by tracing the runner's libc and operating-system detection used when selecting Node binaries, then reproduce the failure with the chimeralinux/chimera:latest container and the checkout action. Done means musl-based systems that are not Alpine are detected correctly and receive runnable Node binaries.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, linux
Domain
devops, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.