buildkit
buildkit copied to clipboard
RHEL8 VM environment: error: failed to solve: process /bin/sh . exit code : 139
Note: I) This error only happened in RHEL8 VM. This works fine in Ubuntu20.04 VM II) Unlike the Ubuntu VM above, there's no docker(containerd) installed in this RHEL8 VM III) I am using the binaries for both buildkitd and buildctl
Environment:
$ cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.4 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.4 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.4:GA"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/8/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.4"
Buildkit version:
$ ~/buildkit/bin/buildkitd -v
buildkitd github.com/moby/buildkit v0.9.3 8d2625494a6a3d413e3d875a2ff7dd9b1ed1b1a9
$ ~/buildkit/bin/buildctl -v
buildctl github.com/moby/buildkit v0.9.3 8d2625494a6a3d413e3d875a2ff7dd9b1ed1b1a9
Dockerfile:
FROM alpine
RUN echo "Hi"
Buildctl command and output:
$ ~/buildkit/bin/buildctl --debug build \
> --frontend dockerfile.v0 --local context=. \
> --local dockerfile=. --export-cache type=inline \
> --output type=oci,name=myImage | podman load
DEBU[2022-03-04T09:55:05-05:00] serving grpc connection spanID=1e62addde3b99309 traceID=ebe36d2dc5a83915bf6611c2c02d96f1
[+] Building 1.5s (4/5)
[+] Building 1.6s (5/5) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 121B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 1.4s
=> CACHED [1/2] FROM docker.io/library/alpine@sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300 0.0s
=> => resolve docker.io/library/alpine@sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300 0.0s
=> ERROR [2/2] RUN echo "Hi" 0.1s
------
> [2/2] RUN echo "Hi":
------
Dockerfile:2
--------------------
1 | FROM alpine
2 | >>> RUN echo "Hi"
--------------------
error: failed to solve: process "/bin/sh -c echo \"Hi\"" did not complete successfully: exit code: 139
13538 v0.9.3 ./buildkit/bin/buildkitd
github.com/moby/buildkit/executor/runcexecutor.exitError
/src/executor/runcexecutor/executor.go:358
github.com/moby/buildkit/executor/runcexecutor.(*runcExecutor).Run
/src/executor/runcexecutor/executor.go:338
github.com/moby/buildkit/solver/llbsolver/ops.(*execOp).Exec
/src/solver/llbsolver/ops/exec.go:337
github.com/moby/buildkit/solver.(*sharedOp).Exec.func2
/src/solver/jobs.go:805
github.com/moby/buildkit/util/flightcontrol.(*call).run
/src/util/flightcontrol/flightcontrol.go:121
sync.(*Once).doSlow
/usr/local/go/src/sync/once.go:68
sync.(*Once).Do
/usr/local/go/src/sync/once.go:59
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
13538 v0.9.3 ./buildkit/bin/buildkitd
github.com/moby/buildkit/solver/llbsolver/ops.(*execOp).Exec
/src/solver/llbsolver/ops/exec.go:357
github.com/moby/buildkit/solver.(*sharedOp).Exec.func2
/src/solver/jobs.go:805
github.com/moby/buildkit/util/flightcontrol.(*call).run
/src/util/flightcontrol/flightcontrol.go:121
sync.(*Once).doSlow
/usr/local/go/src/sync/once.go:68
sync.(*Once).Do
/usr/local/go/src/sync/once.go:59
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
13538 v0.9.3 ./buildkit/bin/buildkitd
github.com/moby/buildkit/solver.(*edge).execOp
/src/solver/edge.go:901
github.com/moby/buildkit/solver/internal/pipe.NewWithFunction.func2
/src/solver/internal/pipe/pipe.go:82
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
13957 v0.9.3 /home/aryan/buildkit/bin/buildctl --debug build --frontend dockerfile.v0 --local context=. --local dockerfile=. --export-cache type=inline --output type=oci,name=myImage
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryClient.func1.1.1
/src/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:72
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.UnaryClientInterceptor.func1
/src/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go:101
github.com/moby/buildkit/client.filterInterceptor.func1
/src/client/client.go:264
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryClient.func1.1.1
/src/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:72
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryClient.func1
/src/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:81
google.golang.org/grpc.(*ClientConn).Invoke
/src/vendor/google.golang.org/grpc/call.go:35
github.com/moby/buildkit/api/services/control.(*controlClient).Solve
/src/api/services/control/control.pb.go:1321
github.com/moby/buildkit/client.(*Client).solve.func2
/src/client/solve.go:201
golang.org/x/sync/errgroup.(*Group).Go.func1
/src/vendor/golang.org/x/sync/errgroup/errgroup.go:57
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
13957 v0.9.3 /home/aryan/buildkit/bin/buildctl --debug build --frontend dockerfile.v0 --local context=. --local dockerfile=. --export-cache type=inline --output type=oci,name=myImage
github.com/moby/buildkit/client.(*Client).solve.func2
/src/client/solve.go:214
golang.org/x/sync/errgroup.(*Group).Go.func1
/src/vendor/golang.org/x/sync/errgroup/errgroup.go:57
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
Error: payload does not match any of the supported image formats (oci, oci-archive, dir, docker-archive)
Buildkitd command and output:
$ sudo ~/buildkit/bin/buildkitd
INFO[2022-03-04T09:46:50-05:00] auto snapshotter: using overlayfs
WARN[2022-03-04T09:46:50-05:00] using host network as the default
INFO[2022-03-04T09:46:50-05:00] found worker "40fkg1yaqbsvla9wvtiqtplhm", labels=map[org.mobyproject.buildkit.worker.executor:oci org.mobyproject.buildkit.worker.hostname:fr-r740-vm-1189 org.mobyproject.buildkit.worker.snapshotter:overlayfs], platforms=[linux/amd64 linux/386]
WARN[2022-03-04T09:46:50-05:00] skipping containerd worker, as "/run/containerd/containerd.sock" does not exist
INFO[2022-03-04T09:46:50-05:00] found 1 workers, default="40fkg1yaqbsvla9wvtiqtplhm"
WARN[2022-03-04T09:46:50-05:00] currently, only the default worker can be used.
INFO[2022-03-04T09:46:50-05:00] running server on /run/buildkit/buildkitd.sock
ERRO[2022-03-04T09:46:58-05:00] /moby.buildkit.v1.Control/Solve returned error: rpc error: code = Unknown desc = process "/bin/sh -c echo \"Hi\"" did not complete successfully: exit code: 139
i have the same error , did u fixed ?
Me too. -----VM's Info------------- NAME="openEuler" VERSION="22.03 LTS" ID="openEuler" VERSION_ID="22.03" PRETTY_NAME="openEuler 22.03 LTS" ANSI_COLOR="0;31"
------buildctl -v-------------- buildctl github.com/moby/buildkit v0.10.5 bc26045116045516ff2427201abd299043eaf8f7