[SERVER-15369] explicitly zero .ns files on creation Created: 24/Sep/14 Updated: 15/Oct/15 Resolved: 26/Sep/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 2.4.12, 2.6.5, 2.7.7 |
| Type: | Improvement | Priority: | Critical - P2 |
| Reporter: | Bruce Lucas (Inactive) | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Backport Completed: | |||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
Issue Status as of Oct 03, 2014 ISSUE SUMMARY MongoDB uses namespace (.ns) files to store database and collection metadata, and requires initial zeroing of these .ns files upon creation. A request to the operating system to zero a .ns file may fail to completely zero the file, leaving the previous contents of some disk locations exposed as part of the .ns file. This incomplete zeroing yields a corrupt .ns file, and may affect MongoDB in various ways. Only .ns files created on systems running the following configuration are affected by this issue:
See the bug report on Launchpad for more information. USER IMPACT
These failures may be accompanied by logged error messages such as:
Additional symptoms may be possible depending on the exact nature of the left-over data in the .ns file. WORKAROUNDS AFFECTED VERSIONS FIX VERSION RESOLUTION DETAILS Original descriptionCertain versions of Linux may under some conditions use SCSI WRITE SAME to implement the requirement to zero a file on initial allocation. However, certain platforms do not properly implement WRITE SAME. The result is that the initial zeroing of a file may be unreliable on those platforms, causing potentially fatal corruption in the .ns file, which depends on the initial zeroing of the file to initialize the hash table. As a defensive measure mongod could explicitly zero the .ns files on creation. |
| Comments |
| Comment by Githook User [ 29/Sep/14 ] |
|
Author: {u'username': u'monkey101', u'name': u'Dan Pasette', u'email': u'dan@10gen.com'}Message: (cherry picked from commit 243f11cd82d7925c77df0b04fad58b18f70cf031) |
| Comment by Githook User [ 29/Sep/14 ] |
|
Author: {u'username': u'monkey101', u'name': u'Dan Pasette', u'email': u'dan@10gen.com'}Message: (cherry picked from commit 689c0faf75e0cc3f1663b962c3db55360e0ef3b5) Conflicts: |
| Comment by Githook User [ 29/Sep/14 ] |
|
Author: {u'username': u'monkey101', u'name': u'Dan Pasette', u'email': u'dan@10gen.com'}Message: |
| Comment by Githook User [ 25/Sep/14 ] |
|
Author: {u'name': u'Dan Pasette', u'email': u'dan@10mongodb.com'}Message: Backported from commit b39f5ccc3e5c74918c8f2cd46d33c5b6316f4b06 |
| Comment by Githook User [ 25/Sep/14 ] |
|
Author: {u'name': u'Dan Pasette', u'email': u'dan@10mongodb.com'}Message: Conflicts: |
| Comment by Githook User [ 25/Sep/14 ] |
|
Author: {u'name': u'Dan Pasette', u'email': u'dan@10mongodb.com'}Message: |