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

🐞 FATAL ERROR (next.164): Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory #12146

Closed
oneezy opened this issue Jun 22, 2024 · 2 comments · Fixed by #12144

Comments

@oneezy
Copy link

oneezy commented Jun 22, 2024

Describe the bug

when upgrading from next.163 to next.164 a new bug (FATAL ERROR) was introduced that breaks the app entirely.

related to either:
#12119
#12070

Reproduction

github: https://github.com/oneezy/ui/tree/next.164_fatal-error

pnpm i
pnpm dev

Logs

pnpm dev

  VITE v5.3.1  ready in 2698 ms

  ➜  Local:   http://localhost:1111/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

<--- Last few GCs --->

[16292:0000012EEA215710]    91943 ms: Mark-Compact 4046.5 (4133.1) -> 4036.1 (4138.8) MB, 11352.09 / 0.00 ms  (average mu = 0.132, current mu = 0.021) allocation failure; scavenge might not succeed
[16292:0000012EEA215710]    99675 ms: Mark-Compact 4051.9 (4138.8) -> 4040.3 (4142.8) MB, 7723.04 / 0.00 ms  (average mu = 0.079, current mu = 0.001) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 00007FF672856E7B node::SetCppgcReference+16075
 2: 00007FF6727CD996 v8::base::CPU::num_virtual_address_bits+79190
 3: 00007FF6727CFBA5 v8::base::CPU::num_virtual_address_bits+87909
 4: 00007FF67323D9E1 v8::Isolate::ReportExternalAllocationLimitReached+65
 5: 00007FF673227178 v8::Function::Experimental_IsNopFunction+1336
 6: 00007FF673088AA0 v8::Platform::SystemClockTimeMillis+659328
 7: 00007FF673094D23 v8::Platform::SystemClockTimeMillis+709123
 8: 00007FF673092684 v8::Platform::SystemClockTimeMillis+699236
 9: 00007FF6730857C0 v8::Platform::SystemClockTimeMillis+646304
10: 00007FF67309AE3A v8::Platform::SystemClockTimeMillis+733978
11: 00007FF67309B6B7 v8::Platform::SystemClockTimeMillis+736151
12: 00007FF6730A9FAF v8::Platform::SystemClockTimeMillis+795791
13: 00007FF672D6A565 v8::CodeEvent::GetFunctionName+116773
14: 00007FF61329AAFA
 ELIFECYCLE  Command failed with exit code 134.

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
    Memory: 18.55 GB / 31.75 GB
  Binaries:
    Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.0.6 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (126.0.2592.68)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    svelte: 5.0.0-next.164 => 5.0.0-next.164

Severity

blocking all usage of svelte

@bytecodemanipulator
Copy link

bytecodemanipulator commented Jun 23, 2024

As you mentioned, this issue was introduced in #12070. It appears to be caused by a snippet that is defined across multiple lines.

Below is the code for a minimal reproduction that causes the memory leak or see this REPL (proceed with caution).

{#snippet test(
  first
)}
{/snippet}

@paoloricciuti
Copy link
Member

As you mentioned, this issue was introduced in #12070. It appears to be caused by a snippet that is defined across multiple lines.

Below is the code for a minimal reproduction that causes the memory leak or see this REPL (proceed with caution).

{#snippet test(
  first
)}
{/snippet}

There's already a fix for this then #12144

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

Successfully merging a pull request may close this issue.

3 participants