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

s390x statically linked binaries terminate with segmentation fault #306473

Open
saschagrunert opened this issue Apr 24, 2024 · 1 comment
Open
Labels
0.kind: bug Something is broken 6.topic: exotic Exotic hardware or software platform

Comments

@saschagrunert
Copy link
Member

Describe the bug

Statically linked binaries using glibc.static exit with terminated by signal SIGSEGV (Address boundary error).

Steps To Reproduce

Steps to reproduce the behavior using the demo project in https://github.com/saschagrunert/s390x-nix:

git clone https://github.com/saschagrunert/s390x-nix
cd s390x-nix 
#
qemu-s390x result/bin/demo
# Segmentation fault (core dumped)

When removing the CFLAGS ?= -static in the Makefile, then it runs successfully:

nix-build nix
#
qemu-s390x result/bin/demo
echo $?
# 0

It also works when using s390x-unknown-linux-musl.

Expected behavior

That the statically linked binaries don't segfault.

Screenshots

None

Additional context

None

Notify maintainers

@Ma27 @ConnorBaker @edolstra

Add a 👍 reaction to issues you find important.

@saschagrunert saschagrunert added the 0.kind: bug Something is broken label Apr 24, 2024
saschagrunert added a commit to saschagrunert/cri-o that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473
is resolved.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/cri-o that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473
is resolved.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/crun that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473
is resolved.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/conmon that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473 is resolved.

Refers to cri-o/cri-o#7911

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/conmon-rs that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473 is resolved.

Refers to cri-o/cri-o#7911

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/crun that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473
is resolved.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/crun that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473
is resolved.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/crun that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473
is resolved.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@Ma27
Copy link
Member

Ma27 commented Apr 24, 2024

Can you perhaps compile everything with debug symbols and get a backtrace? May help to identify the cause.

That being said, I'm pretty sure that s390 isn't a supported architecture here. Would you mind trying to reproduce the issue with a different glibc package? A quick google search shows that there seem to be Fedora RPMs: https://rpmfind.net/linux/rpm2html/search.php?query=glibc(s390-64)
Because I'd prefer in this case to have it checked that we don't have an upstream bug, but something related to our packaging.

saschagrunert added a commit to saschagrunert/conmon-rs that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473 is resolved.

Refers to cri-o/cri-o#7911

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/crun that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473
is resolved.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/conmon-rs that referenced this issue Apr 24, 2024
Building using musl until NixOS/nixpkgs#306473 is resolved.

Refers to cri-o/cri-o#7911

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert added a commit to saschagrunert/conmon that referenced this issue Apr 25, 2024
Building using musl until NixOS/nixpkgs#306473 is resolved.

Refers to cri-o/cri-o#7911

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
haircommander pushed a commit to containers/conmon that referenced this issue Apr 26, 2024
Building using musl until NixOS/nixpkgs#306473 is resolved.

Refers to cri-o/cri-o#7911

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@Atemu Atemu added the 6.topic: exotic Exotic hardware or software platform label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: exotic Exotic hardware or software platform
Projects
None yet
Development

No branches or pull requests

3 participants