Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13163

WriteBatchExecutor doesn't handle PageFaultException during inserts.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 2.6.0-rc2
    • Affects Version/s: 2.6.0-rc1
    • Component/s: Write Ops
    • None
    • ALL
    • Hide

      Reliably fails the small oplog jsCore with write commands suite on Windows DEBUG builders.

      Show
      Reliably fails the small oplog jsCore with write commands suite on Windows DEBUG builders.
    • 0

      All db record accesses that occur while a PageFaultRetryableSection is instantiated on a thread's stack must be wrapped in an exception handler for PageFaultException. WriteBatchExecutor::execInserts violates this rule, allowing PFE to escape up the stack, leading to server aborts when records are determined to not be in memory.

      Correct use of PFRS is as follows:

      bool done = false;
      PageFaultRetryableSection pFaultSection;
      while (!done) {
          try {
              DB*Lock myLock(dbname);
              // Do all operations involving record access here.
              ...
              done = true;
          }
          catch (const PageFaultException& pfe) {
              pfe.touch();
          }
      }
      

            Assignee:
            schwerin@mongodb.com Andy Schwerin
            Reporter:
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: