Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2048

Coverity #1316612, data race complaint

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.7.0
    • Component/s: None
    • Labels:
      None

      Description

      Coverity complains:

      CID 1316612 (#1 of 1): Data race condition (MISSING_LOCK)
      1. missing_lock: Accessing stats->allocation_size without holding lock WT_SPINLOCK.lock. Elsewhere, "__wt_dsrc_stats.allocation_size" is accessed with WT_SPINLOCK.lock held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).

      We're locking around filling in the block manager statistics because some values are read from the live system which is generally locked. However, there isn't any reason to lock these reads (they're 8B memory reads), they're not going to see corruption.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keith.bostic Keith Bostic
                Reporter:
                keith.bostic Keith Bostic
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: