[SERVER-30853] Update Mongod init scripts to set unlimited locked memory Created: 25/Aug/17  Updated: 30/Oct/23  Resolved: 13/Sep/17

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 3.2.16, 3.4.7, 3.5.12
Fix Version/s: 3.2.19, 3.4.11, 3.6.0-rc0

Type: Bug Priority: Critical - P2
Reporter: Kevin Arhelger Assignee: Mathew Robinson (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux


Issue Links:
Backports
Depends
Related
is related to DOCS-10721 Document Locked Memory Ulimit Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4, v3.2
Sprint: Build Ready
Participants:
Case:
Linked BF Score: 0

 Description   

MongoDB 3.2+ introduced the secure allocator.

This can be used by both the encrypted storage engine and during authentication. With a low locked memory ulimit the following error can cause a crash.

Failed to mlock: errno:12 Cannot allocate memory
Fatal Assertion 28832

I propose updating all init.d/systemctl scripts to automatically set an unlimited locked memory ulimit for mongod.



 Comments   
Comment by Githook User [ 18/Jan/18 ]

Author:

{'name': 'Mathew Robinson', 'email': 'mathew.robinson@10gen.com'}

Message: SERVER-30853 Add missing hard limit to memlock

(cherry picked from commit 65c82b5017d37aeef9fb0075543424873f1197ad)
Branch: v3.4
https://github.com/mongodb/mongo/commit/31f8c35de2960f5413eb1e866d7f655429b33e20

Comment by Githook User [ 18/Jan/18 ]

Author:

{'name': 'Mathew Robinson', 'email': 'mathew.robinson@10gen.com'}

Message: SERVER-30853 Update Mongod init scripts to set unlimited locked memory

(cherry picked from commit 6c8dc5e004bf2c91df10975adef861bcf00af6cd)
Branch: v3.4
https://github.com/mongodb/mongo/commit/86aba0040289f967f16851eeb5638a3c275a9165

Comment by Githook User [ 18/Jan/18 ]

Author:

{'name': 'Mathew Robinson', 'email': 'mathew.robinson@10gen.com'}

Message: SERVER-30853 Add missing hard limit to memlock

(cherry picked from commit 65c82b5017d37aeef9fb0075543424873f1197ad)
Branch: v3.2
https://github.com/mongodb/mongo/commit/678cb635ccb50b56b672749e818e76ed9abf6f97

Comment by Githook User [ 18/Jan/18 ]

Author:

{'name': 'Mathew Robinson', 'email': 'mathew.robinson@10gen.com'}

Message: SERVER-30853 Update Mongod init scripts to set unlimited locked memory

(cherry picked from commit 6c8dc5e004bf2c91df10975adef861bcf00af6cd)
Branch: v3.2
https://github.com/mongodb/mongo/commit/3994253fdecf0aed56121d818691453345ae85fc

Comment by Kevin Arhelger [ 11/Jan/18 ]

This affects all versions of MongoDB with the secure allocator.
Updated init scripts for 3.2 and 3.4 would reduce issues from older versions.

Comment by Githook User [ 29/Sep/17 ]

Author:

{'email': 'mathew.robinson@10gen.com', 'name': 'Mathew Robinson'}

Message: SERVER-30853 Add missing hard limit to memlock
Branch: master
https://github.com/mongodb/mongo/commit/65c82b5017d37aeef9fb0075543424873f1197ad

Comment by Ramon Fernandez Marina [ 13/Sep/17 ]

Author:

{'username': u'chasinglogic', 'name': u'Mathew Robinson', 'email': u'mathew.robinson@10gen.com'}

Message:SERVER-30853 Update Mongod init scripts to set unlimited locked memory
Branch:master
https://github.com/mongodb/mongo/commit/6c8dc5e004bf2c91df10975adef861bcf00af6cd

Comment by Mathew Robinson (Inactive) [ 07/Sep/17 ]

Path build for this: https://evergreen.mongodb.com/version/59b1735ec9ec4427ac0000e6

Comment by Mathew Robinson (Inactive) [ 07/Sep/17 ]

CR: https://mongodbcr.appspot.com/159230001/

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