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

Coverity #1316612, data race complaint

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • WT2.7.0
    • Affects Version/s: None
    • Component/s: None
    • None

      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.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: