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

Leaked SimpleRecordStoreV1 iterator in MMAPV1DatabaseCatalogEntry::_init()

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.7
    • Affects Version/s: 3.0.6
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • QuInt A (10/12/15)

      Task
      Logs

      Seems like auto iterator = rs->getIterator(txn) should be wrapped in a std::unique_ptr.

      =================================================================
      ==57562==ERROR: LeakSanitizer: detected memory leaks
      
      Direct leak of 40 byte(s) in 1 object(s) allocated from:
          #0 0x932539 in operator new(unsigned long) (/data/mci/src/mongod+0x932539)
          #1 0x1f50033 in mongo::SimpleRecordStoreV1::getIterator(mongo::OperationContext*, mongo::RecordId const&, mongo::CollectionScanParams::Direction const&) const /data/mci/src/src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp:242
          #2 0x1edb015 in mongo::MMAPV1DatabaseCatalogEntry::_init(mongo::OperationContext*) /data/mci/src/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp:565
          #3 0x1ed802e in mongo::MMAPV1DatabaseCatalogEntry::MMAPV1DatabaseCatalogEntry(mongo::OperationContext*, mongo::StringData const&, mongo::StringData const&, bool, bool) /data/mci/src/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp:183
          #4 0x1efbfbd in mongo::MMAPV1Engine::getDatabaseCatalogEntry(mongo::OperationContext*, mongo::StringData const&) /data/mci/src/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp:269
          #5 0xdc0df4 in mongo::DatabaseHolder::openDb(mongo::OperationContext*, mongo::StringData const&, bool*) /data/mci/src/src/mongo/db/catalog/database_holder.cpp:120
          #6 0xe04d4b in mongo::AutoGetOrCreateDb::AutoGetOrCreateDb(mongo::OperationContext*, mongo::StringData const&, mongo::LockMode) /data/mci/src/src/mongo/db/client.cpp:214
          #7 0x94e58a in mongo::logStartup() /data/mci/src/src/mongo/db/db.cpp:268
          #8 0x94e58a in mongo::_initAndListen(int) /data/mci/src/src/mongo/db/db.cpp:654
          #9 0x94819b in mongo::initAndListen(int) /data/mci/src/src/mongo/db/db.cpp:666
          #10 0x9592c0 in mongoDbMain(int, char**, char**) /data/mci/src/src/mongo/db/db.cpp:905
          #11 0x9592c0 in main /data/mci/src/src/mongo/db/db.cpp:711
          #12 0x7f245893eec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4)
      
      -----------------------------------------------------
      Suppressions used:
        count      bytes template
           28      34816 mongo::Client::Client
      -----------------------------------------------------
      
      SUMMARY: AddressSanitizer: 40 byte(s) leaked in 1 allocation(s).
      

            Assignee:
            charlie.swanson@mongodb.com Charlie Swanson
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: