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

Inserting $id will crash Secondaries

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.4.14
    • Fix Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Operating System:
      ALL

      Description

      The following insert will crash all Secondaries in a replica set (in 2.4):

      db.foo.insert( {_id : { $id : "a" } } )
      

      The following stack is thrown:

      Fri Jun 12 09:06:05.801 [repl writer worker 1] ERROR: writer worker caught exception: invalid operator: $id on: { ts: Timestamp 1434063965000|1, h: -5973081331456802799, v: 2, op: "i", ns: "test.foo", o: { _id: { $id: "a" } } }
      Fri Jun 12 09:06:05.801 [repl writer worker 1]   Fatal Assertion 16360
      0x10045236b 0x10042b587 0x10034162f 0x100432998 0x100484f05 0x7fff8c8db268 0x7fff8c8db1e5 0x7fff8c8d941d
       0   mongod                              0x000000010045236b _ZN5mongo15printStackTraceERSo + 43
       1   mongod                              0x000000010042b587 _ZN5mongo13fassertFailedEi + 151
       2   mongod                              0x000000010034162f _ZN5mongo7replset14multiSyncApplyERKSt6vectorINS_7BSONObjESaIS2_EEPNS0_8SyncTailE + 271
       3   mongod                              0x0000000100432998 _ZN5mongo10threadpool6Worker4loopEv + 138
       4   mongod                              0x0000000100484f05 thread_proxy + 229
       5   libsystem_pthread.dylib             0x00007fff8c8db268 _pthread_body + 131
       6   libsystem_pthread.dylib             0x00007fff8c8db1e5 _pthread_body + 0
       7   libsystem_pthread.dylib             0x00007fff8c8d941d thread_start + 13
      Fri Jun 12 09:06:05.805 [repl writer worker 1]
       
      ***aborting after fassert() failure
       
       
      Fri Jun 12 09:06:05.805 Got signal: 6 (Abort trap: 6).
       
      Fri Jun 12 09:06:05.807 Backtrace:
      0x10045236b 0x100001951 0x7fff8ed4bf1a 0x5 0x7fff8472db53 0x10042b5c5 0x10034162f 0x100432998 0x100484f05 0x7fff8c8db268 0x7fff8c8db1e5 0x7fff8c8d941d
       0   mongod                              0x000000010045236b _ZN5mongo15printStackTraceERSo + 43
       1   mongod                              0x0000000100001951 _ZN5mongo10abruptQuitEi + 225
       2   libsystem_platform.dylib            0x00007fff8ed4bf1a _sigtramp + 26
       3   ???                                 0x0000000000000005 0x0 + 5
       4   libsystem_c.dylib                   0x00007fff8472db53 abort + 129
       5   mongod                              0x000000010042b5c5 _ZN5mongo13fassertFailedEi + 213
       6   mongod                              0x000000010034162f _ZN5mongo7replset14multiSyncApplyERKSt6vectorINS_7BSONObjESaIS2_EEPNS0_8SyncTailE + 271
       7   mongod                              0x0000000100432998 _ZN5mongo10threadpool6Worker4loopEv + 138
       8   mongod                              0x0000000100484f05 thread_proxy + 229
       9   libsystem_pthread.dylib             0x00007fff8c8db268 _pthread_body + 131
       10  libsystem_pthread.dylib             0x00007fff8c8db1e5 _pthread_body + 0
       11  libsystem_pthread.dylib             0x00007fff8c8d941d thread_start + 13
      

      2.6 does not allow the insert, and will not crash

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ramon.fernandez Ramon Fernandez Marina
              Reporter:
              andre.defrere Andre de Frere
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: