microsoft / microsoft/TypeScript
Heap out of memory on version 4.2
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo la build di Node 10 usando il branch MyEtherWallet indicato, TypeScript 4.2.2 e il comando npm run build. Esamina le voci dello stack parseList e parseSourceFileWorker in node_modules/typescript/lib/typescript.js, insieme alla configurazione memoryLimit di ForkTsCheckerWebpackPlugin. Il lavoro è completato quando la build 4.2.2 termina senza esaurire l'heap JavaScript e la regressione rimane coperta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- node.js, typescript
- Ambito
- compilers, performance
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100