Skip to content

Binary releases of fd crash on Asahi Linux because of jemalloc using 8kb page sizes #1085

Closed
@Techcable

Description

Binary releases crash because they don't support 16kb-aligned pages.

I get the following error with the latest binary releases (both from github releases, and the Arch Linux ARM repos):

<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 5 bytes failed
[1]    28699 IOT instruction (core dumped)  ./fd-v8.4.0-aarch64-unknown-linux-gnu/fd

Building from source fixes the issue (apparently jemalloc has internal logic to detect page size?)

M1 Macs use 16KB pages by default at a hardware level, so this is a common problem with Ashai Linux.

There are two simple fixes that occur to me:

  1. disabling jemalloc for AArch64 Linux
  2. Compiling jemalloc to use 64K pages (which will work anywhere). This is what the ALARM Rust package does.

The second one will probably have to be filled in the upstream jemallactor project (in fact that could be a more appropriate to file this issue....)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions