-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I am running NixOS on an Apple M2 MacBook Air via nixos-apple-silicon. One of the issues that comes up sometimes is that programs sometimes assume 4K or 8K memory page size -- Apple Silicon systems use a 16K page size. This has become less common over time as projects updated for Apple Silicon compatibility, but unfortunately I ran into this issue when trying to run the nix-init command-line tool:
$ nix-unit --flake .#tests
warning: unknown setting 'allowed-users'
warning: unknown setting 'trusted-users'
warning: `--gc-roots-dir' not specified
warning: Git tree '/etc/nixos' is dirty
❌ lib.modules.testCollectTypedModules
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 128 bytes failed
☢️ lib.modules.testCollectTypedModules
error: program 'difft' failed due to signal 6 (Aborted)
❌ systems.aarch64-linux.system-agnostic.lib.modules.testCollectTypedModules
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 128 bytes failed
☢️ systems.aarch64-linux.system-agnostic.lib.modules.testCollectTypedModules
error: program 'difft' failed due to signal 6 (Aborted)
❌ systems.x86_64-linux.system-agnostic.lib.modules.testCollectTypedModules
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 128 bytes failed
☢️ systems.x86_64-linux.system-agnostic.lib.modules.testCollectTypedModules
error: program 'difft' failed due to signal 6 (Aborted)
😢 0/3 successful
error: Tests failedFortunately, this is probably an easy fix. I recall running into the issue early on with fd, and the solution was simply setting the environment variable export JEMALLOC_SYS_WITH_LG_PAGE=16 during builds. See sharkdp/fd#1085
Metadata
Metadata
Assignees
Labels
No labels