GoogleContainerTools / distroless

🥑 Language focused docker images, minus the operating system.
Apache License 2.0
19.15k stars 1.17k forks source link

Base debian12 crashes when binary is static linked with libgcc on ppc64le #1716

Closed zgooner closed 1 week ago

zgooner commented 1 week ago

Describe the bug When compiling "hello world" type of program with static linked libgcc on ppc64le platform program crashes with message Segmentation fault

To Reproduce Steps to reproduce the behavior: Create image with gcr.io/distroless/base-debian12 as base image and run binary with static linked libgcc.

Expected behavior Program should run but it crashes before it gets to the main function.

Console Output

/ $ ./tmp/test
Segmentation fault
loosebazooka commented 1 week ago

I have no way to test ppc64le unfortunately. A segfault isn't much to work off of. Does this work on a non distroless Debian base image for ppc64le?

zgooner commented 1 week ago

I executed program on debian:12 and it gives the same output as distroless debian(segfault).

zgooner commented 1 week ago

It is worth to mention that I compile my binary on Ubuntu 20.04 and then it gets copied to the container.

loosebazooka commented 1 week ago

Sorry but this doesn't appear like a Distroless problem, it could be a difference in the systems you are using to build and deploy (either a libgcc/glibc version or the underlying architecture).