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

QNAP Oficial Last Alpine 3.18 image get exit code 139 #342

Open
magicse opened this issue Sep 26, 2023 · 1 comment
Open

QNAP Oficial Last Alpine 3.18 image get exit code 139 #342

magicse opened this issue Sep 26, 2023 · 1 comment

Comments

@magicse
Copy link

magicse commented Sep 26, 2023

Oficial Last Alpine image get exit code 139 (ala sigfault) i think due 4K - 32K Page size mismatches for some libraries or applications in the image.

Alpine image 3.17 work well.

QNAP TS-231P3 (Alpine AL314 armv7)
Container Station PageSize 32K
Page size 32K - QNAP change Page size from 4K to 32 K

Also i found information about Page Size 32K for arm32v7

On ARM based NAS it is possible to have storage volume larger than
16TB, especially with the use of LVM. However, on 32-bit architectures,
the page cache index is stored on 32 bits, which means that given a
page size of 4 KB, we can only address volumes of up to 16 TB.

Therefore, one option to use such large volumes and filesystems on 32
bits architecture is to increase the page size.

This series allows to support 8K, 16K, 32K and 64K kernel pages. On
ARM the size of the page can be either 4K or 64K, so for the other
size a "software emulation" is used, here Linux thinks it is using
pages of 8 KB, 16 KB or 32 KB, while underneath the MMU still uses 4
KB pages.

For ARM there is already a difference between the kernel page and the
hardware page in the way they are managed. In the same 4K space the
Linux kernel deals with 2 PTE tables at the beginning, while the
hardware deals with 2 other hardware PTE tables.

This series takes advantage of it and pushes further the difference
between hardware and Linux version by using larger page size at Linux
kernel level.
https://lwn.net/Articles/822868/

@magicse magicse changed the title QNAP Oficial Last Alpine image get exit code 139 QNAP Oficial Last Alpine 3.18 image get exit code 139 Sep 29, 2023
@magicse
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant