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

Unable to start a mongod process using mongod –fork as mongo is trying to collectSystemInfo which is very large in size in my system

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Admin
    • None
    • Server Security
    • ALL
    • Security 2024-01-08, Security 2024-02-05, Security Frozen Work

      I tried to launch mongoDB server using mongod --fork and I encountered with the below error message:
      _

      {“t”:\{“$date”:“2023-11-28T17:49:33.089Z”}

      ,“s”:“E”, “c”:“-”, “id”:23077, “ctx”:“main”,“msg”:“Assertion”,“attr”:{“error”:“BSONObjectTooLarge: BSONObj size: 17067964 (0x1046FBC) is invalid. Size must be between 0 and 16793600(16MB) First element: versionString: "Linux version 4.12.14-122.144-default (geeko@buildhost) (gcc version 4.8.5 (SUSE Linux) ) #1 SMP Mon Dec 12 09:21:50 UTC 2022 (bccc371)"”,“file”:“src/mongo/bson/bsonobj.cpp”,“line”:101}}_

      I tried to explore more about this issue and got to know that mongo is internally trying to collect system information through the function “ProcessInfo::SystemInfo::collectSystemInfo()” and then saves it into a BSON object and then tries to write it in the DB. Some of the system informations which mongo tries to get is : /proc/version/proc/cpuinfo/proc/self/mouninfo/proc/meminfoetc

      I checked the wordcount of these files in the host machine on which we were trying to launch DB. I got the below result :
      wc -c /proc/version /proc/cpuinfo /proc/self/mountinfo /proc/meminfo
      136 /proc/version
      64018 /proc/cpuinfo
      11518468 /proc/self/mountinfo
      1286 /proc/meminfo
      11583908 total

      Then, I understood that the issue is due to the large size of “mountinfo”. But now, the issue is how to launch mongoDB without encountering this issue?

      So, my questions are :

      1. Is there any way to disable mongod from collecting system info, i.e., is there any possible way to disable calling “ProcessInfo::SystemInfo::collectSystemInfo()” function? If yes, please ellaborate the ways I can do so…
      2. How to launch mongoDB without doing any changes in “/proc/” directory?

            Assignee:
            brad.moore@mongodb.com Brad Moore
            Reporter:
            nidhi03october@gmail.com Nidhi Kumari
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: