[SERVER-5287] Errors in MapViewOfFile() might return incomplete data in a query Created: 12/Mar/12  Updated: 11/Jul/16  Resolved: 13/Apr/12

Status: Closed
Project: Core Server
Component/s: Logging, Storage
Affects Version/s: 2.1.0
Fix Version/s: 2.1.1

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Issue Links:
Related
related to SERVER-5244 core suite fails with "not enough sto... Closed
Operating System: Windows
Participants:

 Description   

Right now, if MapViewOfFile() returns an error, we just log a message and blindly continue. This can result in incomplete data being returned for a given query, as illustrated by the failing update.js test on Windows.

We should throw an exception (or massert) when the Windows function returns an error, to prevent the query from proceeding.
I see that calls to mmap() also just return 0 and do not throw an exception, so perhaps we should throw here as well?
The alternative is to check all the places where we're using MemoryMappedFile member functions and ensure we're not ignoring their return statuses.



 Comments   
Comment by auto [ 13/Apr/12 ]

Author:

{u'login': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-5287 Abort if Windows MapViewOfFile fails

If we try to memory map a file in Windows and fail, consider
this a fatal error. Improve logging so we can see details of
what failed.
Branch: master
https://github.com/mongodb/mongo/commit/67abadc4f54cc31735504081fee230a64e19d24f

Comment by Tad Marshall [ 12/Apr/12 ]

We now fassert on a failed remap, it makes no sense not to fassert on the initial map failure.

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