<jemalloc>: Unsupported system page size [solved] #249

Open
opened 2022-02-26 08:56:58 +00:00 by reti4 · 3 comments
reti4 commented 2022-02-26 08:56:58 +00:00 (Migrated from gitlab.com)

This took me forever to piece together so I'm going to write it down here because I didn't see it anywhere here. Running a misconfigured precompiled binary on a certain arm64 server panics and fails due to the title of this issue. This is because the file system's page file is 64k. This causes jemalloc-sys (really jemalloc) to panic and exit because it defaults to 4k I think. This is easily fixed if you put in "JEMALLOC_SYS_WITH_LG_PAGE=16", in Cross.toml (16 because 64k = 2^16).
Maybe for a fix offer 2 different versions for arch binaries?

$ getconf PAGE_SIZE
65536
$ cat Cross.toml 
[build.env]
passthrough = [
    "RUSTC_WRAPPER",
    "AWS_ACCESS_KEY_ID",
    "AWS_SECRET_ACCESS_KEY",
    "SCCACHE_BUCKET",
    "SCCACHE_ENDPOINT",
    "SCCACHE_S3_USE_SSL",
    "JEMALLOC_SYS_WITH_LG_PAGE=16",
]
... more stuff down here

This references https://github.com/jemalloc/jemalloc/issues/467 and the rust caller https://crates.io/crates/jemalloc-sys

This took me forever to piece together so I'm going to write it down here because I didn't see it anywhere here. Running a misconfigured precompiled binary on a certain arm64 server panics and fails due to the title of this issue. This is because the file system's page file is 64k. This causes jemalloc-sys (really jemalloc) to panic and exit because it defaults to 4k I think. This is easily fixed if you put in `"JEMALLOC_SYS_WITH_LG_PAGE=16",` in `Cross.toml` (16 because 64k = 2^16). Maybe for a fix offer 2 different versions for arch binaries? ```sh $ getconf PAGE_SIZE 65536 ``` ```toml $ cat Cross.toml [build.env] passthrough = [ "RUSTC_WRAPPER", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "SCCACHE_BUCKET", "SCCACHE_ENDPOINT", "SCCACHE_S3_USE_SSL", "JEMALLOC_SYS_WITH_LG_PAGE=16", ] ... more stuff down here ``` This references https://github.com/jemalloc/jemalloc/issues/467 and the rust caller https://crates.io/crates/jemalloc-sys
reti4 commented 2022-02-26 09:01:55 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
reti4 commented 2022-03-11 07:41:20 +00:00 (Migrated from gitlab.com)

mentioned in issue #68

mentioned in issue #68
jfowl commented 2022-03-14 20:18:04 +00:00 (Migrated from gitlab.com)

I'm tempted to just remove jemalloc for aarch64 CI builds. According to the issue you linked, Debian and Fedora appear to use different page sizes.

Still, this might need to be included in building docs somewhere.

I'm tempted to just remove jemalloc for aarch64 CI builds. According to the issue you linked, Debian and Fedora appear to use different page sizes. Still, this might need to be included in building docs somewhere.
Sign in to join this conversation.
No labels
Android
CS::needs customer feedback
CS::needs follow up
CS::needs on prem installation
CS::waiting
Chrome
Design:: Ready
Design:: in progress
Design::UX
E2EE
Edge
Firefox
GDPR
Iteration 13 IM
Linux
MacOS
Need::Discussion
Need::Steps to reproduce
Need::Upstream fix
Needs:: Planning
Needs::Dev-Team
Needs::More information
Needs::Priority
Needs::Product
Needs::Refinement
Needs::Severity
Priority::1-Critical
Priority::2-Max
Priority::3-Impending
Priority::4-High
Priority::5-Medium
Priority::6-Low
Priority::7-None
Progress::Backlog
Progress::Review
Progress::Started
Progress::Testing
Progress::Triage
Progress::Waiting
Reporter::Sentry
Safari
Target::Community
Target::Customer
Target::Internal
Target::PoC
Target::Security
Team:Customer-Success
Team:Design
Team:Infrastructure
Team:Instant-Messaging
Team:Product
Team:Workflows
Type::Bug
Type::Design
Type::Documentation
Type::Feature
Type::Improvement
Type::Support
Type::Tests
Windows
blocked
blocked-by-spec
cla-signed
conduit
contribution::advanced
contribution::easy
contribution::help needed
from::review
iOS
p::ti-tenant
performance
product::triage
proposal
refactor
release-blocker
s: dart_openapi_codegen
s::Famedly-Patient
s::Org-Directory
s::Passport-Generator
s::Requeuest
s:CRM
s:Famedly-App
s:Famedly-Web
s:Fhiroxide
s:Fhiroxide-cli
s:Fhiroxide-client
s:Fhirs
s:Hedwig
s:LISA
s:Matrix-Dart-SDK
s:Role-Manager
s:Synapse
s:User-Directory
s:WFS-Matrix
s:Workflow Engine
s:dtls
s:famedly-error
s:fcm-shared-isolate
s:matrix-api-lite
s:multiple-tab-detector
s:native-imaging
severity::1
severity::2
severity::3
severity::4
technical-debt
voip
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Matthias/conduit#249
No description provided.