Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm32 : panic unaligned 64-bit atomic operation (master) #2321

Closed
maitredede opened this issue Aug 20, 2021 · 2 comments · Fixed by #2324
Closed

arm32 : panic unaligned 64-bit atomic operation (master) #2321

maitredede opened this issue Aug 20, 2021 · 2 comments · Fixed by #2324
Labels
Milestone

Comments

@maitredede
Copy link

Hi,

I am building multi-arch docker images using buildx, with docker daemon instances :

  • one docker:dind on kubernetes for amd64 (container as gitlab runner service)
  • one docker daemon on a raspberry pi 4 for arm/v7 (32bits raspbian)
  • one docker daemon on a raspberry pi 4 for arm64 (64 bits raspbian)

First, I tried the default image (moby/buildkit:buildx-stable-1). I had issues with my registries/mirrors. (401 errors when trying to get metadata of docker.io image from nexus registry proxy).

I switched to moby/buildkit:master (docker sha256:4bd3cb42e784e78522f83e6d4fb40d2609f755d0a5e8840d69b1b02ad1f1f502).

On the raspberry pi 32, the container panics :

time="2021-08-20T05:38:40Z" level=warning msg="using host network as the default"
time="2021-08-20T05:38:40Z" level=info msg="found worker \"56lmecaqb43ptof9e8lbw7819\", labels=map[org.mobyproject.buildkit.worker.executor:oci org.mobyproject.buildkit.worker.hostname:d49519ecf67a org.mobyproject.buildkit.worker.snapshotter:overlayfs], platforms=[linux/arm/v7 linux/arm/v6]"
time="2021-08-20T05:38:40Z" level=warning msg="skipping containerd worker, as \"/run/containerd/containerd.sock\" does not exist"
time="2021-08-20T05:38:40Z" level=info msg="found 1 workers, default=\"56lmecaqb43ptof9e8lbw7819\""
time="2021-08-20T05:38:40Z" level=warning msg="currently, only the default worker can be used."
time="2021-08-20T05:38:40Z" level=info msg="running server on /run/buildkit/buildkitd.sock"
time="2021-08-20T05:38:57Z" level=debug msg="session started" spanID=7e2528116e2136e2 traceID=8b56529c8db93bfa2066b903826f773f
panic: unaligned 64-bit atomic operation

goroutine 72 [running]:
runtime/internal/atomic.panicUnaligned()
	/usr/local/go/src/runtime/internal/atomic/unaligned.go:8 +0x24
runtime/internal/atomic.Xadd64(0x2cd86c4, 0x1)
	/usr/local/go/src/runtime/internal/atomic/atomic_arm.s:256 +0x14
github.com/moby/buildkit/control.(*Controller).Solve(0x2cd86c0, {0xf1f324, 0x31ae7c8}, 0x2cae5a0)
	/src/control/control.go:238 +0x54
github.com/moby/buildkit/api/services/control._Control_Solve_Handler.func1({0xf1f324, 0x31ae7c8}, {0xd69430, 0x2cae5a0})
	/src/api/services/control/control.pb.go:1489 +0x68
github.com/moby/buildkit/util/grpcerrors.UnaryServerInterceptor({0xf1f324, 0x31ae7c8}, {0xd69430, 0x2cae5a0}, 0x3062840, 0x3062850)
	/src/util/grpcerrors/intercept.go:14 +0x3c
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0xf1f324, 0x31ae7c8}, {0xd69430, 0x2cae5a0})
	/src/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25 +0x4c
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.UnaryServerInterceptor.func1({0xf1f2c4, 0x2eb49f0}, {0xd69430, 0x2cae5a0}, 0x3062840, 0x3062860)
	/src/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go:327 +0x50c
main.unaryInterceptor.func1({0xf1f324, 0x31ae570}, {0xd69430, 0x2cae5a0}, 0x3062840, 0x3062860)
	/src/cmd/buildkitd/main.go:571 +0x144
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0xf1f324, 0x31ae570}, {0xd69430, 0x2cae5a0})
	/src/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25 +0x4c
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1({0xf1f324, 0x31ae570}, {0xd69430, 0x2cae5a0}, 0x3062840, 0x3062850)
	/src/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34 +0xc4
github.com/moby/buildkit/api/services/control._Control_Solve_Handler({0xd32060, 0x2cd86c0}, {0xf1f324, 0x31ae570}, 0x2eb45a0, 0x2c37110)
	/src/api/services/control/control.pb.go:1491 +0x12c
google.golang.org/grpc.(*Server).processUnaryRPC(0x2cd4480, {0xf3360c, 0x2f96000}, 0x302a5a0, 0x2f924b0, 0x1614954, 0x0)
	/src/vendor/google.golang.org/grpc/server.go:1286 +0xc58
google.golang.org/grpc.(*Server).handleStream(0x2cd4480, {0xf3360c, 0x2f96000}, 0x302a5a0, 0x0)
	/src/vendor/google.golang.org/grpc/server.go:1609 +0xa80
google.golang.org/grpc.(*Server).serveStreams.func1.2(0x3042030, 0x2cd4480, {0xf3360c, 0x2f96000}, 0x302a5a0)
	/src/vendor/google.golang.org/grpc/server.go:934 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/src/vendor/google.golang.org/grpc/server.go:932 +0x1b8
@tonistiigi tonistiigi added this to the v0.9.1 milestone Aug 20, 2021
@tonistiigi
Copy link
Member

😞 why doesn't the linter detect this

@thaJeztah
Copy link
Member

😞 why doesn't the linter detect this

I think staticcheck has a check for that; is that linter enabled? https://staticcheck.io/docs/checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants