--- Comment From andreas.kreb...@de.ibm.com 2021-04-01 06:47 EDT---
I've debugged the problem using a go binary + libs from an IBM Z fedora and run
it on a 20.10 x86 system.
Here is the original bug report I got. There the experimental cross
platform feature of Docker has been used. That's easy to do but leaves
you in a pretty much debug-hostile environment.
Clean Ubuntu20.10, x86_64 hardware.
# apt-get update
# apt-get install docker.io qemu-user-static -y
# qemu-s390x-static --version
qemu-s390x version 5.0.0 (Debian 1:5.0-5ubuntu9.6)
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
Then just mimic image build steps, the steps are used from
https://github.com/containers/buildah/blob/master/contrib/buildahimage/upstream/Dockerfile#L20
Enable experimental feature for docker.
# vi /etc/docker/daemon.json
add
{
"experimental": true
}
# systemctl restart docker
Run the container:
# docker run -ti --platform linux/s390x
registry.fedoraproject.org/fedora:latest bash
And inside the container:
# uname -a
Linux 97f388a80d88 5.8.0-45-generic #51-Ubuntu SMP Fri Feb 19 13:24:51 UTC 2021
s390x s390x s390x GNU/Linux
# export GOPATH=/root/buildah
# useradd build; yum -y update; yum -y reinstall shadow-utils; yum -y install
--enablerepo=updates-testing \
make \
golang \
bats \
btrfs-progs-devel \
device-mapper-devel \
glib2-devel \
gpgme-devel \
libassuan-devel \
libseccomp-devel \
git \
bzip2 \
xz \
go-md2man \
runc \
fuse-overlayfs \
fuse3 \
containers-common; \
mkdir /root/buildah; \
git clone https://github.com/containers/buildah
/root/buildah/src/github.com/containers/buildah; \
cd /root/buildah/src/github.com/containers/buildah
# make
The result is:
/bin/sh: line 1: 956 Segmentation fault (core dumped) go help mod >
/dev/null 2>&1
go build -ldflags '-X main.GitCommit=915de2e2 -X main.buildInfo=1616142176 -X
main.cniVersion=v0.8.1 ' -gcflags "" -o bin/buildah -tags "seccomp"
./cmd/buildah
make: *** [Makefile:66: bin/buildah] Illegal instruction (core dumped)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1922010
Title:
[Ubuntu 21.04] IBM Z go binary crashes under Qemu
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1922010/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs