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

Dropping index during active aggregation operation can crash server

    XMLWordPrintable

    Details

    • Operating System:
      Linux
    • Backport Completed:
    • Steps To Reproduce:
      Hide

      It happened during an index drop, not sure if that's the reason, or something happening concurrently (e.g. index drop & index query?)

      Show
      It happened during an index drop, not sure if that's the reason, or something happening concurrently (e.g. index drop & index query?)

      Description

      Issue Status as of Aug 25, 2014

      ISSUE SUMMARY
      The mongod process may crash if an index being used by an aggregation operation is dropped before the operation finishes.

      USER IMPACT
      The mongod process may crash in this scenario and needs to be restarted.

      WORKAROUNDS
      Do not drop indices that may be in use by aggregation operations.

      AFFECTED VERSIONS
      MongoDB 2.6 production releases up to 2.6.4 are affected by this issue.

      FIX VERSION
      The fix is included in the 2.6.5 production release.

      RESOLUTION DETAILS
      When dropping an index, correctly interrupt any aggregation operations that are using it.

      Original description

      2014-08-20T08:02:57.175+0000 [conn47023] command Tenant_27.$cmd command: mapReduce
      .....
      2014-08-20T10:05:45.661+0000 [repl writer worker 15] CMD: dropIndexes Tenant_27.files
      2014-08-20T10:05:45.879+0000 [repl writer worker 5] CMD: dropIndexes Tenant_27.files
      2014-08-20T10:05:45.993+0000 [repl writer worker 13] CMD: dropIndexes Tenant_27.files
      2014-08-20T10:05:46.059+0000 [repl writer worker 9] CMD: dropIndexes Tenant_27.files
      2014-08-20T10:05:46.091+0000 [conn47023] SEVERE: Invalid access at address: 0xffffffff
      2014-08-20T10:05:46.279+0000 [conn47023] SEVERE: Got signal: 11 (Segmentation fault).
      Backtrace:0x11e6111 0x11e54ee 0x11e55df 0x7fd618e54cb0 0xb72dce 0xb6ed3f 0xb6fda9 0xaa698d 0xd78119 0xd7868f 0xd5927e 0xc6e7c4 0xc6eec5 0xc7e9b3 0xc80046 0xcfc7bb 0x9b3816 0xa2889a 0xa29ce2 0xa2bea6
       /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0x11e6111]
       /usr/bin/mongod() [0x11e54ee]
       /usr/bin/mongod() [0x11e55df]
       /lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7fd618e54cb0]
       /usr/bin/mongod(_ZNK5mongo18BtreeInterfaceImplINS_12BtreeData_V1EE5keyAtEPKNS_17IndexCatalogEntryENS_7DiskLocEi+0x2e) [0xb72dce]
       /usr/bin/mongod(_ZN5mongo16BtreeIndexCursor20isSavedPositionValidEv+0x3f) [0xb6ed3f]
       /usr/bin/mongod(_ZN5mongo16BtreeIndexCursor15restorePositionEv+0x39) [0xb6fda9]
       /usr/bin/mongod(_ZN5mongo9IndexScan16recoverFromYieldEv+0x5d) [0xaa698d]
       /usr/bin/mongod(_ZN5mongo12PlanExecutor12restoreStateEv+0x19) [0xd78119]
       /usr/bin/mongod(_ZN5mongo12PlanExecutor7getNextEPNS_7BSONObjEPNS_7DiskLocE+0x28f) [0xd7868f]
       /usr/bin/mongod(_ZN5mongo15MultiPlanRunner7getNextEPNS_7BSONObjEPNS_7DiskLocE+0x29e) [0xd5927e]
       /usr/bin/mongod(_ZN5mongo20DocumentSourceCursor9loadBatchEv+0x1e4) [0xc6e7c4]
       /usr/bin/mongod(_ZN5mongo20DocumentSourceCursor7getNextEv+0x115) [0xc6eec5]
       /usr/bin/mongod(_ZN5mongo19DocumentSourceGroup8populateEv+0x73) [0xc7e9b3]
       /usr/bin/mongod(_ZN5mongo19DocumentSourceGroup7getNextEv+0x426) [0xc80046]
       /usr/bin/mongod(_ZN5mongo8Pipeline3runERNS_14BSONObjBuilderE+0x8b) [0xcfc7bb]
       /usr/bin/mongod(_ZN5mongo15PipelineCommand3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x526) [0x9b3816]
       /usr/bin/mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x3a) [0xa2889a]
       /usr/bin/mongod(_ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x1042) [0xa29ce2]
       /usr/bin/mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x6c6) [0xa2bea6]

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: