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

Inserts that create a collection can segfault if there is an ill-timed WriteConflictException

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.8.0-rc5
    • 3.0.0-rc7
    • Write Ops
    • None
    • Fully Compatible
    • ALL

    Description

      The below stack trace occurs, indicating that collection creation failed but the "state lock" in the write command insert state object was only partially released.

      #1  0x000000000118596e in mongo::StringData::StringData (this=0x7ffff7ecd8e0, s=...) at src/mongo/base/string_data.h:77
      #2  0x000000000135da37 in mongo::singleInsert (txn=0x7ffff7ed0790, docToInsert=..., collection=0x0, result=0x7ffff7ecd9d0)
          at src/mongo/db/commands/write_commands/batch_executor.cpp:1133
      #3  0x000000000135d4c1 in mongo::insertOne (state=0x7ffff7ecee60, result=0x7ffff7ecd9d0) at src/mongo/db/commands/write_commands/batch_executor.cpp:1068
      #4  0x000000000135d8b5 in mongo::WriteBatchExecutor::execOneInsert (this=0x7ffff7ecf270, state=0x7ffff7ecee60, error=0x7ffff7ecee38)
          at src/mongo/db/commands/write_commands/batch_executor.cpp:1108
      #5  0x000000000135c08c in mongo::WriteBatchExecutor::execInserts (this=0x7ffff7ecf270, request=..., errors=0x7ffff7ecf0f0)
          at src/mongo/db/commands/write_commands/batch_executor.cpp:882
      #6  0x000000000135bac9 in mongo::WriteBatchExecutor::bulkExecute (this=0x7ffff7ecf270, request=..., upsertedIds=0x7ffff7ecf110, errors=0x7ffff7ecf0f0)
          at src/mongo/db/commands/write_commands/batch_executor.cpp:764
      #7  0x000000000135980f in mongo::WriteBatchExecutor::executeBatch (this=0x7ffff7ecf270, request=..., response=0x7ffff7ecf2b0)
          at src/mongo/db/commands/write_commands/batch_executor.cpp:272
      #8  0x0000000001363b16 in mongo::WriteCmd::run (this=0x7ffff62a66e0, txn=0x7ffff7ed0790, dbName=..., cmdObj=..., options=0, errMsg=..., result=..., fromRepl=false)
          at src/mongo/db/commands/write_commands/write_commands.cpp:147
      #9  0x0000000001383763 in mongo::_execCommand (txn=0x7ffff7ed0790, c=0x7ffff62a66e0, dbname=..., cmdObj=..., queryOptions=0, errmsg=..., result=..., fromRepl=false)
          at src/mongo/db/dbcommands.cpp:1267

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: