microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.75k stars 29.1k forks source link

JavaScript heap out of memory when trying to pack 1.39 on Linux ARM64 Fedora 29 #82779

Closed selalerer closed 5 years ago

selalerer commented 5 years ago

Steps to Reproduce:

  1. git clone https://github.com/Microsoft/vscode
  2. cd vscode/
  3. git checkout release/1.39
  4. yarn (finish successfully)
  5. gulp vscode-linux-arm

System information:

$ uname -a Linux ip-10-45-0-37 5.2.18-100.fc29.aarch64 #1 SMP Tue Oct 1 13:05:51 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

$ cat /proc/meminfo | head -n2 MemTotal: 15850920 kB MemFree: 7652936 kB

$ yarn --version 1.19.1 $ node --version v10.16.3 $ gulp --version CLI version: 2.2.0 Local version: 4.0.0

Output: [14:38:51] Using gulpfile ~/vscode/gulpfile.js [14:38:51] Starting 'vscode-linux-arm'... [14:38:51] Starting clean-out-build ... [14:38:51] Finished clean-out-build after 6 ms [14:38:51] Starting compile-build ... [14:38:56] Starting compilation... [14:43:17] Finished compilation with 0 errors after 261516 ms [14:43:17] Finished compile-build after 266366 ms [14:43:17] Starting clean-extensions-build ... [14:43:17] Finished clean-extensions-build after 1 ms [14:43:17] Starting bundle-extensions-build ...

<--- Last few GCs --->

[1606:0xaaaae5344110] 320918 ms: Mark-sweep 1375.8 (1439.3) -> 1375.7 (1436.8) MB, 1650.0 / 0.0 ms (average mu = 0.061, current mu = 0.001) last resort GC in old space requested

<--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 0x4f6e37cc]

Security context: 0x000023d9e6e9 1: declareSymbol(aka declareSymbol) [0x24811311] [/home/vncuser/vscode/node_modules/typescript/lib/typescript.js:~28418] [pc=0x53340fa0](this=0x0000338026f1 ,symbolTable=0x000047377119 ,parent=0x0000473770e1 ,node=0xffff1ea60741 ,includes=32,excludes=899503,isReplace...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0xffff991e1504 node::Abort() [/lib64/libnode.so.64] 2: 0xffff991e1544 [/lib64/libnode.so.64] 3: 0xffff99530f8c v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [/lib64/libnode.so.64] 4: 0xffff99531128 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [/lib64/libnode.so.64] 5: 0xffff998a2374 [/lib64/libnode.so.64] 6: 0xffff998b3ee4 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/lib64/libnode.so.64] 7: 0xffff998b4644 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/lib64/libnode.so.64] 8: 0xffff998b57f4 v8::internal::Heap::CollectAllAvailableGarbage(v8::internal::GarbageCollectionReason) [/lib64/libnode.so.64] 9: 0xffff998b6d04 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/lib64/libnode.so.64] 10: 0xffff9988777c v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/lib64/libnode.so.64] 11: 0xffff99ae8d50 v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object*, v8::internal::Isolate) [/lib64/libnode.so.64] 12: 0x4f6e37cc Aborted (core dumped)

roblourens commented 5 years ago

Try adding --max_old_space_size=4095

vscodebot[bot] commented 5 years ago

We have a great developer community over on slack where extension authors help each other. This is a great place for you to ask questions and find support.

Happy Coding!

selalerer commented 5 years ago

Try adding --max_old_space_size=4095

Thank you @roblourens. That did the trick:

[11:35:55] Finished optimize-vscode after 104958 ms [11:35:55] Starting clean-vscode-linux-arm ... [11:35:55] Finished clean-vscode-linux-arm after 1 ms [11:35:55] Starting vscode-linux-arm-ci ... \u2193 ffmpeg-v4.2.10-linux-armv7l.zip [====================] 100% Downloaded ffmpeg-v4.2.10-linux-armv7l.zip \u2193 electron-v4.2.10-linux-armv7l.zip [====================] 100% Downloaded electron-v4.2.10-linux-armv7l.zip [11:36:40] Finished vscode-linux-arm-ci after 44582 ms [11:36:40] Starting vscode-linux-arm ... [11:36:40] Finished vscode-linux-arm after 0 ms [11:36:40] Finished 'vscode-linux-arm' after 11 min [vncuser@ip-10-45-0-37 vscode]$