Skip to content

Build jemalloc with a larger page size#4766

Open
clockwork-labs-bot wants to merge 2 commits intomasterfrom
bot/fix-aarch64-linux-jemalloc
Open

Build jemalloc with a larger page size#4766
clockwork-labs-bot wants to merge 2 commits intomasterfrom
bot/fix-aarch64-linux-jemalloc

Conversation

@clockwork-labs-bot
Copy link
Copy Markdown
Collaborator

@clockwork-labs-bot clockwork-labs-bot commented Apr 9, 2026

Summary

  • build vendored jemalloc with JEMALLOC_SYS_WITH_LG_PAGE=16
  • keep jemalloc enabled instead of falling back to the system allocator
  • preserve existing jemalloc metrics and profiling support

Context

Users on Linux/aarch64 can hit an immediate abort before any CLI work starts:

<jemalloc>: Unsupported system page size
memory allocation of 4 bytes failed
Aborted (core dumped)

The reported reproducer was spacetime login on Fedora Asahi Remix 42 on Apple Silicon, but the crash happens during allocator init, so it is not specific to login.

This switches from the earlier allocator fallback approach to the narrower fix John requested: build jemalloc with a larger configured page size.

Caveat

Cargo does not support target-specific [env] config, so the repo-level fix uses workspace cargo config and applies to any local build of vendored jemalloc from this repo, not only Linux/aarch64.

Testing

  • cargo check -p spacetimedb-cli -p spacetimedb-standalone -p spacetimedb-client-api

@clockwork-labs-bot clockwork-labs-bot changed the title Avoid jemalloc crashes on Linux aarch64 Build jemalloc with a larger page size Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant