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

Mongo shell should reject script file larger than 2G

    • Minor Change
    • ALL
    • Server 2.7.4, Server 2.7.5, Server 2.7.6

      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?

            benety.goh@mongodb.com Benety Goh
            siyuan.zhou@mongodb.com Siyuan Zhou
            1 Vote for this issue
            8 Start watching this issue