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

Memory Leak #186

Closed
leo-paz opened this issue Dec 23, 2021 · 5 comments
Closed

Memory Leak #186

leo-paz opened this issue Dec 23, 2021 · 5 comments

Comments

@leo-paz
Copy link

leo-paz commented Dec 23, 2021

Hi FireCMS,

Really love what you guys have built but when running the quickstart guide I'm getting this error:
`yarn run build
yarn run v1.22.17
$ react-scripts build
Creating an optimized production build...

<--- Last few GCs --->

[40370:0x140008000] 91111 ms: Mark-sweep 8039.6 (8228.3) -> 8023.5 (8228.0) MB, 9728.1 / 0.0 ms (average mu = 0.106, current mu = 0.002) allocation failure scavenge might not succeed
[40370:0x140008000] 100863 ms: Mark-sweep 8044.0 (8232.8) -> 8027.8 (8232.2) MB, 9733.9 / 0.0 ms (average mu = 0.055, current mu = 0.002) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x100fd046c node::Abort() [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
2: 0x100fd05f4 node::errors::TryCatchScope::~TryCatchScope() [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
3: 0x10111e7b4 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
4: 0x10111e748 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
5: 0x1012a1c08 v8::internal::Heap::GarbageCollectionReasonToString(v8::internal::GarbageCollectionReason) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
6: 0x1012a5210 v8::internal::Heap::CollectSharedGarbage(v8::internal::GarbageCollectionReason) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
7: 0x1012a23d0 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
8: 0x10129fcf8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
9: 0x1012aba04 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
10: 0x1012aba98 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
11: 0x10127e950 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
12: 0x1015b3d10 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
13: 0x1018c82ec Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
14: 0x106496824
15: 0x106497584
16: 0x1018db068 Builtins_ArrayForEach [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
17: 0x10185bf78 Builtins_InterpreterEntryTrampoline [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
18: 0x10185bf78 Builtins_InterpreterEntryTrampoline [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
19: 0x10185bf78 Builtins_InterpreterEntryTrampoline [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
20: 0x106175d04
21: 0x10185bf78 Builtins_InterpreterEntryTrampoline [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
22: 0x10188d74c Builtins_GeneratorPrototypeNext [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
23: 0x105e487cc
24: 0x10188d74c Builtins_GeneratorPrototypeNext [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
25: 0x105dbb2d4
26: 0x105e1debc
27: 0x105dfbbd8
28: 0x101910418 Builtins_PromiseFulfillReactionJob [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
29: 0x10187d954 Builtins_RunMicrotasks [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
30: 0x101859c44 Builtins_JSRunMicrotasksEntry [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
31: 0x10122e450 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
32: 0x10122e884 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
33: 0x10122e970 v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*, v8::internal::MaybeHandlev8::internal::Object) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
34: 0x10125159c v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate
) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
35: 0x101251e30 v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
36: 0x100f1fd8c node::InternalCallbackScope::Close() [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
37: 0x100f2036c node::InternalMakeCallback(node::Environment*, v8::Localv8::Object, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value, node::async_context) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
38: 0x100f354ac node::AsyncWrap::MakeCallback(v8::Localv8::Function, int, v8::Localv8::Value
) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
39: 0x100fd474c node::fs::FSReqCallback::Resolve(v8::Localv8::Value) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
40: 0x100fd5158 node::fs::AfterMkdirp(uv_fs_s*) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
41: 0x10183a3b0 uv__work_done [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
42: 0x10183db10 uv__async_io [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
43: 0x10184f824 uv__io_poll [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
44: 0x10183dfa0 uv_run [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
45: 0x100f20e00 node::SpinEventLoop(node::Environment*) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
46: 0x101009638 node::NodeMainInstance::Run(int*, node::Environment*) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
47: 0x101009304 node::NodeMainInstance::Run(node::EnvSerializeInfo const*) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
48: 0x100fa22ec node::Start(int, char**) [/Users/leopaz/.nvm/versions/node/v16.13.1/bin/node]
49: 0x1057cd0f4
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

It happens after modifying App.tsx with the boilerplate code in the quickstart guide. I've tried bumping up memory for node up to 8gb and still seeing the same issue.

Anything to help would be appreciated.

Node Version: 16.13.1

@fgatti675
Copy link
Member

Hi Leo, someone had a similar issue and it turns out he had not installed the peer dependencies properly. Not sure if that is your case as well.
I use it with node 14 usually, that might be related as well.

@leo-paz
Copy link
Author

leo-paz commented Dec 26, 2021

@fgatti675 Hi thanks for the reply.

Do you by chance remember what issue this is? I tried using node 14 but still no luck

@leo-paz
Copy link
Author

leo-paz commented Dec 30, 2021

Solved this by copying over the same package versions from peer dependencies in the package.json of the firecms repo into my own project and re installing

@leo-paz leo-paz closed this as completed Dec 30, 2021
@fgatti675
Copy link
Member

Glad you could solve it Leo,
Could you share your yarn.lock when it was failing? so we can understand what was wrong.
Seems like some dependency is causing the trouble

@leo-paz
Copy link
Author

leo-paz commented Dec 30, 2021

@fgatti675 Unfortunately I don't as i never checked in the yarn.lock into source while it wasn't working.

I can say that all I did was follow the quickstart guide with node 16 and I'm assuming the error was a mismatch of peer dependencies with a new version of create react app. The error was very cryptic for I'm assuming this related issue here: nodejs/node#40014

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

No branches or pull requests

2 participants