balenaEngine on Raspberry Pi Zero Segmenation Fault

Dear all,

I tried to use the latest versions of balenaEngine on a plain Yocto Warrior Image built for MACHINE = “raspberrypi0-wifi”, however, I always get a segmentation fault or similar error, no matter which version I try from the github ( https://github.com/balena-os/balena-engine/releases/tag/v18.9.7 ) arm releases. Any special magic needed here? :slight_smile:

Best regards,

Nico

Can you post some of the stack trace here? I would be mostly interested in the first few blocks of it

I will try to do so. As a short question: As the RPi Zero W has an ARMv6l processor, I would need to use the ARMv6 version of balenaEngine, correct? :slight_smile:

Hi @robertgzr,

I just found an old Raspberry Pi 1 and tested it with a Yocto / Poky (Warrior) release.
./balena-engine
just results in the Output of “Segmentation fault” without anything else (no stack trace).
Tried it with the balena-engine-v18.9.7-armv6.tar.gz
Any help I can give?

PS: I compiled it with the meta-virtualization package and installed docker-ce (18.09.3-ce) and docker works already, but balenaEngine sadly not :slight_smile:

I have the same pi zero. will have a look as well

1 Like

Just as an information, I also tried the 18.9.7-armv6.tar.gz on the latest raspbian buster release (September 2019, stock from image, no changes or updates) - and the version also gives just out the line “Segmentation fault”.

A test with the 17.12.0-armv6 on raspbian buster on the RPi 1 gives an “Illegal instruction” error.

Hi I was able to reproduce this with the latest 2 builds on the repo. We have heard of issues with the statically linked binaries our build system outputs before and I had done a pre-release of v18.09.10 that is dynamically linked for this very reason…

I will try to get another release for the latest tag out that has dynamic executables for armv5e, armv7hf, aarch64, i386 and amd64 (so all the architectures we support)

Thank you very much! Does this also include armv6l?

@robertgzr I wanted to ask what is the status of the dynamic executables of balenaEngine for Pi Zero? I could not yet find a new release on Github. Any ETA? Thank you very much! :slight_smile:

sorry for the delay here. I was working on the build system as part of the effort to pull in docker 19.03 and really wanted to try out the new one for this release.

I compile these on our Debian Stretch base-images and since they are dynamic the basic requirement would be glibc and systemd-journald libs on the target system (which means something like Alpine won’t work unfortunately)

You will find armv6 binaries there as well :slight_smile:

1 Like

Thank you very much! Yes on a basic raspbian, it is now perfectly working (after I manually added the user balena-engine, which the daemon seems to be needing and moved everything to /usr/local/bin :)).

On yocto, it aks for the libsystemd.so.0 ask you already mentioned. So I would need to figure out how to get that dependency there … mh…

Hi. You may find the balenaEngine recipe for balenaOS useful: https://github.com/balena-os/meta-balena/blob/development/meta-balena-common/recipes-containers/balena/balena_git.bb

Thanks @Ereski - I gave it a try some weeks back, but it turns out its not easy to build balenaEngine on Yocto without all the needed dependencies, which will then result in just a cloned balenaOS, so I scrapped the idea, but thank you very much :slight_smile: