Closed
Description
🐛 bug report
Description of the problem
I run codesandbox from source code.
yarn start
During debugging/code changes I got out of memory exception. After 2-3 recompilation and code reload I got exception related to memory management.
Should I run the application in another way?
Should I use another node/npm versions?
Stack trace:
stdout:
' > cross-env LOCAL_SERVER=1 LOCAL_DEV=1 node scripts/start.js
Happy[1]: Version: 5.0.0. Threads: 7
[HPM] Proxy created: / -> https://codesandbox.io
Happy[1]: All set; signaling webpack to proceed.
...
<--- Last few GCs ---> [2449:0x10393a000] 259359 ms: Mark-sweep 1319.5 (1395.8) -> 1319.5 (1395.3) MB, 526.6 / 0.0 ms (average mu = 0.185, current mu = 0.000) last resort GC in old space requested
[2449:0x10393a000] 259850 ms: Mark-sweep 1319.5 (1395.3) -> 1319.5 (1395.3) MB, 490.6 / 0.0 ms (average mu = 0.105, current mu = 0.000) last resort GC in old space requested
<--- JS stacktrace ---> ==== JS stack trace =========================================
0: ExitFrame [pc: 0x38e32465be3d] Security context: 0x08af09f1e6e1 <JSObject>
1: byteLength(aka byteLength) [0x8af83b06609] [buffer.js:531] [bytecode=0x8afde93b7a9 offset=204](this=0x08afee2826f1 <undefined>,string=0x08af1dbe72b9 <Very long string[12752496]>,encoding=0x08af09f3d809 <String[4]: utf8>)
2: arguments adaptor frame: 3->2
3: fromString(aka fromString) [0x8af83b1d231] [buffer.js:342] [bytecode=0x8af83b7b6c1 offse...
stderr:
'FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: 0x10003860e node::Abort() [/usr/local/Cellar/node@10/10.15.2/bin/node]
2: 0x1000387df node::OnFatalError(char const*, char const*) [/usr/local/Cellar/node@10/10.15.2/bin/node]
3: 0x10016d07b v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node@10/10.15.2/bin/node]
4: 0x10016d01c v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node@10/10.15.2/bin/node]
5: 0x10041a110 v8::internal::Heap::UpdateSurvivalStatistics(int) [/usr/local/Cellar/node@10/10.15.2/bin/node]
6: 0x100420aee v8::internal::Heap::SetUp() [/usr/local/Cellar/node@10/10.15.2/bin/node]
7: 0x10040104b v8::internal::Factory::AllocateRawWithImmortalMap(int, v8::internal::PretenureFlag, v8::internal::Map*, v8::internal::AllocationAlignment) [/usr/local/Cellar/node@10/10.15.2/bin/node]
8: 0x100402927 v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/local/Cellar/node@10/10.15.2/bin/node]
9: 0x1004d982b v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [/usr/local/Cellar/node@10/10.15.2/bin/node]
10: 0x1001816a8 v8::String::Utf8Length() const [/usr/local/Cellar/node@10/10.15.2/bin/node]
11: 0x100048ca6 node::Buffer::(anonymous namespace)::ByteLengthUtf8(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/Cellar/node@10/10.15.2/bin/node]
12: 0x1001cfb19 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/Cellar/node@10/10.15.2/bin/node]
13: 0x1001cf132 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/Cellar/node@10/10.15.2/bin/node]
14: 0x1001ce8d0 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/Cellar/node@10/10.15.2/bin/node]
15: 0x38e32465be3d
16: 0x38e3246118d5
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `cross-env LOCAL_SERVER=1 LOCAL_DEV=1 node scripts/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xxx/.npm/_logs/2019-06-10T03_31_41_587Z-debug.log
npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node@10/10.15.2/bin/node',
1 verbose cli '/usr/local/Cellar/node@10/10.15.2/bin/npm',
1 verbose cli 'run',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/local/Cellar/node@10/10.15.2/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/xxx/sandbox/codesandbox-client/packages/app/node_modules/.bin:/Users/xxx/sandbox/codesandbox-client/packages/app/node_modules/.bin:/Users/xxx/sandbox/codesandbox-client/packages/node_modules/.bin:/Users/xxx/sandbox/codesandbox-client/node_modules/.bin:/Users/xxx/sandbox/node_modules/.bin:/Users/xxx/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/Cellar/node@10/10.15.2/bin:/var/folders/81/7tfqs5kj2yl1b2f1hxdq39rr0000gp/T/yarn--1560137177101-0.930396383699037:/Users/xxx/sandbox/codesandbox-client/node_modules/.bin:/Users/xxx/.config/yarn/link/node_modules/.bin:/Users/xxx/sandbox/codesandbox-client/node_modules/.bin:/usr/local/Cellar/node@10/10.15.2/libexec/lib/node_modules/npm/bin/node-gyp-bin:/usr/local/Cellar/node@10/10.15.2/lib/node_modules/npm/bin/node-gyp-bin:/usr/local/Cellar/node@10/10.15.2/bin/node_modules/npm/bin/node-gyp-bin:/usr/local/opt/node@10/bin:/usr/local/opt/node@10/bin:/usr/local/opt/node@10/bin:/usr/local/opt/node@10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/node@10/bin
9 verbose lifecycle [email protected]~start: CWD: /Users/xxx/sandbox/codesandbox-client/packages/app
10 silly lifecycle [email protected]~start: Args: [ '-c',
10 silly lifecycle 'cross-env LOCAL_SERVER=1 LOCAL_DEV=1 node scripts/start.js' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `cross-env LOCAL_SERVER=1 LOCAL_DEV=1 node scripts/start.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/Cellar/node@10/10.15.2/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/Cellar/node@10/10.15.2/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/xxx/sandbox/codesandbox-client/packages/app
16 verbose Darwin 18.6.0
17 verbose argv "/usr/local/Cellar/node@10/10.15.2/bin/node" "/usr/local/Cellar/node@10/10.15.2/bin/npm" "run" "start"
18 verbose node v10.15.2
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `cross-env LOCAL_SERVER=1 LOCAL_DEV=1 node scripts/start.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Your Environment
Software | Name/Version |
---|---|
Сodesandbox | latest: 18664cf |
Node | 10.15.2 |
npm | 6.4.1 |
Operating System | MacOS Mojave |
Thank You
Metadata
Metadata
Assignees
Labels
No labels