microsoft / microsoft/TypeScript
Heap out of memory on version 4.2
オープン
まだ誰も着手していません。
Needs Investigation
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
Bug Report
🔎 Search Terms
- memory
🕗 Version & Regression Information
On a Vue project the compiler crashes with Heap out of memory. This does not happen on version 4.1.3.
⠙ Building for production...Starting type checking service...
Using 1 worker with 2048MB memory limit
⠼ Building for production...
<--- Last few GCs --->
[34642:0x41419c0] 211431 ms: Scavenge 956.0 (980.7) -> 940.2 (980.7) MB, 0.3 / 0.0 ms (average mu = 0.996, current mu = 0.994) allocation failure
[34642:0x41419c0] 211566 ms: Scavenge 956.0 (980.7) -> 940.2 (980.7) MB, 0.3 / 0.0 ms (average mu = 0.996, current mu = 0.994) allocation failure
[34642:0x41419c0] 211705 ms: Scavenge 956.0 (980.7) -> 940.2 (980.7) MB, 0.3 / 0.0 ms (average mu = 0.996, current mu = 0.994) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0xa9c298dbf1d]
Security context: 0x29d2e9a1e6c1 <JSObject>
1: parseList(aka parseList) [0x292d524ccc59] [/home/qp/IdeaProjects/MyEtherWallet/node_modules/typescript/lib/typescript.js:~30031] [pc=0xa9c29c58125](this=0x3ba7b93026f1 <undefined>,kind=0,parseElement=0x292d524cfa99 <JSFunction parseStatement (sfi = 0x3ef7041e4489)>)
2: parseSourceFileWorker(aka parseSourceFileWorker) [0x292d524cbb99] [/home/qp/Idea...
FATAL ERROR: invalid array length Allocation failed - JavaScript heap out of memory
1: 0x8fb090 node::Abort() [/home/qp/.nvm/versions/node/v10.23.3/bin/node]
2: 0x8fb0dc [/home/qp/.nvm/versions/node/v10.23.3/bin/node]
3: 0xb033be v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/home/qp/.nvm/versions/node/v10.23.3/bin/node]
4: 0xb035f4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/home/qp/.nvm/versions/node/v10.23.3/bin/node]
5: 0xef7652 [/home/qp/.nvm/versions/node/v10.23.3/bin/node]
6: 0xed0734 v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::Heap::RootListIndex, int, v8::internal::Object*, v8::internal::PretenureFlag) [/home/qp/.nvm/versions/node/v10.23.3/bin/node]
7: 0xed0d07 v8::internal::Factory::NewUninitializedFixedArray(int, v8::internal::PretenureFlag) [/home/qp/.nvm/versions/node/v10.23.3/bin/node]
8: 0xe8408f [/home/qp/.nvm/versions/node/v10.23.3/bin/node]
9: 0x112a71d v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [/home/qp/.nvm/versions/node/v10.23.3/bin/node]
10: 0xa9c298dbf1d
⠼ Building for production...Type checking and linting aborted - probably out of memory. Check `memoryLimit` option in ForkTsCheckerWebpackPlugin configuration.
⠏ Building for production...
⏯ How to reproduce:
- Use Node 10
git clone --branch 21-add-typescript-support git@github.com:theqp/MyEtherWallet.git- Change typescript to 4.2.2 (it would work otherwise)
npm iecho "" > package-test.js && NODE_OPTIONS="--max-old-space-size=4096" npm run build- Wait for the crash :D
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、指定された MyEtherWallet ブランチ、TypeScript 4.2.2、および npm run build コマンドを使用して Node 10 のビルドを再現します。node_modules/typescript/lib/typescript.js 内のスタックエントリ parseList と parseSourceFileWorker、および ForkTsCheckerWebpackPlugin の memoryLimit 設定を調査します。4.2.2 のビルドが JavaScript ヒープを使い果たすことなく完了し、回帰が引き続きカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- node.js, typescript
- 領域
- compilers, performance
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100