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

Fix unsupported system page size when using Linux aarch64 (ARM64) musl binary #443

Merged
merged 1 commit into from
May 13, 2024

Conversation

joseluisq
Copy link
Collaborator

@joseluisq joseluisq commented May 13, 2024

Description

This PR fixes an issue when using the aarch64-unknown-linux-musl binary (Jemalloc) in Debian Linux systems with page sizes bigger than 4K like Linux aarch64 (E.g. Raspberry Pi 5 uses 16K pages).

Jemalloc by default builds with the host page size so we set it up to use the maximum supported page size of 64KB on aarch64 when building SWS. jemalloc will handle systems with smaller page sizes too. See jemalloc/jemalloc#769

Until Jemalloc can have a better default someday. jemalloc/jemalloc#467 (comment)

Error:

<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 5 bytes failed

Related Issue

Fixes #440

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

It fixes an issue when using the `aarch64-unknown-linux-musl` binary
in systems with 16KB page size like Linux aarch64 (Raspberry Pi 5) by
setting up jemalloc to use a maximal supported page size of 64KB on
aarch64. See jemalloc/jemalloc#467#issuecomment-2054282344
It should be not a problem for system with smaller page sizes since
jemalloc supports that functionality. See jemalloc/jemalloc#769

error:

<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 5 bytes failed
@joseluisq joseluisq added v2 v2 release bugfix This is PR fixes a bug target Related to an specific target(s) linux Linux platform specific labels May 13, 2024
Copy link

Review changes with SemanticDiff.

@joseluisq joseluisq changed the title Fix unsupported system page size when using Linux aarch64 (ARM64) binary Fix unsupported system page size when using Linux aarch64 (ARM64) musl binary May 13, 2024
@joseluisq joseluisq merged commit 195f706 into master May 13, 2024
4 of 6 checks passed
@joseluisq joseluisq deleted the unsupported-system-page-size-arm64 branch May 13, 2024 20:18
@joseluisq joseluisq added this to the v2.31.0 milestone May 13, 2024
@joseluisq joseluisq added the docker Related to Docker environment or images label May 19, 2024
joseluisq added a commit that referenced this pull request May 20, 2024
This completes the previous work on
#443 by
correctly setting the default 64KB system page size for jemalloc at
the build config level (cross) which should be applied for develoment
and production `aarch64-unknown-linux-musl` builds.
joseluisq added a commit that referenced this pull request May 20, 2024
This completes the previous work on
#443 by
correctly setting the default 64KB page size for jemalloc at
the build config level (cross) which should be applied for development
and production `aarch64-unknown-linux-musl` builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This is PR fixes a bug docker Related to Docker environment or images linux Linux platform specific target Related to an specific target(s) v2 v2 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SWS fails to start on Raspberry Pi 5 with the message "Unsupported system page size"
1 participant