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

yarn start crashes with "JavaScript heap out of memory" after a while #23434

Open
weeman1337 opened this issue Oct 6, 2022 · 5 comments
Open
Labels
A-Developer-Experience O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Upstream

Comments

@weeman1337
Copy link
Contributor

Steps to reproduce

  1. Set up a dev environment
  2. Run yarn start
  3. Edit the source code

Outcome

What did you expect?

No crash

What happened instead?

After a while the process crashes with „JavaScript heap out of memory“

Log
2022-10-06 15:14:57.579 [element-js] 
2022-10-06 15:14:57.579 [element-js] <--- Last few GCs --->
2022-10-06 15:14:57.579 [element-js] 
2022-10-06 15:14:57.579 [element-js] [46054:0x673ff00] 11676387 ms: Mark-sweep 1994.2 (2066.3) -> 1973.6 (2045.6) MB, 167.9 / 0.1 ms  (average mu = 0.150, current mu = 0.115) allocation failure scavenge might not succeed
2022-10-06 15:14:57.579 [element-js] [46054:0x673ff00] 11676395 ms: Scavenge 1989.1 (2061.1) -> 1976.2 (2048.2) MB, 1.2 / 0.0 ms  (average mu = 0.150, current mu = 0.115) allocation failure 
2022-10-06 15:14:57.579 [element-js] [46054:0x673ff00] 11676403 ms: Scavenge 1991.7 (2063.7) -> 1978.7 (2050.8) MB, 1.2 / 0.0 ms  (average mu = 0.150, current mu = 0.115) allocation failure 
2022-10-06 15:14:57.579 [element-js] 
2022-10-06 15:14:57.579 [element-js] 
2022-10-06 15:14:57.579 [element-js] <--- JS stacktrace --->
2022-10-06 15:14:57.579 [element-js] 
2022-10-06 15:14:57.579 [element-js] FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
2022-10-06 15:14:57.594 [element-js]  1: 0xb02960 node::Abort() [/usr/bin/node]
2022-10-06 15:14:57.594 [element-js]  2: 0xa18149 node::FatalError(char const*, char const*) [/usr/bin/node]
2022-10-06 15:14:57.594 [element-js]  3: 0xcdd22e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
2022-10-06 15:14:57.595 [element-js]  4: 0xcdd5a7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
2022-10-06 15:14:57.595 [element-js]  5: 0xe94c15  [/usr/bin/node]
2022-10-06 15:14:57.596 [element-js]  6: 0xe956f6  [/usr/bin/node]
2022-10-06 15:14:57.596 [element-js]  7: 0xea3c1e  [/usr/bin/node]
2022-10-06 15:14:57.596 [element-js]  8: 0xea4660 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/bin/node]
2022-10-06 15:14:57.597 [element-js]  9: 0xea75de v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/bin/node]
2022-10-06 15:14:57.597 [element-js] 10: 0xe68852 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/usr/bin/node]
2022-10-06 15:14:57.598 [element-js] 11: 0xe60e64 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Map, v8::internal::AllocationAlignment) [/usr/bin/node]
2022-10-06 15:14:57.598 [element-js] 12: 0xe62ec1 v8::internal::FactoryBase<v8::internal::Factory>::NewRawTwoByteString(int, v8::internal::AllocationType) [/usr/bin/node]
2022-10-06 15:14:57.599 [element-js] 13: 0x1200c49 v8::internal::Runtime_StringBuilderConcat(int, unsigned long*, v8::internal::Isolate*) [/usr/bin/node]
2022-10-06 15:14:57.599 [element-js] 14: 0x15d54f9  [/usr/bin/node]
2022-10-06 15:15:51.535 [element-js] Aborted (core dumped)

Operating system

Ubuntu 22.04.1 LTS

Browser information

Firefox 105.0.2 (64-bit)

URL for webapp

No response

Application version

fb686ec

Homeserver

No response

Will you send logs?

No

@t3chguy
Copy link
Member

t3chguy commented Oct 6, 2022

Edit the source code

Is it specific to this edit?
I had this happen once when I did weird whacky stuff with workers - matrix-org/matrix-react-sdk#9223

@weeman1337
Copy link
Contributor Author

Edit the source code

Is it specific to this edit? I had this happen once when I did weird whacky stuff with workers - matrix-org/matrix-react-sdk#9223

No fancy stuff. Just editing the files. After a while it crashes. I would say about once per hour.

@justjanne justjanne added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely labels Oct 6, 2022
@weeman1337
Copy link
Contributor Author

Happens regularly when editing PCSS files.

@t3chguy
Copy link
Member

t3chguy commented Apr 25, 2023

@weeman1337 are you still seeing this?

@weeman1337
Copy link
Contributor Author

Yes, it crashes every 5-10 .pcss edits. My current workaround is while true; do yarn start; sleep 1; done 😉

@Johennes Johennes changed the title yarn start crashes with „ JavaScript heap out of memory“ after a while yarn start crashes with "JavaScript heap out of memory" after a while Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Developer-Experience O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Upstream
Projects
None yet
Development

No branches or pull requests

3 participants