Skip to content

Out of memory checking recursive mapped type with two constraint type references #21048

Closed
@mquandalle

Description

@mquandalle

edit: better description of the issue in #21048 (comment)


Hello,

I have the following Node error in one of my project using Typescript:

<--- Last few GCs --->

[6455:0x3fcc3c0]    44547 ms: Mark-sweep 1410.5 (1465.1) -> 1410.4 (1449.1) MB, 1625.7 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking1626 ms) last resort GC in old space requested
[6455:0x3fcc3c0]    46098 ms: Mark-sweep 1410.4 (1449.1) -> 1410.5 (1449.1) MB, 1551.3 / 0.0 ms  last resort GC in old space requested


<--- JS stacktrace --->

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

Security context: 0x2198fd4a5ee1 <JSObject>
    2: getTypeListId(aka getTypeListId) [/home/project/node_modules/typescript/lib/typescript.js:~30911] [pc=0x3ee74d14a111](this=0x28fe3da82311 <undefined>,types=0x29df387ac9c9 <JSArray[4]>)
    3: /* anonymous */(aka /* anonymous */) [/home/project/node_modules/typescript/lib/typescript.js:~31668] [pc=0x3ee74d35e07d](this=0x28fe3da82311 <undefined>,t...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [node]
 2: 0x121a2cc [node]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
 5: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [node]
 6: v8::internal::Factory::NewStringFromOneByte(v8::internal::Vector<unsigned char const>, v8::internal::PretenureFlag) [node]
 7: v8::internal::Factory::NumberToString(v8::internal::Handle<v8::internal::Object>, bool) [node]
 8: v8::internal::Runtime_NumberToString(int, v8::internal::Object**, v8::internal::Isolate*) [node]
 9: 0x3ee74d00463d

I've spend a lot of time trying to fix it by using various versions of Node, Typescript (including latest dev version), and Webpack. Is there any method I can use to understand this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions