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

Segfault when building in docker-container builder, but not docker builder, on aarch64 (native) #2837

Open
3 tasks done
thespad opened this issue Dec 3, 2024 · 0 comments

Comments

@thespad
Copy link

thespad commented Dec 3, 2024

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

This is a difficult issue to break down because I haven't been able to isolate the specific combination of elements that are triggering the crash.

We have an image that we are building for arrach64 on native aarch64 hardware - https://github.com/linuxserver/docker-mastodon/blob/main/Dockerfile.aarch64

Building with the default (docker) builder is fine, building with a docker-container builder causes a segfault within Ruby during asset precompilation.

The same issue does not occur buliding for amd64 on native amd64 hardware with either buildx driver.

I appreciate there's a good chance you're going to throw this back at Ruby/the upstream Gem project but nonetheless I'm out of ideas of how to further troubleshoot this and it only seems to be happening with the docker-container driver and I've not been able to find any similar issues reported anywhere that aren't qemu-related.

Expected behaviour

No segfault

Actual behaviour

Segfault

Buildx version

github.com/docker/buildx v0.17.1 257815a

Docker info

Client: Docker Engine - Community
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.17.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.7
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 10
  Running: 10
  Paused: 0
  Stopped: 0
 Images: 13
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 57f17b0a6295a39009d861b89e3b3b87b005ca27
 runc version: v1.1.14-0-g2c9f560
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.8.0-1013-oracle
 Operating System: Ubuntu 24.04.1 LTS
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 23.42GiB
 Name: arm-unit-01
 ID: NGGZ:6CGK:4TBF:PJLR:3IOG:QKYA:J2LX:XHR3:X6YZ:M376:V3QX:TBAP
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: true
 Default Address Pools:
   Base: 172.20.0.0/16, Size: 24

Builders list

NAME/NODE        DRIVER/ENDPOINT                   STATUS    BUILDKIT   PLATFORMS
container        docker-container
 \_ container0    \_ unix:///var/run/docker.sock   running   v0.17.2    linux/arm64, linux/arm/v7, linux/arm/v6
default*         docker
 \_ default       \_ default                       running   v0.16.0    linux/arm64, linux/arm/v7, linux/arm/v6

Configuration

buildx instance created with: docker buildx create --driver docker-container --name container --bootstrap

Build invoked with docker buildx build -t mastodon -f Dockerfile.aarch64 --builder container .

Dockerfile: https://github.com/linuxserver/docker-mastodon/blob/main/Dockerfile.aarch64

Specific command causing the segfault: https://github.com/linuxserver/docker-mastodon/blob/main/Dockerfile.aarch64#L67

Build logs:
log-preamble.txt
segfault.txt

Build logs


Additional info

Have also tried using the same buildkit version (moby/buildkit:v0.16.0) as the docker driver for the container driver but the same issue is present.

Have tried to rebuild google-protobuf with force_ruby_platform to recompile it at build time without native extensions but 3.25.5 has a bug that causes it to fail and I can't really start breaking dependency chains in the application to try and use a newer version.

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

No branches or pull requests

1 participant