Azure / autorest.az

Azure CLI Code Generator
MIT License
22 stars 20 forks source link

Generation Fails With a Javascript Heap Out Of Memory Error #785

Open jobala opened 3 years ago

jobala commented 3 years ago

Overview

autorest.az runs out of memory when generating extensions listed in affected extensions. You can find the swagger definitions for these extensions in msgraph-cli under the open-api-docs directory.

Extensions Affected

Error Message

<--- JS stacktrace --->

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

Security context: 0x012b30cc08d1 <JSObject>
    0: builtin exit frame: parse(this=0x012b30cdec89 <Object map = 000003884A503549>,0x02e86bbc0119 <Very lon
map = 000003884A503549>)

    1: onData [000000199B46C219] [/node_modules/vscode-jsonrpc/lib/messageReader.js:219] [bytecode=0000017900eamMessageReader map = 000003F01A8923B9>,0x017900517b01 <Uint8Array ...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: 00007FF7B6CB363F napi_wrap+128063
 2: 00007FF7B6C52836 v8::base::CPU::has_sse+35142
 3: 00007FF7B6C534F6 v8::base::CPU::has_sse+38406
 4: 00007FF7B7469F4E v8::Isolate::ReportExternalAllocationLimitReached+94
 5: 00007FF7B7452021 v8::SharedArrayBuffer::Externalize+833
 6: 00007FF7B731E57C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436
 7: 00007FF7B731A289 v8::internal::Heap::AddRetainedMap+2713
 8: 00007FF7B7341E1F v8::internal::Factory::NewRawTwoByteString+95
 9: 00007FF7B72612FC v8::internal::TimedHistogram::Stop+53004
10: 00007FF7B7262C5E v8::internal::TimedHistogram::Stop+59502
11: 00007FF7B726155A v8::internal::TimedHistogram::Stop+53610
12: 00007FF7B73E3219 v8::internal::Builtins::builtin_handle+83385
13: 00007FF7B73E376E v8::internal::Builtins::builtin_handle+84750
14: 00007FF7B78B4EDD v8::internal::SetupIsolateDelegate::SetupHeap+546893
15: 00007FF7B7839D8C v8::internal::SetupIsolateDelegate::SetupHeap+42748
16: 00007FF7B7839D8C v8::internal::SetupIsolateDelegate::SetupHeap+42748
17: 00007FF7B7839D8C v8::internal::SetupIsolateDelegate::SetupHeap+42748
18: 00007FF7B78330BC v8::internal::SetupIsolateDelegate::SetupHeap+14892
19: 00007FF7B7839D8C v8::internal::SetupIsolateDelegate::SetupHeap+42748
20: 00007FF7B7839D8C v8::internal::SetupIsolateDelegate::SetupHeap+42748
21: 00007FF7B7839D8C v8::internal::SetupIsolateDelegate::SetupHeap+42748
22: 00007FF7B7839D8C v8::internal::SetupIsolateDelegate::SetupHeap+42748
23: 00007FF7B78372C1 v8::internal::SetupIsolateDelegate::SetupHeap+31793
24: 00007FF7B7836EAC v8::internal::SetupIsolateDelegate::SetupHeap+30748
25: 00007FF7B7377C33 v8::internal::Execution::CallWasm+1395
26: 00007FF7B73775B6 v8::internal::Execution::Call+182
27: 00007FF7B744862D v8::Function::Call+605
28: 00007FF7B6CCFC28 node::CallbackScope::~CallbackScope+1448
29: 00007FF7B6CC8D33 v8::internal::interpreter::BytecodeNode::operand_scale+179
30: 00007FF7B6BC0FD0 v8::internal::Debug::break_frame_id+18992
31: 00007FF7B6BC17CC v8::internal::Debug::break_frame_id+21036
32: 00007FF7B6BBC9E5 v8::internal::Debug::break_frame_id+1093
33: 00007FF7B6CEF4A2 uv_thread_self+2722
34: 00007FF7B6CF233F uv_pipe_pending_type+3487
35: 00007FF7B6CFC67C uv_loop_init+860
36: 00007FF7B6CFC9A4 uv_run+244
37: 00007FF7B6C1AD43 v8::internal::Scope::locals+31043
38: 00007FF7B6C7A3D3 node::Start+275
39: 00007FF7B6B267AC RC4_options+339628
40: 00007FF7B796BE08 v8::internal::SetupIsolateDelegate::SetupHeap+1296248
41: 00007FFD65387034 BaseThreadInitThunk+2
changlong-liu commented 3 years ago

can use nodejs param to enlarge the memory