我们尝试使用“--max_old_space_size”来限制node.js应用程序的内存消耗,以在应用程序达到默认的1.5G限制之前强制执行完整的GC运行。但我们正在与偶尔的GC失败作斗争,例如:
*** glibc detected *** builder-content-processor: double free or corruption (!prev): 0x00000000066d3b90 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7da26)[0x7f2952678a26]
builder-content-processor(_ZN2v88internal4Heap20FreeDeadArrayBuffersEb+0xc6)[0xace2b6]
builder-content-processor(_ZN2v88internal20MarkCompactCollector11SweepSpacesEv+0x15f)[0xaf70bf]
builder-content-processor(_ZN2v88internal20MarkCompactCollector14CollectGarbageEv+0x48)[0xb00e28]
builder-content-processor(_ZN2v88internal4Heap11MarkCompactEv+0x60)[0xab76e0]
builder-content-processor(_ZN2v88internal4Heap24PerformGarbageCollectionENS0_16GarbageCollectorENS_15GCCallbackFlagsE+0x318)[0xaceff8]
builder-content-processor(_ZN2v88internal4Heap14CollectGarbageENS0_16GarbageCollectorEPKcS4_NS_15GCCallbackFlagsE+0x239)[0xacf599]
builder-content-processor(_ZN2v88internal4Heap15HandleGCRequestEv+0xa1)[0xacffa1]
builder-content-processor(_ZN2v88internal10StackGuard16HandleInterruptsEv+0x31c)[0xa6bddc]
builder-content-processor(_ZN2v88internal18Runtime_StackGuardEiPPNS0_6ObjectEPNS0_7IsolateE+0x2b)[0xca191b]
[0x3b64b90963b]
完整的回溯和记忆地图:http://pastebin.com/PtGNmVV2
有什么想法吗?节点4.4.4
答案 0 :(得分:1)
更新:它似乎是由 bson 包0.2.x中使用的 nan 包1.8.x的过时版本引起的(的依赖关系mongodb 包1.4.x)