[SERVER-19805] MMap memory mapped file address allocation code cannot handle addresses non-aligned to memory mapped granularity size Created: 06/Aug/15  Updated: 14/Dec/15  Resolved: 10/Aug/15

Status: Closed
Project: Core Server
Component/s: MMAPv1
Affects Version/s: 3.0.5, 3.1.6
Fix Version/s: 3.0.6, 3.1.7

Type: Bug Priority: Critical - P2
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-15070 Unable to restart Windows mongod when... Closed
Backwards Compatibility: Fully Compatible
Operating System: Windows
Backport Completed:
Sprint: Platform 7 08/10/15
Participants:

 Description   

As part of the fix to SERVER-10516, the code tries to find the next available free slot of virtual memory to allocate a memory mapped file. If the base address of the memory region or the allocation size returned by Virtual Query are not aligned to the memory mapped file granularity boundary, MongoDB will then try to map a file to an address not aligned with the correct granularity.

https://github.com/mongodb/mongo/commit/0205239ecb579e20b05cee3a0df394eb11ba14ce



 Comments   
Comment by Githook User [ 10/Aug/15 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-19805: MMap memory mapped file address allocation code cannot handle
addresses non-aligned to OS allocation granularity
Branch: v3.0
https://github.com/mongodb/mongo/commit/05cd4c789e8b1da3df6cf0fcc8f98f85e6ecc84d

Comment by Githook User [ 10/Aug/15 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-19805: MMap memory mapped file address allocation code cannot handle
addresses non-aligned to OS allocation granularity
Branch: master
https://github.com/mongodb/mongo/commit/99a512ee7029d5ce20a8d3135a0f27364452255d

Comment by Mark Benvenuto [ 06/Aug/15 ]

When we scan for free virtual memory, not all allocations are allocated to the right granularity. The allocations are aligned to OS page granularity (4kb), but need to be aligned to system allocation granularity (64kb).

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