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

storage.wiredTiger.engineConfig.configString cache_size is not validated on startup

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • ALL

      storage.dbPath.wiredTiger.engineConfig.cacheSizeGB is validated on startup.

      For example, the following configuration:

      processManagement:
         fork: true
      net:
         bindIp: localhost
         port: 27017
      storage:
         dbPath: /data/replset/rs1/db
         engine: wiredTiger
         wiredTiger:
           engineConfig:
             cacheSizeGB: 36864
      systemLog:
         destination: file
         path: "/data/replset/rs1/mongod.log"
         logAppend: true
      replication:
         replSetName: replset 

      Results in the following output:

      b'{"t":{"$date":"2024-05-29T15:45:46.246Z"},"s":"F",  "c":"CONTROL",  "id":20574,   "ctx":"main","msg":"Error during global initialization","attr":{"error":{"code":2,"codeName":"BadValue","errmsg":"storage.wiredTiger.engineConfig.cacheSizeGB must be less than or equal to 10000"}}}\n'
      

      However, the equivalent storage.wiredTiger.engineConfig.configString cache_size setting is not correctly validated, the following configuration starts a new process and may eventually runs out of memory:

      processManagement:
         fork: true
      net:
         bindIp: localhost
         port: 27017
      storage:
         dbPath: /data/replset/rs1/db
         engine: wiredTiger
         wiredTiger:
           engineConfig:
             configString: "cache_size=36864MB"
      systemLog:
         destination: file
         path: "/data/replset/rs1/mongod.log"
         logAppend: true
      replication:
         replSetName: replset
       

            Assignee:
            Unassigned Unassigned
            Reporter:
            jim.oleary@mongodb.com James O'Leary
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: