Run drone:linux-arm on raspberry pi 3 with error: exit code 132

Hi,
I would like to run drone on arm, raspberry pi 3. I got error message: exit code 132, illegal instruction.

$ docker pull drone/drone:linux-arm
Trying to pull repository docker.io/drone/drone ... 
linux-arm: Pulling from docker.io/drone/drone
6e39823df636: Already exists 
1d9a1c9a5019: Pull complete 
7a96fb5f7412: Pull complete 
Digest: sha256:d30b2ea4413c8911d5c082bd7352df6d3948deedf2c0afa38bf44c5117d580ea
Status: Downloaded newer image for docker.io/drone/drone:linux-arm

$ docker images
REPOSITORY                                      TAG                 IMAGE ID            CREATED             SIZE
docker.io/drone/drone                           linux-arm           ef0b39b9cc39        8 hours ago         59.7 MB

$ docker run --rm -it docker.io/drone/drone:linux-arm bash
 docker ps -a
CONTAINER ID        IMAGE                                                                                       COMMAND                  CREATED             STATUS                       PORTS               NAMES
fc95be2614c9        docker.io/drone/drone:linux-arm                                                             "/bin/drone-server sh"   7 seconds ago       Exited (132) 3 seconds ago                       quirky_shirley

OS environment:
$ hostnamectl
Static hostname: raspberrypi3
Icon name: computer
Machine ID: c87ce8a5ca0048c2b23f54bfd9c7b41b
Boot ID: 0b3ddbb2036542c5924454f5f8bb0762
Operating System: CentOS Linux 7 (AltArch)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 4.14.127-v7.1.el7
Architecture: arm

Docker version:
$ docker -v
Docker version 1.13.1, build 7f2769b/1.13.1

I had tried previous versions of images, the last working image was drone:1.2.3-linux-arm:
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0c69482ed886 drone/drone:1.2.3-linux-arm “/bin/drone-server…” 14 seconds ago Exited (1) 11 seconds ago amazing_pike
8cbb2e8e12e7 drone/drone:1.3.0-linux-arm “/bin/drone-server…” About a minute ago Exited (139) About a minute ago amazing_mclean
42d3c77e6112 drone/drone:1.3.1-linux-arm “/bin/drone-server…” 2 minutes ago Exited (139) 2 minutes ago condescending_knuth
44fb51977da0 drone/drone:linux-arm “/bin/drone-server…” 5 minutes ago Exited (132) 5 minutes ago goofy_snyder
18f96f76b16a drone/drone:latest “/bin/drone-server…” 6 minutes ago Exited (132) 6 minutes ago infallible_lamarr
fc95be2614c9 drone/drone:linux-arm “/bin/drone-server sh” 45 minutes ago Exited (132) 45 minutes ago quirky_shirley

Is it an issue of arm image?
Thanks,
Karoly

Isn’t Raspberry Pi 3 is a 64-bit chip? If so you should probably use the linux-arm64 image instead of the 32-bit image.

The raspberry pi 3 is a 64 bit processor, but the operating system is 32 bit centos 7. You can run 32 bit programs on 64 bit processor with 64 bit operating system, but you can’t run 64 bit program on 32 bit operating system (exec format error).
I try it out:

$ docker run -it docker.io/drone/drone:linux-arm64 bash
Unable to find image 'docker.io/drone/drone:linux-arm64' locally
Trying to pull repository docker.io/drone/drone ... 
linux-arm64: Pulling from docker.io/drone/drone
0362ad1dd800: Pull complete 
5a1dc258c6db: Pull complete 
b0ba607e1d4e: Pull complete 
Digest: sha256:5f4cf3bb3f32b571a11a815f3960302ccd53549314e46f47f90a768247c9dcd5
Status: Downloaded newer image for docker.io/drone/drone:linux-arm64
standard_init_linux.go:178: exec user process caused "exec format error"

$ docker ps -a
CONTAINER ID        IMAGE                                                                                       COMMAND                  CREATED             STATUS                      PORTS               NAMES
1a982a9dadd6        docker.io/drone/drone:linux-arm64                                                           "/bin/drone-server..."   34 minutes ago      Exited (1) 34 minutes ago                       ecstatic_mclean

So I think, it works until version 1.2.3.

Hello,

I have a rpi3b+ which I also tried to run latest linux-arm and linux-arm64 versions with the same result as szokekaroly.

OS environment

$ hostnamectl
   Static hostname: rpi3-01
         Icon name: computer
        Machine ID: f6e4f582b9a11881c230f6025ce8d1ce
           Boot ID: 3fbe4b2bf6d647248d4305ae6164391e
  Operating System: Raspbian GNU/Linux 9 (stretch)
            Kernel: Linux 4.19.66-v7+
      Architecture: arm

Docker version

$ docker --version
Docker version 19.03.1, build 74b1e89

drone/drone:linux-arm

$ docker run -it docker.io/drone/drone:linux-arm bash
Unable to find image 'drone/drone:linux-arm' locally
linux-arm: Pulling from drone/drone
6e39823df636: Already exists 
1d9a1c9a5019: Pull complete 
7a96fb5f7412: Pull complete 
Digest: sha256:d30b2ea4413c8911d5c082bd7352df6d3948deedf2c0afa38bf44c5117d580ea
Status: Downloaded newer image for drone/drone:linux-arm

$ docker ps -a
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS                        PORTS                                                                                       NAMES
fcce017805d2        drone/drone:linux-arm         "/bin/drone-server b…"   20 seconds ago      Exited (132) 16 seconds ago          

drone/drone:linux-arm64

$ docker run -it docker.io/drone/drone:linux-arm64 bash
Unable to find image 'drone/drone:linux-arm64' locally
linux-arm64: Pulling from drone/drone
0362ad1dd800: Pull complete 
5a1dc258c6db: Pull complete 
b0ba607e1d4e: Pull complete 
Digest: sha256:5f4cf3bb3f32b571a11a815f3960302ccd53549314e46f47f90a768247c9dcd5
Status: Downloaded newer image for drone/drone:linux-arm64
standard_init_linux.go:211: exec user process caused "exec format error"

I also can confirm that the latest working version was drone/drone:1.2.3

To confirm, I am running drone on h3 based boards, which are 32 bit. Even with multiarch images, even with direct linux-arm tags, the last working version is 1.2.3. Even, running 1.3.0-linux-arm tag on amd64 host with qemu throws an error, while earlier one dont. So. something is really broken since 1.3.0 for arm/v7.

/ # uname -a
Linux dt-c8b445b5d-6h9wf 4.19.71+ #9 SMP Tue Sep 10 07:47:23 CEST 2019 armv7l Linux
/ # file /bin/drone-server 
/bin/drone-server: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, Go BuildID=_fW-RykecMWEN1Kl11mV/o6IktwfNxdRTc5Q0F0zf/ygQ244SoVU6wIqZWg2mt/PfjRhkjKn6xO2sKISbgp, BuildID[sha1]=e65a4097c99923a977bc124edd1bddf8662f7fdb, not stripped
/ # /bin/drone-server 
Illegal instruction (core dumped)

I have created an issue for this problem: https://github.com/drone/drone/issues/2823