-
-
Notifications
You must be signed in to change notification settings - Fork 932
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
Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory #8072
Comments
Should be fixed by #8060 |
🚢 9.1.1 |
@zkochan this issue still persists even after using pnpm version 9.1.1 |
How can I reproduce this? Is the project open source? |
@zkochan it is not opensource, im using nx monorepo with node version |
FWIW I am unfortunately not able to provide the source for my example either, but I have been doing a bit of debugging on my end. On my machine, the process doesn't get to the point of running out of memory, but does peg the CPU. In my case, inside I verified this by installing v1.2.1 of graph-cycles separately and passing it the same payload. Not sure if there's a way to reduce the size of the graph passed to graph-cycles, or if there's a way to improve the performance of graph-cycles. Our environment is a large monorepo with ~200 interconnected packages, with a lot of them referencing the others as peer dependencies (version specifier "<1.0.0" for all of the interrelated peers). The installation inside the main monorepo succeeds without any slowness, but running an installation inside another much smaller monorepo that depends on a lot of the packages from the larger monorepo is the one that stalls. The packages from the main monorepo are being downloaded from a registry instead of any local workspace linking. So I would imagine this might be reproducible by creating a smaller monorepo (5 packages) that depend on other packages with a lot of peer dependencies to drive the size of that graph up. |
Chiming in to say we're experiencing this using github actions on a turborepo monorepo building a sveltekit app on pnpm 9.1.1. ✓ 1789 modules transformed. |
Just a follow up to this as I continue to debug. Here is my github actions file. I tried not building through turbo and going directly to build within the app directory. jobs:
Still resulted in: |
I have reduced memory consumption in this PR: #8084 I don't know if it will be enough for you all. Maybe you could try to build pnpm from that branch and see if it helps. |
Try 9.1.2 |
@zkochan i'm still facing this issue, happens on bitbucket pipeline
|
I believe this should do it: #8106 |
Did one more memory optimization: #8109 I believe most of the issues will be solved in the next release. |
Try 9.1.3 |
@zkochan still same :( |
Verify latest release
pnpm version
9.1.0
Which area(s) of pnpm are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
Reproduction steps
i'm using NX workspace and using pnpm to install dependencies
Build fails on pipeline
just FYI --max-size=3017 is not working, tried everything but couldn't make it work
However on local machine it works fine but on bitbucket pipeline it breaks
"build:manager": "nx run manager-dashboard:build --prod --skip-nx-cache --configuration=prod",
Here is the step
name: Trigger pnpm build test
size: 2x
image: node:18.16.0
script:
- corepack enable
- corepack prepare pnpm@latest-9 --activate
- pnpm install
- pnpm build:manager
caches:
- pnpm
Describe the Bug
<--- Last few GCs --->
[328:0x6242d20] 12010 ms: Mark-sweep (reduce) 529.7 (541.8) -> 528.7 (540.8) MB, 301.9 / 0.0 ms (average mu = 0.108, current mu = 0.025) allocation failure; scavenge might not succeed
[328:0x6242d20] 12017 ms: Scavenge (reduce) 530.2 (541.0) -> 529.6 (541.0) MB, 1.4 / 0.0 ms (average mu = 0.108, current mu = 0.025) allocation failure;
[328:0x6242d20] 12024 ms: Scavenge (reduce) 530.2 (541.0) -> 529.9 (541.5) MB, 4.3 / 0.0 ms (average mu = 0.108, current mu = 0.025) allocation failure;
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xb7a940 node::Abort() [/usr/local/bin/node]
2: 0xa8e823 [/usr/local/bin/node]
3: 0xd5c940 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
4: 0xd5cce7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
5: 0xf3a3e5 [/usr/local/bin/node]
6: 0xf3b2e8 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/usr/local/bin/node]
7: 0xf4b7f3 [/usr/local/bin/node]
8: 0xf4c668 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
9: 0xf26fce v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
10: 0xf28397 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
11: 0xf0956a v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/local/bin/node]
12: 0x12ce7af v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]
13: 0x16fb6b9 [/usr/local/bin/node]
Expected Behavior
dont know what am i missing here
Which Node.js version are you using?
18.16.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
The text was updated successfully, but these errors were encountered: