Skip to content

stalwart-mail: fix 16 KB page size on ARM systems#426090

Merged
emilazy merged 1 commit intoNixOS:masterfrom
ungeskriptet:stalwart-16k-pagesize
Aug 3, 2025
Merged

stalwart-mail: fix 16 KB page size on ARM systems#426090
emilazy merged 1 commit intoNixOS:masterfrom
ungeskriptet:stalwart-16k-pagesize

Conversation

@ungeskriptet
Copy link
Member

@ungeskriptet ungeskriptet commented Jul 17, 2025

Fix stalwart-mail on ARMv7 and Aarch64 systems with a 16 KB page size. Previously, stalwart-mail could not start on an ARM system with a page size bigger than 4 KB. This environment variable should not break compatibility with smaller page sizes.

The official stalwart-mail CI does this as well: https://github.com/stalwartlabs/stalwart/blob/4f84533fa1a061dbcde8fad2cc100f1f92d650a6/.github/workflows/ci.yml#L125

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 12.first-time contribution This PR is the author's first one; please be gentle! labels Jul 17, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 12.first-time contribution This PR is the author's first one; please be gentle! label Jul 28, 2025
@norpol
Copy link
Contributor

norpol commented Aug 3, 2025

Can someone take a look? Would be bummer if other PRs will collide with this change, it's just aligning with the upstream packaging. @happysalada 🙏🏼

Previous attempts to resolve jmalloc issues on ARM were using the jmalloc-sys package which was introduced in nixpkgs to deal with that topic altogether:

emilazy

This comment was marked as resolved.

@emilazy emilazy dismissed their stale review August 3, 2025 15:06

Sorry, should have read the whole discussion and not just the diff…

@emilazy
Copy link
Member

emilazy commented Aug 3, 2025

We should ideally match our jemalloc package’s configuration:

# The upstream default is dependent on the builders' page size
# https://github.com/jemalloc/jemalloc/issues/467
# https://sources.debian.org/src/jemalloc/5.3.0-3/debian/rules/
++ [
(
if (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isLoongArch64) then
"--with-lg-page=16"
else
"--with-lg-page=12"
)
]

But this is an improvement, thank you.

@emilazy emilazy merged commit a8b331c into NixOS:master Aug 3, 2025
30 of 31 checks passed
@emilazy emilazy mentioned this pull request Aug 3, 2025
13 tasks
@ungeskriptet ungeskriptet deleted the stalwart-16k-pagesize branch August 27, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants