[SERVER-9213] Resource constraints cause premature OOM and segfault Created: 02/Apr/13  Updated: 11/Jul/16  Resolved: 02/Apr/13

Status: Closed
Project: Core Server
Component/s: JavaScript, MapReduce
Affects Version/s: 2.4.1
Fix Version/s: 2.4.2, 2.5.0

Type: Bug Priority: Blocker - P1
Reporter: Ben Becker Assignee: Ben Becker
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-8859 Large arrays in v8 can crash process ... Closed
is duplicated by SERVER-9402 mongod crash by collection.group() Closed
is duplicated by SERVER-9949 Shell exits with "out of memory" when... Closed
Related
is related to SERVER-9051 v8 heap allocation failure can lead t... Closed
Operating System: ALL
Participants:

 Description   

The resource constraints in the V8Scope constructor can cause v8 to hit an internal OOM condition and abort, or return an empty handle when attempting to allocate a v8 object.

For now, the goal is to remove resource constraints. If we want to add similar functionality in the future, it may be best to implement our own so we can determine when to terminate or pause execution.



 Comments   
Comment by Antoine Girbal [ 14/May/13 ]

In mr.cpp, it looks like we are still limiting the amount of data held in RAM to be 500k.
maxInMemSize = 500 * 1024;

How could we reach anywhere close to 1.4GB? Or GC just not keeping up with creation rate?

Comment by Antoine Girbal [ 14/May/13 ]

According to this link, it seems V8 still has a default of 1.4GB on 64bits:
https://code.google.com/p/v8/issues/detail?id=847

Comment by auto [ 02/Apr/13 ]

Author:

{u'date': u'2013-04-02T17:18:22Z', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}

Message: SERVER-9213: remove v8 ResourceConstraints
Branch: v2.4
https://github.com/mongodb/mongo/commit/822840b180533efc07fc5eea660e929edc6f6c9f

Comment by auto [ 02/Apr/13 ]

Author:

{u'date': u'2013-04-02T17:18:22Z', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}

Message: SERVER-9213: remove v8 ResourceConstraints
Branch: master
https://github.com/mongodb/mongo/commit/5b1d3d9f9b4bfd72d4a169a760ecb520c4f144e4

Generated at Thu Feb 08 03:19:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.