Coverity analysis defect 101508: Data race condition

XMLWordPrintableJSON

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

      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 (Inactive)
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: