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

Coverity analysis defect 101508: Data race condition

    • Fully Compatible
    • ALL
    • v4.2
    • Execution Team 2019-06-17

      Thread shared data is accessed without holding an appropriate lock, possibly causing a race condition

      Defect 101508 (STATIC_C)
      Checker MISSING_LOCK (subcategory none)
      File: /src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.h
      Function mongo::EphemeralForTestRecordStore::updateStatsAfterRepair(mongo::OperationContext *, long long, long long)
      /src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.h, line: 132
      Accessing "this->_data->dataSize" without holding lock "mongo::EphemeralForTestRecordStore::Data.recordsMutex". Elsewhere, "_ZN5mongo27EphemeralForTestRecordStore4DataE.dataSize" is accessed with "mongo::EphemeralForTestRecordStore::Data.recordsMutex" held 7 out of 9 times.

                  _data->dataSize = dataSize;
      

            Assignee:
            zach.yam@mongodb.com Zach Yam (Inactive)
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: