-
Type: Bug
-
Resolution: Unresolved
-
Priority: 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:
_
,“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/meminfo, etc
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 :
- 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…
- How to launch mongoDB without doing any changes in “/proc/” directory?