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

Mongo shell should reject script file larger than 2G

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Fixed
    • Affects Version/s: 2.6.3
    • Fix Version/s: 2.7.6
    • Component/s: Shell
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Sprint:
      Server 2.7.4, Server 2.7.5, Server 2.7.6

      Description

      Reported by a user here.

      The shell reads the whole script file into memory and compile it, so shell doesn't allow script file to exceed 2G to keep the compatibility on 32bit OS. But the current limit is about 4G.

      Also when reading a file in file.cpp, pread() doesn't guarantee reading until the EOF in one shot. It should be checked in a loop until the EOF or an error.

      2014-08-19T21:49:28.069-0400 Assertion: 16569:In File::read(), ::pread for 'univ100-100.js' read 2147479552 bytes while trying to read 2364826029 bytes starting at offset 0, truncated file?
      

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: