Configure jemalloc for 64K pages on arm64#59
Merged
Conversation
Pass JEMALLOC_CONFIGURE_OPTS="--with-lg-page=16" to the Redis build on arm64 so the produced jemalloc supports up to 64 KiB pages. Without this, the RPM built on a 4K-page runner aborts on aarch64 hosts that use 64K pages (e.g. Rocky Linux 8 aarch64) with "<jemalloc>: Unsupported system page size". Refs redis/redis#15185 See side note in redis/redis#11407
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
Contributor
Author
Test plan results
Item 2 — live verification on a real 64K-page aarch64 hostHost: AWS EC2 No For reference, before this PR the same RPM on the same host produces: (per the original issue reporter; we did not re-run the pre-fix case to save EC2 time, since the failure mode is what the bug report itself describes). The EC2 instance was terminated after the test. |
Peter-Sh
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
JEMALLOC_CONFIGURE_OPTS="--with-lg-page=16"beforemake allso the bundled jemalloc supports up to 64 KiB pages.Why
The arm64 build runners (
ubuntu24-arm64-2-8) use 4K pages, so jemalloc gets configured with a 4 KiB max page size. The resulting RPM then aborts at startup on aarch64 hosts that use 64K pages (default on Rocky Linux 8 aarch64, common on other distros too) with:This is exactly what was reported in redis/redis#15185. The recommended packaging-side fix (see the side note in redis/redis#11407) is to pass
--with-lg-page=16(= 2^16 = 64 KiB) to jemalloc'sconfigure. Per the discussion in jemalloc/jemalloc#467 and redis/redis#11170, this is safe on recent jemalloc versions without serious VM-fragmentation side effects.Test plan
redis-serverstarts on a 64K-page aarch64 host (e.g. Rocky Linux 8 aarch64)See the verification comment below for evidence.
🤖 Generated with Claude Code
Note
Medium Risk
Changes the arm64 build environment for Redis by altering jemalloc configuration, which could affect runtime behavior/memory characteristics and the resulting packaged binaries. Scope is limited to the GitHub Actions packaging workflow and is gated to
arm64builds.Overview
Adjusts the RPM build action to set
JEMALLOC_CONFIGURE_OPTS=--with-lg-page=16wheninputs.platformisarm64, ensuring the bundled jemalloc supports 64KiB page-size aarch64 hosts.amd64 builds and the rest of the packaging flow are unchanged; this only modifies how Redis is compiled in the
Build Redis with modulesstep.Reviewed by Cursor Bugbot for commit 314625c. Bugbot is set up for automated code reviews on this repo. Configure here.