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

JavaScript Out of memory error after upgrade to 6.5.5 #18329

Closed
shafqatalix opened this issue May 25, 2022 · 11 comments
Closed

JavaScript Out of memory error after upgrade to 6.5.5 #18329

shafqatalix opened this issue May 25, 2022 · 11 comments

Comments

@shafqatalix
Copy link

Describe the bug
<--- Last few GCs --->

[33390:0x7fa3a0008000] 91224 ms: Mark-sweep 4037.0 (4132.6) -> 4024.0 (4133.4) MB, 2835.9 / 0.1 ms (average mu = 0.138, current mu = 0.005) allocation failure scavenge might not succeed
[33390:0x7fa3a0008000] 94235 ms: Mark-sweep 4039.7 (4133.4) -> 4027.0 (4136.9) MB, 2995.0 / 0.2 ms (average mu = 0.079, current mu = 0.005) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x108d46775 node::Abort() [/usr/local/bin/node]
2: 0x108d468f8 node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
3: 0x108ebe707 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
4: 0x108ebe6a3 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
5: 0x10905d0e5 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]
6: 0x10906111b v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/usr/local/bin/node]
7: 0x10905d9ec v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
8: 0x10905ae9a v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
9: 0x1090682c0 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
10: 0x109068341 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
11: 0x1090351b7 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/local/bin/node]
12: 0x1093e32ae v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]
13: 0x109785359 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/usr/local/bin/node]y

To Reproduce
Please create a reproduction by running npx sb@next repro and following the instructions. Read our documentation to learn more about creating reproductions.
Paste your repository and deployed reproduction here. We prioritize issues with reproductions over those without.

System
Environment Info:

System:
OS: macOS 11.6.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 16.14.0 - /usr/local/bin/node
Yarn: 3.2.0 - ~/.yarn/bin/yarn
npm: 8.10.0 - /usr/local/bin/npm
Browsers:
Chrome: 101.0.4951.64
Edge: 101.0.1210.53
Firefox: 97.0.2
Safari: 15.4
npmPackages:
@storybook/addon-actions: ^6.5.5 => 6.5.5
@storybook/addon-console: ^1.2.3 => 1.2.3
@storybook/addon-docs: ^6.5.5 => 6.5.5
@storybook/addon-essentials: ^6.5.5 => 6.5.5
@storybook/addon-knobs: ^6.4.0 => 6.4.0
@storybook/addon-links: ^6.5.5 => 6.5.5
@storybook/addon-storysource: ^6.5.5 => 6.5.5
@storybook/addon-viewport: ^6.5.5 => 6.5.5
@storybook/addons: ^6.5.5 => 6.5.5
@storybook/core: ^6.5.5 => 6.5.5
@storybook/react: ^6.5.5 => 6.5.5
@storybook/source-loader: ^6.5.5 => 6.5.5

Additional context
Upgrading the storybook from 5.3-to-6.5 , everything works fine with 5.3.x.

@knollfear
Copy link

I had a similar issue. Was fine with 6.4.9, 6.5.5 just breaks.

@scottrippey
Copy link

I'm having the same trouble ... I tried upgrading from 5.3.18 to the latest 6.5.5 and I get the same Allocation failed - JavaScript heap out of memory error.
Yarn v 1.22.17

I can do these things successfully:

  • npm install @storybook/react@latest
  • yarn install @storybook/react@latest on a new project
  • yarn install after removing node_modules (and it installs v5.3.18)

But these all have same error as above:

yarn add @storybook/react@latest
yarn add @storybook/[email protected]

@scottrippey
Copy link

scottrippey commented May 26, 2022

FWIW, I was able to fix this by deleting yarn.lock and node_modules, and running yarn install to regenerate the lockfile.

@shilman
Copy link
Member

shilman commented May 27, 2022

It sounds like you might have two versions of Storybook installed. You can do yarn why @storybook/react, yarn why @storybook/addons, etc. to see if there are duplicates. Also you can try removing all the addons & adding them back one by one to diagnose.

@Fullchee
Copy link

Storybook actually works for me when I upgraded

However, when I added one more story, I encounter that error

and I can reproduce the out of memory error when I revert back to 6.4

I'm going to run npx sb@next repro and try to copy my storybook config over and see if I can reproduce it

@shilman
Copy link
Member

shilman commented Jun 12, 2022

Possibly related #18457 cc @tmeasday

@ShakurOo
Copy link

Same behavior since v6.X.X. After many hot reloading, I'm encounting this error then the build fails.

@nuxcodes
Copy link

nuxcodes commented Apr 5, 2023

I have this issue in 7.0.2 with Next.js. The node runtime incrementally consumes memory as storybook hot reloads. Can't seem to find a workaround with webpack configs either

@shilman
Copy link
Member

shilman commented Apr 5, 2023

@nuxcodes do you have a reproduction repo you can share?

@github-actions
Copy link
Contributor

Hi there! Thank you for opening this issue, but it has been marked as stale because we need more information to move forward. Could you please provide us with the requested reproduction or additional information that could help us better understand the problem? We'd love to resolve this issue, but we can't do it without your help!

@github-actions github-actions bot added the Stale label Aug 28, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

I'm afraid we need to close this issue for now, since we can't take any action without the requested reproduction or additional information. But please don't hesitate to open a new issue if the problem persists – we're always happy to help. Thanks so much for your understanding.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants