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

Running applyOps with an op on a nonexistent database using mmapv1 will crash mongod

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.3.8
    • 3.4.1, 3.5.1
    • Storage
    • None
    • Fully Compatible
    • ALL
    • Hide

      Start mongod with mmapv1. Ensure p11 database does not exist.

      db.runCommand({applyOps: [{op:"i", ns: "p11.dbref4", o:{_id:5, x:17}}]})
      

      Show
      Start mongod with mmapv1. Ensure p11 database does not exist. db.runCommand({applyOps: [{op:"i", ns: "p11.dbref4", o:{_id:5, x:17}}]})
    • Storage 2016-12-12
    • 0

    Description

      See repro steps.

      This crashes because we attempt to construct an OldClientContext while in an active WriteUnitOfWork.
      OldClientContext will attempt to create a database if it doesn't exist.
      Creating a database on mmapv1 will attempt to allocate a new ns file, and then try to flush the journal manually.
      Flushing the journal requires the flush lock, which invariants that we are not in a WriteUnitOfWork.

      Attachments

        Issue Links

          Activity

            People

              milkie@mongodb.com Eric Milkie
              milkie@mongodb.com Eric Milkie
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: