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

db.system.indexes.dropIndexes() crashes mongod

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 2.6.1, 2.6.4
    • Fix Version/s: None
    • Component/s: Indexing
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      Somehow we created by accident an index in "system.indexes"
      Due to this our replica slave fails to sync, when it trys to create this index.

      2014-08-22T06:59:08.788+0200 [rsSync] ERROR: error creating index when cloning spec: { key: { target: 1, relation: 1, source: 1 }, unique: true, ns: "database1.system.indexes", background: 1, name: "target_1_relation_1_sou
      rce_1" } error: CannotCreateIndex cannot create indexes on the system.indexes collection
      

      db.system.indexes.getIndexSpecs()
      [
          {
              "v" : 1,
              "key" : {
                  "target" : NumberLong(1),
                  "relation" : NumberLong(1),
                  "source" : NumberLong(1)
              },
              "unique" : true,
              "ns" : "database1.system.indexes",
              "background" : NumberLong(1),
              "name" : "target_1_relation_1_source_1"
          }
      ]
      

      To get rid of this index we try to drop it via dropIndex or remove. Both don't work. So we used db.system.indexes.dropIndexes() to get rid of it. This crashes mongod.

      2014-08-22T10:59:48.388+0200 [conn156] CMD: dropIndexes database1.system.indexes
      2014-08-22T10:59:48.394+0200 [conn156] ERROR: About to fassert -  numIndexesTotal(): 0 numSystemIndexesEntries: 1 _entries.size(): 0 indexNamesToDrop: 0 haveIdIndex: 0
      2014-08-22T10:59:48.394+0200 [conn156] database1 Fatal Assertion 17328
      2014-08-22T10:59:48.401+0200 [conn156] database1 0x11c0e91 0x1163109 0x114576d 0x8d714d 0x93c027 0xa1e85a 0xa20171 0xa21086 0xd4dae7 0xb97322 0xb99902 0x76b6af 0x117720b 0x7f6f85cb59ca 0x7f6f8505c1cd
       /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0x11c0e91]
       /usr/bin/mongod(_ZN5mongo10logContextEPKc+0x159) [0x1163109]
       /usr/bin/mongod(_ZN5mongo13fassertFailedEi+0xcd) [0x114576d]
       /usr/bin/mongod(_ZN5mongo12IndexCatalog14dropAllIndexesEb+0xffd) [0x8d714d]
       /usr/bin/mongod(_ZN5mongo14CmdDropIndexes3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x837) [0x93c027]
       /usr/bin/mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x3a) [0xa1e85a]
       /usr/bin/mongod(_ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x1601) [0xa20171]
       /usr/bin/mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x6c6) [0xa21086]
       /usr/bin/mongod(_ZN5mongo11newRunQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x2307) [0xd4dae7]
       /usr/bin/mongod() [0xb97322]
       /usr/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x442) [0xb99902]
       /usr/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x9f) [0x76b6af]
       /usr/bin/mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x4fb) [0x117720b]
       /lib/libpthread.so.0(+0x69ca) [0x7f6f85cb59ca]
       /lib/libc.so.6(clone+0x6d) [0x7f6f8505c1cd]
      2014-08-22T10:59:48.401+0200 [conn156]
       
      ***aborting after fassert() failure
       
       
      2014-08-22T10:59:48.407+0200 [conn156] SEVERE: Got signal: 6 (Aborted).
      Backtrace:0x11c0e91 0x11c026e 0x7f6f84fa5be0 0x7f6f84fa5b65 0x7f6f84fa96b0 0x11457da 0x8d714d 0x93c027 0xa1e85a 0xa20171 0xa21086 0xd4dae7 0xb97322 0xb99902 0x76b6af 0x117720b 0x7f6f85cb59ca 0x7f6f8505c1cd
       /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0x11c0e91]
       /usr/bin/mongod() [0x11c026e]
       /lib/libc.so.6(+0x33be0) [0x7f6f84fa5be0]
       /lib/libc.so.6(gsignal+0x35) [0x7f6f84fa5b65]
       /lib/libc.so.6(abort+0x180) [0x7f6f84fa96b0]
       /usr/bin/mongod(_ZN5mongo13fassertFailedEi+0x13a) [0x11457da]
       /usr/bin/mongod(_ZN5mongo12IndexCatalog14dropAllIndexesEb+0xffd) [0x8d714d]
       /usr/bin/mongod(_ZN5mongo14CmdDropIndexes3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x837) [0x93c027]
       /usr/bin/mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x3a) [0xa1e85a]
       /usr/bin/mongod(_ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x1601) [0xa20171]
       /usr/bin/mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x6c6) [0xa21086]
       /usr/bin/mongod(_ZN5mongo11newRunQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x2307) [0xd4dae7]
       /usr/bin/mongod() [0xb97322]
       /usr/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x442) [0xb99902]
       /usr/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x9f) [0x76b6af]
       /usr/bin/mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x4fb) [0x117720b]
       /lib/libpthread.so.0(+0x69ca) [0x7f6f85cb59ca]
       /lib/libc.so.6(clone+0x6d) [0x7f6f8505c1cd]
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              charlie.swanson Charlie Swanson
              Reporter:
              steffen Steffen
              Participants:
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: