fes.js icon indicating copy to clipboard operation
fes.js copied to clipboard

fes dev模式下内存GC

Open aringlai opened this issue 4 years ago • 0 comments

问题描述 fes dev启动开发模式,长时间循环:修改代码 -> 保存 -> 编译,出现内存溢出,直接GC。

--- Last few GCs --->

[83471:0x110008000] 245038697 ms: Mark-sweep 4044.4 (4137.2) -> 4027.0 (4137.9) MB, 1094.9 / 0.3 ms  (average mu = 0.168, current mu = 0.075) allocation failure scavenge might not succeed
[83471:0x110008000] 245039862 ms: Mark-sweep 4043.4 (4137.9) -> 4029.3 (4139.7) MB, 1058.9 / 0.5 ms  (average mu = 0.131, current mu = 0.091) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x1000ab634 node::Abort() [/usr/local/Cellar/node/15.6.0/bin/node]
 2: 0x1000ab7aa node::OnFatalError(char const*, char const*) [/usr/local/Cellar/node/15.6.0/bin/node]
 3: 0x1001e5db9 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/15.6.0/bin/node]
 4: 0x1001e5d63 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/15.6.0/bin/node]
 5: 0x10032a8cb v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/Cellar/node/15.6.0/bin/node]
 6: 0x10032bbd8 v8::internal::Heap::MarkCompactPrologue() [/usr/local/Cellar/node/15.6.0/bin/node]
 7: 0x100329435 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/Cellar/node/15.6.0/bin/node]
 8: 0x1003279bf v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/Cellar/node/15.6.0/bin/node]
 9: 0x10033078e v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/15.6.0/bin/node]
10: 0x1003307e6 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/15.6.0/bin/node]
11: 0x100309ada v8::internal::FactoryBase<v8::internal::Factory>::NewRawTwoByteString(int, v8::internal::AllocationType) [/usr/local/Cellar/node/15.6.0/bin/node]
12: 0x1004eeb90 v8::internal::String::SlowFlatten(v8::internal::Isolate*, v8::internal::Handle<v8::internal::ConsString>, v8::internal::AllocationType) [/usr/local/Cellar/node/15.6.0/bin/node]
13: 0x1004f2c8c v8::internal::String::LastIndexOf(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [/usr/local/Cellar/node/15.6.0/bin/node]
14: 0x10027098e v8::internal::Builtin_Impl_StringPrototypeLastIndexOf(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/Cellar/node/15.6.0/bin/node]
15: 0x1008362d9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/usr/local/Cellar/node/15.6.0/bin/node]
[1]    83469 illegal hardware instruction  npm run dev

环境描述/版本信息

  • OS: Mac

  • Node v15.6.0

  • fes v2.0.0-rc.0

  • 项目package.json

{
  "devDependencies": {
    "@webank/eslint-config-webank": "0.2.10"
  },
  "dependencies": {
    "@ant-design-vue/use": "^0.0.1-alpha.9",
    "@ant-design/icons-vue": "^6.0.1",
    "@fesjs/fes": "^2.0.0-rc.0",
    "@fesjs/plugin-access": "^2.0.0-rc.0",
    "@fesjs/plugin-enums": "^2.0.0-rc.0",
    "@fesjs/plugin-layout": "^2.0.0-rc.0",
    "@fesjs/plugin-model": "^2.0.0-rc.0",
    "@fesjs/plugin-qiankun": "2.0.0-rc.8",
    "@fesjs/plugin-request": "2.0.0-rc.13",
    "@fesjs/plugin-vuex": "^2.0.0-rc.16",
    "@webank/we-utils": "1.0.2",
    "ant-design-vue": "^2.0.0",
    "vue": "^3.0.5",
    "vuex": "^4.0.0"
  },
  "private": true
}

如何复现 复现步骤 1.修改代码 2.保存 3.编译 4.重复上面步骤多次

预期结果 正常编译

截图 image

其它补充内容

aringlai avatar Apr 28 '21 04:04 aringlai