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

Race condition on log file switch can cause missing log records

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • WT2.9.0, 3.2.8, 3.3.9
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Issue Status as of Jul 06, 2016

      ISSUE SUMMARY
      The WiredTiger storage engine has a default journal log file size of 100MB, so for every 100MB of data written to the journal a new journal log file is created.

      A race condition in the WiredTiger code when switching to the next journal log file may cause some updates to be lost during an unclean shutdown.

      This issue only affects users running with journaling enabled. Users that run with journaling disabled can not be affected by this bug.

      USER IMPACT
      If the race condition is triggered and the node suffers an unclean shutdown, some updates since the last checkpoint may be lost. Unfortunately it is not possible to detect if the race condition has been triggered.

      AFFECTED VERSIONS
      Only MongoDB versions 3.2.6 and 3.2.7 are affected by this bug.

      REMEDIATION
      A fix for this issue is included in the MongoDB 3.2.8 production release. Users running 3.2.6 or 3.2.7 whose nodes may be subject to unclean shutdowns should upgrade to MongoDB 3.2.8 to avoid exposure to this issue.

      WORKAROUNDS
      Unfortunately there are no known workarounds for this issue.

      Original description

      The Jenkins spinlock GCC job failed with the following output:

      FAIL: random-abort
      ==================
      
      Spawned 5 writer threads
      Parent: sleep 10 seconds, then kill child
      Kill child
      Open database, run recovery and verify content
      no record with key 3689348814741971694
      1 record(s) absent from 68828
      

            Assignee:
            sue.loverso@mongodb.com Susan LoVerso
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: