Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-10516

mongod crashes when re-mapping above user address space of 8TB on Windows

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.7.1
    • Affects Version/s: None
    • Component/s: Stability
    • Environment:
      MongoDB x64 on Windows 7
    • Windows
    • Hide

      on a new mongod instance, create a capped collection of 2GB.

      > use test
      > db.createCollection("foo", {capped:true,size:2*1024*1024*1024})
      

      Now in a loop unmap and remap the database

      > for (i=0;i<1000;i++) {
      ... db.adminCommand("closeAllDatabases");
      ... db.foo.findOne()
      ... }
      
      Show
      on a new mongod instance, create a capped collection of 2GB. > use test > db.createCollection( "foo" , {capped: true ,size:2*1024*1024*1024}) Now in a loop unmap and remap the database > for (i=0;i<1000;i++) { ... db.adminCommand( "closeAllDatabases" ); ... db.foo.findOne() ... }
    • Server 2.7.1

      When memory mapping on Windows mongod keeps track of the address to start the mapping at (adjusting by file size on every map). Since this is an always incrementing number mongod crashes with the above error when it hits the upper bound of user address space of 8TB (http://blogs.technet.com/b/markrussinovich/archive/2008/11/17/3155406.aspx). Modifying the code to print the virtual address we are trying to map to, we get

      Wed Aug 14 14:27:55.390 [conn1] MapViewOfFileEx for c:\data\db\test.0 failed with errno:487 Attempt to access invalid address. (file size is 2146435072) in MemoryMappedFile::map (for address 000007FED7000000)
      

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            sridhar Sridhar Nanjundeswaran
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: