microsoft / microsoft/TypeScript
Heap out of memory on version 4.2
Personne n'a encore pris cette issue.
- Langage dominant
- Go
- Étoiles
- 111k
- Forks
- 14.3k
- Merge moyen
- 1 j 19 h
- PR mergées (30 j)
- 117
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire le build de Node 10 en utilisant la branche MyEtherWallet indiquée, TypeScript 4.2.2 et la commande npm run build. Examinez les entrées de pile parseList et parseSourceFileWorker dans node_modules/typescript/lib/typescript.js, ainsi que la configuration memoryLimit de ForkTsCheckerWebpackPlugin. Le travail est terminé lorsque le build 4.2.2 se termine sans épuiser le tas JavaScript et que la régression reste couverte.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- node.js, typescript
- Domaine
- compilers, performance
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100