You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: /etc/*release "no such file or directory" #334
Run actions/checkout@v2
/usr/bin/docker exec 432276a4e63948fd1ce317e06c553d8b59da3899e0254e9381f32d34cf40b653 sh -c "cat /etc/*release | grep ^ID"
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "no such file or directory": unknown
Description
checkout is not able to find the /etc/*release file for some reason. A previous issue asserted it had to do with being alpine but i have tested the alpine/git container that worked in the exact same context:
one thing to note is that this container was built by a nix expression so its quite bare. perhaps there are some other requirements that yall could point to that i could be missing?
Reacted by Shane Husson, Bernd van der Veen, Robert James Hernandez, Neyts Zupan, Daniil Gentili, Silvan Mosberger, P. L. Lim, Erik Nobel, ecoation-devops, Gopinath Sabapathy and 33 more
Run actions/[email protected]
/usr/bin/docker exec ad88ff3bf80befa617e90d59c75d187a7e273e4bf3f7d8df277befbe9a43bdac sh -c "cat /etc/*release | grep ^ID"
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "no such file or directory": unknown
I was able to reproduce locally using only docker (without anything related to github action).
At some point, docker exec container_id sh -c "cat /etc/*release | grep ^ID" start to fail and never work anymore.
As of now, I still don't know what triggers this failure.
However I'm curious of why the post script of the checkout action needs to know the ID of the docker image?
I did a bit of investigating, and I'm now fairly certain that the cat /etc/*-release command has nothing to do with this failure. I confirmed this by changing sh to run strace -e trace=file sh, and there was no additional output. So the failure probably happens before the container is even started.
A thing I tried that didn't work is something like
ln -s run/profile/bin bin
mkdir -p home lib mnt opt sbin var/{cache,empty,lib,tmp,opt,log,local}
ln -s /run var/run
ln -s /bin sbin
This creates a bunch of common directories. No luck though, still the same failure
In addition, I suspect this has nothing to do with the checkout action even. It's likely a problem with GitHub Actions themselves. Which makes it pretty hard to debug since it's closed source..
The problem is that this build may not be compatible with the container. In my case, BusyBox doesn't have the required shared libraries.
My armchair suggestion is that the Node.js build should be completely static to avoid these situations, but perhaps this has other disadvantages which make it impractical.
I've done a quick experiment that allows the action to run inside BusyBox, but I warn that no one under any circumstances should use it as a workaround.
The node binary uses /lib64/ld-linux-x86-64.so.2 as the dynamic linker, so make sure that exists. For Nix, this should be ${pkgs.glibc}/lib/ld-linux-x86-64.so.2
The binary also depends on the dynamic library libstdc++.so.6, which by default isn't found, because Nix's glibc linker doesn't look into any /lib, etc. directories for finding libraries. The easiest way to make it find that library is by setting LD_LIBRARY_PATH to ${pkgs.stdenv.cc.cc.lib}/lib.
What I used for debugging:
Getting the node binary that GitHub Actions use:
$ curl -L https://github.com/actions/runner/releases/download/v2.273.5/actions-runner-linux-x64-2.273.5.tar.gz \
| tar -zxf- ./externals/node12/bin/node
Starting your Docker image with the externals folder mounted like the runner does:
$ docker run -it -v $PWD/externals:/__e my-image
Using file to inspect the dynamic linker path:
[docker]$ file /__e/node12/bin/node
/__e/node12/bin/node: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked,
interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=78d3113df82429048fda632489c1b285c80716c3, with debug_info, not stripped
Running ldd on the binary to see any missing libraries:
Activity
shusson commentedon Aug 18, 2020
We're getting the same issue but on a self-hosted runner which was set up following https://github.com/summerwind/actions-runner-controller. The image contains a subset of packages from the GitHub runners, https://github.com/summerwind/actions-runner-controller#softeware-installed-in-the-runner-image.
berndvdveen commentedon Aug 19, 2020
@drewmullen This should be resolved in the latest version of actions/checkout. Try:
uses: actions/[email protected]drewmullen commentedon Aug 19, 2020
@berndvdveen unfortunately not :(
workflow: https://github.com/drewmullen/actions-playground/blob/master/.github/workflows/step_container.yml
action job: https://github.com/drewmullen/actions-playground/runs/1002786826?check_suite_focus=true
XavierChapron commentedon Aug 25, 2020
I'm having the same issue with:
Then Post Clone repository step fails:
Note that for an unknown reason, if I remove
ctest -Vfrom the last step, this issue does not occurs.XavierChapron commentedon Aug 25, 2020
I was able to reproduce locally using only docker (without anything related to github action).
At some point,
docker exec container_id sh -c "cat /etc/*release | grep ^ID"start to fail and never work anymore.As of now, I still don't know what triggers this failure.
However I'm curious of why the post script of the checkout action needs to know the ID of the docker image?
Support for using this as `container:` with GitHub Actions
zupo commentedon Sep 1, 2020
I'm bumping into the same problem. Using https://github.com/niteoweb/nix-docker-base as the docker image. Works fine locally, on CircleCI and on Heroku, does not work on GitHub Actions.
bcardiff commentedon Sep 1, 2020
I wanted to use
i386/ubuntu:bionicas the container and I reach the same issue.Yet
/usr/bin/docker exec 43...53 sh -c "cat /etc/*release | grep ^ID"works locally with that image.Using v2.3.2 makes no difference.
danog commentedon Oct 8, 2020
Same here with 2.3.3.
infinisil commentedon Oct 18, 2020
I did a bit of investigating, and I'm now fairly certain that the
cat /etc/*-releasecommand has nothing to do with this failure. I confirmed this by changingshto runstrace -e trace=file sh, and there was no additional output. So the failure probably happens before the container is even started.A thing I tried that didn't work is something like
This creates a bunch of common directories. No luck though, still the same failure
I also tried running the container with
runclocally as shown in https://github.com/opencontainers/runc#using-runc, but that worked just fine and I couldn't reproduce the failureIn addition, I suspect this has nothing to do with the checkout action even. It's likely a problem with GitHub Actions themselves. Which makes it pretty hard to debug since it's closed source..
hectorm commentedon Oct 21, 2020
Yesterday I stumbled across this error using a BusyBox container and found this issue, today I took some time to debug it.
The reason for this is that GitHub Actions are written in JavaScript, so in order for an action to run inside a container, Node.js must be present, so the runner copies a Node.js build into the container.
The problem is that this build may not be compatible with the container. In my case, BusyBox doesn't have the required shared libraries.
My armchair suggestion is that the Node.js build should be completely static to avoid these situations, but perhaps this has other disadvantages which make it impractical.
I've done a quick experiment that allows the action to run inside BusyBox, but I warn that no one under any circumstances should use it as a workaround.
test-with-lib-mount log
test-without-lib-mount log
infinisil commentedon Oct 24, 2020
Nice, I also looked into this again and figured it out in Nix's case as well, see teamniteo/nix-docker-base@0a5ceed for the fix for nix-docker-base
In short:
/lib64/ld-linux-x86-64.so.2as the dynamic linker, so make sure that exists. For Nix, this should be${pkgs.glibc}/lib/ld-linux-x86-64.so.2libstdc++.so.6, which by default isn't found, because Nix's glibc linker doesn't look into any/lib, etc. directories for finding libraries. The easiest way to make it find that library is by settingLD_LIBRARY_PATHto${pkgs.stdenv.cc.cc.lib}/lib.What I used for debugging:
nodebinary that GitHub Actions use:externalsfolder mounted like the runner does:fileto inspect the dynamic linker path:lddon the binary to see any missing libraries:LD_TRACE_LOADED_OBJECTS=1,LD_DEBUG=allandLD_VERBOSE=1are useful for debugging linking.smorimoto commentedon Nov 14, 2020
After all, this PR #70 turned this action into an action called "JavaScript Actions", so we can use v1 to checkout the code without any extra hacks.
smorimoto commentedon Nov 14, 2020
ping: @ericsciple
TST: Try checkout v1, see actions/checkout#334 [ci skip]
54 remaining items
Install libstdc++6:amd64 in the container
Install 64-bit Node in container, for its libraries
Install libstdc++6:amd64 in the container
Install 64-bit Node in container, for its libraries
Install libstdc++6:amd64 in the container
Install 64-bit Node in container, for its libraries
Install libstdc++6:amd64 in the container
Install 64-bit Node in container, for its libraries
Install libstdc++6:amd64 in the container
Install 64-bit Node in container, for its libraries
Install libstdc++6:amd64 in the container
Install (and not Node) libstdc++6:amd64 in the container
Install libstdc++6:amd64 (and not Node) in the container
h0nIg commentedon Mar 13, 2025
Fix test-linux-armv7 job for forks not named "hermes" (#2047)