compose: Raspberry crashes on docker-compose up

Description of the issue

I am running Manjaro ARM on my raspberry PI 3B. I tried to start the homeassistant/raspberry3-homassistant image from docker-compose

It did not work, and the PI froze (needed a hard reset to work again)

Context information (for bug reports)

The issue was, that i tried to start a arm32 image on my arm64 pi, and Manjaro lacks the support for arm32

Running the image with docker gave this error: standard_init_linux.go:211: exec user process caused "exec format error" (which is totally user-unfriendly btw)

docker-compose straight up crashed the whole system instead

Output of docker-compose version

docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.8.0
OpenSSL version: OpenSSL 1.1.1d  10 Sep 2019

Output of docker version

Client:
 Version:           19.03.5-ce
 API version:       1.40
 Go version:        go1.13.4
 Git commit:        633a0ea838
 Built:             Sat Nov 16 00:08:25 2019
 OS/Arch:           linux/arm64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.5-ce
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.4
  Git commit:       633a0ea838
  Built:            Sat Nov 16 00:07:54 2019
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.3.0.m
  GitCommit:        d50db0a42053864a270f648048f9a8b4f24eced3.m
 runc:
  Version:          1.0.0-rc9
  GitCommit:        d736ef14f0288d6993a1845745d6756cfc9ddd5a
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker-compose config

services:
  homeassistant:
    container_name: home-assistant
    environment:
      TZ: Europe/Berlin
    image: homeassistant/raspberrypi3-homeassistant:stable
    ports:
    - published: 8123
      target: 8123
    restart: always
    volumes:
    - /home/whale/hassio/config:/config:rw
version: '3.7'

Steps to reproduce the issue

  1. Raspberry PI with Manjaro ARM (Maybe other distros work as well)
  2. docker run --name="home-assistant" -e "TZ=Europe/Berlin" -v $PWD/config:/config -p 8123:8123 homeassistant/raspberrypi3-homeassistant:latest and docker-compose up with the given config
  3. observe the difference 😉

Observed result

docker-compose crashes the system, while docker gives an error

Expected result

docker-compose gives an error

Stacktrace / full error message

for docker:

standard_init_linux.go:211: exec user process caused "exec format error"

docker-compose: no error, since Pi crashes

Additional information

OS version / distribution, docker-compose install method, etc. Linux raspi 5.3.12-1-MANJARO-ARM #1 SMP Wed Nov 20 16:23:31 UTC 2019 aarch64 GNU/Linux

docker-compose installed through yay -S docker-compose

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 17

Most upvoted comments

Prior to my previous comment about this appearing to be an issue related to the wlan0 network interface disappearing when docker-compose up is called, it would appear that this is related to DHCP and the veth* interfaces.

This thread on the RPi forums provided a fix: https://www.raspberrypi.org/forums/viewtopic.php?t=282425#p1712939

Add this to /etc/dhcpcd.conf and then reboot:

denyinterfaces veth*

So far, with this applied, I have not been able to reproduce the issue at all - I can start and stop docker-compose as many times as I want now without any issues. I tested perhaps 20 or 30 times toggling up and down without any issue.

I tried that, but the shell never came back

I was connected via SSH to my Pi, and after docker-compose up (-d) the shell never came back and the SSH session timed out A reconnect was only possible after i un- and replugged the powercable from the Pi. Meanwhile my router didn’t show my Pi as connected to the network

This happened to on an AWS instance with 50 GB disk and 2 GB ram

Note: at time writting, ARM is not an officially suported plaform for docker-compose (even we are aware many users do rely on it).

The issue you describe is pretty weird, as docker-compose do fully rely on the docker engine to run containers by it’s HTTP API, and as such could fail with ugly errors, but I harldy understand how a python process can crash the system this way. Can you please try to run the same docker-compose file with -d (dettached) parameter ? Doing so compose will ask engine to run container in a “fire an forget” style, which might limit interactions with the engine and help understand what’s causing this issue