-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bad file descriptor when running with Github Actions #2593
Comments
Is it a self-hosted runner? Can you show the output of |
I have this exact issue. Pinning buildx to |
Self-hosted runner, using cache settings:
where The issue persisted when I used a completely new cache location and when i removed all Removing the |
On 0.16 / latest:
|
I reproduced this with pure buildkit. Started to happen with buildkit v0.15.0. I patched v0.15.0 and only reverted github.com/gofrs/flock back to v0.8.1. This resolves it. In my environment, the cache directory is a volume mount in a pod which is a NFS-based persistent volume. |
@SaschaSchwarze0 Thanks for your repro, could you post BuildKit logs in debug please? |
One quick clarification in addition to what I wrote above. The patch (= the revert of github.com/gofrs/flock) is necessary for buildctl, not for buildkitd. With debugging enabled on buildctl, the following stack trace is shown: error: could not lock /tmp/buildkit-cache/index.json.lock: bad file descriptor
122 v0.15.0 buildctl --debug build --trace=/tmp/buildkit-cache/trace.log --progress=plain --frontend=dockerfile.v0 --opt=filename=Dockerfile --opt=platform=linux/amd64,linux/arm64 --local=context=/workspace/source --local=dockerfile=/workspace/source --output=type=oci,tar=false,dest=/workspace/output-image --export-cache=type=local,mode=max,dest=/tmp/buildkit-cache --import-cache=type=local,src=/tmp/buildkit-cache
github.com/moby/buildkit/client/ociindex.StoreIndex.Put
/src/client/ociindex/ociindex.go:65
github.com/moby/buildkit/client.(*Client).solve
/src/client/solve.go:349
github.com/moby/buildkit/client.(*Client).Build
/src/client/build.go:64
main.buildAction.func5
/src/cmd/buildctl/build.go:369
golang.org/x/sync/errgroup.(*Group).Go.func1
/src/vendor/golang.org/x/sync/errgroup/errgroup.go:78
runtime.goexit
/usr/local/go/src/runtime/asm_arm64.s:1222 |
@SaschaSchwarze0 Thanks, do you repro with v0.11.0 as well? I wonder if this issue is related to this change gofrs/flock#87 |
EDIT1: one second, copied the wrong file to my test setup EDIT2: no, the change you refer to I also found suspicious. But, it looks like this: buildctl v0.15.0 compiled with github.com/gofrs/flock@v0.10.0: works So, must be somehow something in gofrs/flock@v0.10.0...v0.11.0. |
Seems to be gofrs/flock@b659e1e where |
@SaschaSchwarze0 Should be fixed with moby/buildkit#5183 |
Is there an easy workaround for docker-ce users on Ubuntu 20.04?
Ok downgrading the buildkit package seems to fix it. Hopefully that's right approach and next upgrade fixes it.
|
Contributing guidelines
I've found a bug and checked that ...
Description
The command :
Throws a
bad file descriptor
errorExpected behaviour
The docker image should be built, pushed and cached.
Pin pointing to buildx 0.15.2 in the
setup-build-action
solves the issue with the exact same action configuration.Actual behaviour
Caching fails and throws a
bad file descriptor
error:ERROR: could not lock /var/lib/docker/actions/$image/index.json.lock: bad file descriptor
When looking into runners
/var/lib/docker/actions/$image
path,index.json.lock
exists with runner rights.Buildx version
v0.16.0 10c9ff9
Docker info
Builders list
Configuration
Build logs
Additional info
Context:
Context:
docker/setup-buildx-action
Github Action, without theversion
param: Uses latest BuildX version docker-container driverdocker/build-push-action
Github ActionThe text was updated successfully, but these errors were encountered: