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

Add support for 32k page size (ARM?) to avoid ELF load command address/offset not page-aligned #2078

Open
DJManas opened this issue Oct 3, 2023 · 4 comments

Comments

@DJManas
Copy link

DJManas commented Oct 3, 2023

Hello,

recently QNAP container station switched to 32k page size from 4k and since then I am having problem with update (last working image, that I had tried is NextCloud 26.0.1, tried to update to 26.0.7 and since then I am having problem starting the container up (no matter if its apache, fpm, etc.). I am getting messages like:

/bin/sh: error while loading shared libraries: libc.so.6: ELF load command address/offset not page-aligned

And the container is still restarting. I had searched the internet and it seems that its related to change to 32k page size. I am not sure if i am able to change it back to 4k though (official QNAP support help is... I don't want to be rude).

Is it possible to make images compatible to 32k, maybee backwards compatible, since I want to upgrade from 26.0.1 to latest release (which is I gues to 26.0.7 and then do 27.0.0 and then to latest).

Thanks,
Regards,
Petr Sourek

@joshtrichards
Copy link
Member

https://www.qnap.com/da-dk/how-to/faq/article/why-do-the-installed-third-party-containers-not-run-successfully-on-specific-32-bit-arm-devices

This will likely need to be fixed upstream (either the official community PHP Docker image or the Debian one), but I'm honestly not sure. Someone needs to do the leg work to research this matter more, including not only a possible fix for this situation, but a path that makes sure it doesn't break things for others.

I think it's ARM specific.

@joshtrichards joshtrichards changed the title [FR] Please add support for 32k page size [FR] Please add support for 32k page size (ARM?) Oct 3, 2023
@joshtrichards joshtrichards changed the title [FR] Please add support for 32k page size (ARM?) Add support for 32k page size (ARM?) Oct 22, 2023
@joshtrichards joshtrichards changed the title Add support for 32k page size (ARM?) Add support for 32k page size (ARM?) to avoid ELF load command address/offset not page-aligned Nov 5, 2023
@joshtrichards
Copy link
Member

I was looking to see how other Official Docker Library images have dealt with this and I found:

Though from general searches (i.e. outside Docker Library images) I'm surprised this hasn't come up a bit more often with the Official ones. 🤔

@Wetzel402
Copy link

Wetzel402 commented Nov 29, 2023

Some related posts...

https://gitlab.alpinelinux.org/alpine/aports/-/issues/15167

home-assistant/core#86589

@magicse
Copy link

magicse commented Apr 6, 2024

Also i try experiment in emulation on x86 like this.
And get different strange things
Alpine Linux 3.18.0 under emulation page size 32k work but give me page size 4K

getconf PAGESIZE
4096

Alpine Linux 3.17.0 under emulation page size 32k give me "bin/sh: getconf: Bad address"
on any commands.

And backward on QNAP with pagesize 32K container
Alpine Linux 3.17.0 work without problem and Alpine Linux 3.18.0 didnt work at all.

sudo apt-get install qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
for 32K PAGE SIZE
docker run -e "QEMU_CPU=cortex-a15" -e "QEMU_PAGESIZE=32768" --rm --platform linux/arm/v7 -it alpine:3.17.0 /bin/sh
docker run -e "QEMU_CPU=cortex-a15" -e "QEMU_PAGESIZE=32768" --rm --platform linux/arm/v7 -it alpine:3.18.0 /bin/sh

for 4K PAGE SIZE
docker run -e "QEMU_CPU=cortex-a15" -e "QEMU_PAGESIZE=4096" --rm --platform linux/arm/v7 -it alpine:3.17.0 /bin/sh
docker run -e "QEMU_CPU=cortex-a15" -e "QEMU_PAGESIZE=4096" --rm --platform linux/arm/v7 -it alpine:3.18.0 /bin/sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants