[SERVER-26596] Javascript allocator should not abort when OOM during JSContext creation Created: 12/Oct/16  Updated: 19/Nov/16  Resolved: 18/Oct/16

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.4.0-rc1

Type: Bug Priority: Major - P3
Reporter: Jonathan Reams Assignee: Jonathan Reams
Resolution: Done Votes: 0
Labels: platforms-hocr
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2016-10-31
Participants:
Linked BF Score: 0

 Description   

Since we added the jsHeapLimitMB setParameter, it's possible to make the javascript engine run out of memory before it is able to initialize a JSContext. Because the OOM handling of our custom allocator needs a pointer to the scope to mark it as OOM, this can cause the server to abort. We need to make sure the server doesn't crash when this happens and issue an appropriate warning that the jsHeapLimitMB is too low to actually run any javascript.



 Comments   
Comment by Githook User [ 17/Oct/16 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-26596 Make sure test doesn't break other tests and fix memory leak
Branch: master
https://github.com/mongodb/mongo/commit/40c24abaa05450c612f00209b81d63d3c6acd35b

Comment by Githook User [ 13/Oct/16 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-26596 Don't abort when javascript heap limit is set too low to initialize spidermonkey
Branch: master
https://github.com/mongodb/mongo/commit/0344a7542f9318730cce289fe143295f6f99b4f8

Generated at Thu Feb 08 04:12:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.