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

Hazard pointer race with page replace causes error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.9.0, 3.4.0-rc4, 3.2.12
    • Labels:
      None
    • Sprint:
      Storage 2016-11-21

      Description

      Setting a hazard pointer consists of:

      1. reading ref->page and setting hp->page
      2. full barrier
      3. reading ref->page checking it is still equal to hp->page
      4. checking ref->state == WT_REF_MEM.

      However, if eviction cannot evict all of the changes on a page and decides to replace the page, there is a window where ref->page == NULL. If the page replacement completes in between steps 3 and 4 above, the call to __wt_hazard_set can report success but publish a NULL hazard pointer.

        Attachments

          Activity

            People

            • Assignee:
              michael.cahill Michael Cahill
              Reporter:
              michael.cahill Michael Cahill
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: