-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Fully Compatible
-
ALL
-
Storage NYC 2018-07-02, Storage NYC 2018-07-16, Storage NYC 2018-07-30
-
(copied to CRM)
The Top singleton object keeps state about find/update/remove operations against non-existent collections. This is unexpected.
If a malfunctioning or malicious client repeatedly issues queries against unique non-existent collections, the "top" command will start to return an error after the size of the response object exceeds the maximum size of a BSON object, and the Top usage map will grow to an arbitrary size in memory. This memory can be reclaimed with a restart of the mongod process.
Reproduce with the following script:
db.dropDatabase(); db.foo.find().itcount(); db.baz.update({}, {$set: {a: 1}}); db.bar.remove({}); var res = db.adminCommand("top"); assert.isnull(res.totals["test.foo"]); // Trips: unexpected. assert.isnull(res.totals["test.bar"]); // Trips: unexpected. assert.isnull(res.totals["test.baz"]); // Trips: unexpected.
- is duplicated by
-
SERVER-27602 High CPU usage and Error running mongotop after upgrade to Mongo 2.6.12
- Closed
- is related to
-
SERVER-78999 Top still keeps state about operations against non-existent collections
- Open
- related to
-
SERVER-21168 Dropping database does not clear state of contained collections in Top
- Closed
-
SERVER-44230 Move top_drop.js from noPassthrough to Core
- Closed
-
SERVER-6627 top command should return cursor
- Backlog