Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Project - jemalloc: Unsupported system page size #39311

Closed
1 task done
Jao8 opened this issue Aug 4, 2022 · 4 comments · Fixed by #41229
Closed
1 task done

New Project - jemalloc: Unsupported system page size #39311

Jao8 opened this issue Aug 4, 2022 · 4 comments · Fixed by #41229
Labels
bug Issue was opened via the bug report template. Upstream Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).

Comments

@Jao8
Copy link

Jao8 commented Aug 4, 2022

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

npx --no-install next info

Operating System:
Platform: linux
Arch: arm64
Version: #2 SMP Mon Jun 13 21:08:46 PDT 2022
Binaries:
Node: 18.7.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 12.2.4-canary.11
eslint-config-next: 12.2.3
react: 18.2.0
react-dom: 18.2.0

Other infos:
Image: Oracle-Linux-8.6-aarch64-2022.06.30-0 (CentOS based distro)
uname -a:
Linux virtualmachine 5.4.17-2136.308.9.el8uek.aarch64 #2 SMP Mon Jun 13 21:08:46 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux

What browser are you using? (if relevant)

Not relevant

How are you deploying your application? (if relevant)

yarn dev

Describe the Bug

When I run the project(freshly created) it does not start, instead the following output is given:

yarn run v1.22.19
$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - SWC minify release candidate enabled. https://nextjs.link/swcmin
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 10 bytes failed
error Command failed with signal "SIGABRT".

Complementary info:

$ getconf PAGESIZE 
65536(64k)

I've found this issue thats seems to be the same problem in a docker project(not related to next.js), not sure if can be of any help.

Expected Behavior

The project start with the default next.js page

Link to reproduction

https://github.com/Jao8/projects-hub

To Reproduce

yarn create next-app --typescript <project-name>;
yarn dev;
@Jao8 Jao8 added the bug Issue was opened via the bug report template. label Aug 4, 2022
@kwonoj
Copy link
Contributor

kwonoj commented Aug 4, 2022

The link you referred seems to be the correct root cause for the issue. Solving problem seems not easy though. There is way to configure specific page size at compile time, but jemalloc seems not support it for runtime and our build target is not per-distro but more of platform (linux) + arch, which means we don't have fine grained targets for specific linux distro like oracle.

I presume this is SWC's upstream issue. /cc @kdy1 to double confirm just in case.

@kdy1
Copy link
Member

kdy1 commented Aug 4, 2022

I also think it's an upstream issue

@balazsorban44 balazsorban44 added Upstream Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.). area: SWC Minify labels Aug 4, 2022
@balazsorban44
Copy link
Member

I'm closing this as this is currently unactionable in Next.js. I would suggest to reopen this in SWC or even in the upstream dependency. 🙏

@balazsorban44 balazsorban44 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2022
@kodiakhq kodiakhq bot closed this as completed in #41229 Oct 12, 2022
kodiakhq bot pushed a commit that referenced this issue Oct 12, 2022
Fixes #39311

Backport of upstream patch swc-project/swc#6075

More details are described in swc-project/swc#5967

I confirm that the swc plugin, when compiled with this patch, works on my Linux aarch64 machine.

This will work on all aarch64 Linux systems, the patch is configuring jemalloc to use largest possible page size, instead of taking the value from the machine where you are compiling it. 

And here's the compiled binary, if you want to give it a go!

[next-swc.linux-arm64-gnu.node.zip](https://github.com/vercel/next.js/files/9728262/next-swc.linux-arm64-gnu.node.zip)


Let me know if that makes sense! 🙂
Kikobeats pushed a commit to Kikobeats/next.js that referenced this issue Oct 24, 2022
Fixes vercel#39311

Backport of upstream patch swc-project/swc#6075

More details are described in swc-project/swc#5967

I confirm that the swc plugin, when compiled with this patch, works on my Linux aarch64 machine.

This will work on all aarch64 Linux systems, the patch is configuring jemalloc to use largest possible page size, instead of taking the value from the machine where you are compiling it. 

And here's the compiled binary, if you want to give it a go!

[next-swc.linux-arm64-gnu.node.zip](https://github.com/vercel/next.js/files/9728262/next-swc.linux-arm64-gnu.node.zip)


Let me know if that makes sense! 🙂
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. Upstream Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants