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

Server hangs on map reduce after upgrade

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 3.0.2
    • Fix Version/s: None
    • Component/s: MapReduce
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      My map/reduce looks like (sorry for formatting, it's a scala-string):

        val function =
          """
           (function() {
            |    var mapFunction = function() {
            |                           this.count = 1;
            |                           emit(this.inputText, {count: 1, result: this.result, entries: [this]});
            |                       };
            |
            |    var reduceFunction = function(text, elems) {
            |                            var totalCount = 0;
            |                            var allEntries = [];
            |                            for (var idx = 0; idx < elems.length; idx++) {
            |                                var elem = elems[idx];
            |                                totalCount += elem.count;
            |                                allEntries = allEntries.concat(elem.entries);
            |                             }
            |                            return {count: totalCount, result: allEntries[0].result, entries: allEntries};
            |                          };
            |
            |    var outputcolName = 'ordered_logentries';
            |
            |    db[outputcolName].ensureIndex({ "value.count" : 1});
            |    db[outputcolName].ensureIndex({ "value.inputText" : 1});
            |    db[outputcolName].ensureIndex({ "value.result" : 1});
            |
            |      db.logentrys.mapReduce(
            |                             mapFunction,
            |                             reduceFunction,
            |                             {
            |                             out: outputcolName }
            |                           );
            |
            |})();
            |
          """.stripMargin
      

      Show
      My map/reduce looks like (sorry for formatting, it's a scala-string): val function = "" " (function() { | var mapFunction = function() { | this.count = 1; | emit(this.inputText, {count: 1, result: this.result, entries: [this]}); | }; | | var reduceFunction = function(text, elems) { | var totalCount = 0; | var allEntries = []; | for (var idx = 0; idx < elems.length; idx++) { | var elem = elems[idx]; | totalCount += elem.count; | allEntries = allEntries.concat(elem.entries); | } | return {count: totalCount, result: allEntries[0].result, entries: allEntries}; | }; | | var outputcolName = 'ordered_logentries'; | | db[outputcolName].ensureIndex({ " value.count " : 1}); | db[outputcolName].ensureIndex({ " value.inputText " : 1}); | db[outputcolName].ensureIndex({ " value.result " : 1}); | | db.logentrys.mapReduce( | mapFunction, | reduceFunction, | { | out: outputcolName } | ); | |})(); | " "" .stripMargin

      Description

      Just upgraded from Mongo 2.4 something to 3.0.2 via homebrew on mac. I have a batched map/reduce that now hangs the server. Log:

      2015-04-17T23:11:24.802+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:56212 #37 (37 connections now open)
      2015-04-17T23:11:55.970+0200 I COMMAND  [conn31] CMD: drop kostbevakningen.tmp.mr.logentrys_0
      2015-04-17T23:11:55.976+0200 I -        [conn31] Invariant failure !_txn->lockState()->isLocked() src/mongo/db/commands/mr.cpp 1166
      2015-04-17T23:11:55.981+0200 I CONTROL  [conn31] 
       0x10260523a 0x1025b30be 0x10259fc46 0x101ff8d9b 0x101ffcd58 0x10205b5ea 0x10205c769 0x10205d7b8 0x10224343b 0x102141b19 0x10206d8b8 0x10206da82 0x101ed3673 0x101ebb583 0x10206dc43 0x1025912dd 0x102584672 0x20edc0247719 0x20edc0243f82
      ----- BEGIN BACKTRACE -----
      {"backtrace":[{"b":"101E68000","o":"79D23A"},{"b":"101E68000","o":"74B0BE"},{"b":"101E68000","o":"737C46"},{"b":"101E68000","o":"190D9B"},{"b":"101E68000","o":"194D58"},{"b":"101E68000","o":"1F35EA"},{"b":"101E68000","o":"1F4769"},{"b":"101E68000","o":"1F57B8"},{"b":"101E68000","o":"3DB43B"},{"b":"101E68000","o":"2D9B19"},{"b":"101E68000","o":"2058B8"},{"b":"101E68000","o":"205A82"},{"b":"101E68000","o":"6B673"},{"b":"101E68000","o":"53583"},{"b":"101E68000","o":"205C43"},{"b":"101E68000","o":"7292DD"},{"b":"101E68000","o":"71C672"},{"b":"0","o":"20EDC0247719"},{"b":"0","o":"20EDC0243F82"}],"processInfo":{ "mongodbVersion" : "3.0.2", "gitVersion" : "nogitversion", "uname" : { "sysname" : "Darwin", "release" : "14.1.0", "version" : "Darwin Kernel Version 14.1.0: Thu Feb 26 19:26:47 PST 2015; root:xnu-2782.10.73~1/RELEASE_X86_64", "machine" : "x86_64" }, "somap" : [ { "path" : "/usr/local/bin/mongod", "machType" : 2, "b" : "101E68000", "buildId" : "1D0C279CDA90336CB86B58246B683F21" }, { "path" : "/usr/lib/libSystem.B.dylib", "machType" : 6, "b" : "7FFF8F256000", "buildId" : "90B107BCFF7432CCB1CF4E02F544D957" }, { "path" : "/usr/lib/libc++.1.dylib", "machType" : 6, "b" : "7FFF95F01000", "buildId" : "1B9530FD989B3174BB1CBDC159501710" }, { "path" : "/usr/lib/system/libcache.dylib", "machType" : 6, "b" : "7FFF92AFD000", "buildId" : "45E9A2E799C436B2BEE30C4E11614AD1" }, { "path" : "/usr/lib/system/libcommonCrypto.dylib", "machType" : 6, "b" : "7FFF95D40000", "buildId" : "D381EBC669D831D380845A80A32CB748" }, { "path" : "/usr/lib/system/libcompiler_rt.dylib", "machType" : 6, "b" : "7FFF8FA7F000", "buildId" : "BF8FC133EE103DA69B9092039E28678F" }, { "path" : "/usr/lib/system/libcopyfile.dylib", "machType" : 6, "b" : "7FFF9B1E9000", "buildId" : "0C68D3A6ACDD3EF3991ACC82C32AB836" }, { "path" : "/usr/lib/system/libcorecrypto.dylib", "machType" : 6, "b" : "7FFF8FA08000", "buildId" : "E178980139853949B7366B3378873301" }, { "path" : "/usr/lib/system/libdispatch.dylib", "machType" : 6, "b" : "7FFF95DD9000", "buildId" : "502CF32B669B3709886208188225E4F0" }, { "path" : "/usr/lib/system/libdyld.dylib", "machType" : 6, "b" : "7FFF9AE5D000", "buildId" : "4E33E416F1D83598B8CC6863E2ECD0E6" }, { "path" : "/usr/lib/system/libkeymgr.dylib", "machType" : 6, "b" : "7FFF97729000", "buildId" : "77845842DE703CC5BD01C3D14227CED5" }, { "path" : "/usr/lib/system/liblaunch.dylib", "machType" : 6, "b" : "7FFF92ADD000", "buildId" : "DFCDEBDF82473DC79879E7E497DDA4B4" }, { "path" : "/usr/lib/system/libmacho.dylib", "machType" : 6, "b" : "7FFF9A0CE000", "buildId" : "126CA2EDDE91308F8881B9DAEC3C63B6" }, { "path" : "/usr/lib/system/libquarantine.dylib", "machType" : 6, "b" : "7FFF9BBF9000", "buildId" : "DC0416272D92361CBABFA869A5C72293" }, { "path" : "/usr/lib/system/libremovefile.dylib", "machType" : 6, "b" : "7FFF9525E000", "buildId" : "3485B5F46CE83C628DFD8736ED6E8531" }, { "path" : "/usr/lib/system/libsystem_asl.dylib", "machType" : 6, "b" : "7FFF92AE6000", "buildId" : "F153AC5B0542356E88C820A62CA704E2" }, { "path" : "/usr/lib/system/libsystem_blocks.dylib", "machType" : 6, "b" : "7FFF9128D000", "buildId" : "9615D10AFCA73BE4AA1A1B195DACE1A1" }, { "path" : "/usr/lib/system/libsystem_c.dylib", "machType" : 6, "b" : "7FFF93BE1000", "buildId" : "199ED5EB77A13D43AA5181779CE0A742" }, { "path" : "/usr/lib/system/libsystem_configuration.dylib", "machType" : 6, "b" : "7FFF985FC000", "buildId" : "5E14864E089A3D8485A4980B776427A8" }, { "path" : "/usr/lib/system/libsystem_coreservices.dylib", "machType" : 6, "b" : "7FFF99849000", "buildId" : "41B7C5785A5331C8A96FC73E030B0938" }, { "path" : "/usr/lib/system/libsystem_coretls.dylib", "machType" : 6, "b" : "7FFF997CE000", "buildId" : "3EAED90A7AA0323CA52BE16477981D59" }, { "path" : "/usr/lib/system/libsystem_dnssd.dylib", "machType" : 6, "b" : "7FFF915AB000", "buildId" : "62B70ECAE40D3C63896E7F00EC386DDB" }, { "path" : "/usr/lib/system/libsystem_info.dylib", "machType" : 6, "b" : "7FFF97333000", "buildId" : "B85A85D585303A93B0C34DEC41F79478" }, { "path" : "/usr/lib/system/libsystem_kernel.dylib", "machType" : 6, "b" : "7FFF97315000", "buildId" : "97CD7ACDEA0C3434BEFCFCD013D6BB73" }, { "path" : "/usr/lib/system/libsystem_m.dylib", "machType" : 6, "b" : "7FFF8F225000", "buildId" : "1E12AB456D9636D0A226F24D9FB0D9D6" }, { "path" : "/usr/lib/system/libsystem_malloc.dylib", "machType" : 6, "b" : "7FFF986CC000", "buildId" : "19BCC25757173502A71F95D65AFA861B" }, { "path" : "/usr/lib/system/libsystem_network.dylib", "machType" : 6, "b" : "7FFF977D8000", "buildId" : "2EC3A005473F3C36A665F88B5BACC7F0" }, { "path" : "/usr/lib/system/libsystem_networkextension.dylib", "machType" : 6, "b" : "7FFF98938000", "buildId" : "29AB225BD7FB30ED960065D44B9A9442" }, { "path" : "/usr/lib/system/libsystem_notify.dylib", "machType" : 6, "b" : "7FFF98904000", "buildId" : "61147800F3203DAA850CBADF33855F29" }, { "path" : "/usr/lib/system/libsystem_platform.dylib", "machType" : 6, "b" : "7FFF90487000", "buildId" : "64E34079D7123D669CE2418624A5C040" }, { "path" : "/usr/lib/system/libsystem_pthread.dylib", "machType" : 6, "b" : "7FFF9AEDA000", "buildId" : "3103AA7F3BAE3673964947FFD7E15C97" }, { "path" : "/usr/lib/system/libsystem_sandbox.dylib", "machType" : 6, "b" : "7FFF983E3000", "buildId" : "95312E09DA28324AA084F3E574D0210E" }, { "path" : "/usr/lib/system/libsystem_secinit.dylib", "machType" : 6, "b" : "7FFF96B51000", "buildId" : "581DAD0F6B633A48B63B917AF799ABAA" }, { "path" : "/usr/lib/system/libsystem_stats.dylib", "machType" : 6, "b" : "7FFF90470000", "buildId" : "9B8CCF24DDDB399A92374BEC225D2E8C" }, { "path" : "/usr/lib/system/libsystem_trace.dylib", "machType" : 6, "b" : "7FFF8D71D000", "buildId" : "A9E6B7D8C3273742AC5486C94218B1DF" }, { "path" : "/usr/lib/system/libunc.dylib", "machType" : 6, "b" : "7FFF8E210000", "buildId" : "5676F7EAC1DF329FB006D2C3022B7D70" }, { "path" : "/usr/lib/system/libunwind.dylib", "machType" : 6, "b" : "7FFF8F72D000", "buildId" : "BE7E51A0B6EA3A549CCA9D88F683A6D6" }, { "path" : "/usr/lib/system/libxpc.dylib", "machType" : 6, "b" : "7FFF915B4000", "buildId" : "876216DCD5D3381E8AF949AE464E5107" }, { "path" : "/usr/lib/libobjc.A.dylib", "machType" : 6, "b" : "7FFF9025A000", "buildId" : "759E155DBC423D4E869B6F57D477177C" }, { "path" : "/usr/lib/libauto.dylib", "machType" : 6, "b" : "7FFF97EE2000", "buildId" : "A260789BD4D8316A9490254767B8A5F1" }, { "path" : "/usr/lib/libc++abi.dylib", "machType" : 6, "b" : "7FFF9893F000", "buildId" : "88A22A0F87C63002BFBAAC0F2808B8B9" }, { "path" : "/usr/lib/libDiagnosticMessagesClient.dylib", "machType" : 6, "b" : "7FFF95B09000", "buildId" : "2EE8E4365CDC34C599595BA218D507FB" } ] }}
       mongod(_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE+0x3A) [0x10260523a]
       mongod(_ZN5mongo10logContextEPKc+0x10E) [0x1025b30be]
       mongod(_ZN5mongo15invariantFailedEPKcS1_j+0x1A6) [0x10259fc46]
       mongod(_ZN5mongo2mr5State35reduceAndSpillInMemoryStateIfNeededEv+0x80B) [0x101ff8d9b]
       mongod(_ZN5mongo2mr16MapReduceCommand3runEPNS_16OperationContextERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERNS_7BSONObjEiRSA_RNS_14BSONObjBuilderEb+0xA88) [0x101ffcd58]
       mongod(_ZN5mongo12_execCommandEPNS_16OperationContextEPNS_7CommandERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERNS_7BSONObjEiRSA_RNS_14BSONObjBuilderEb+0x3A) [0x10205b5ea]
       mongod(_ZN5mongo7Command11execCommandEPNS_16OperationContextEPS0_iPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0xC89) [0x10205c769]
       mongod(_ZN5mongo12_runCommandsEPNS_16OperationContextEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x738) [0x10205d7b8]
       mongod(_ZN5mongo8runQueryEPNS_16OperationContextERNS_7MessageERNS_12QueryMessageERKNS_15NamespaceStringERNS_5CurOpES3_+0xEDB) [0x10224343b]
       mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0xA89) [0x102141b19]
       mongod(_ZN5mongo14DBDirectClient4callERNS_7MessageES2_bPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE+0xA8) [0x10206d8b8]
       mongod(_ZThn152_N5mongo14DBDirectClient4callERNS_7MessageES2_bPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE+0x12) [0x10206da82]
       mongod(_ZN5mongo14DBClientCursor4initEv+0x93) [0x101ed3673]
       mongod(_ZN5mongo12DBClientBase5queryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_5QueryEiiPKNS_7BSONObjEii+0xA3) [0x101ebb583]
       mongod(_ZN5mongo14DBDirectClient5queryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_5QueryEiiPKNS_7BSONObjEii+0x53) [0x10206dc43]
       mongod(_ZN5mongo9mongoFindEPNS_7V8ScopeERKN2v89ArgumentsE+0x2CD) [0x1025912dd]
       mongod(_ZN5mongo7V8Scope10v8CallbackERKN2v89ArgumentsE+0x52) [0x102584672]
       ??? [0x20edc0247719]
       ??? [0x20edc0243f82]
      -----  END BACKTRACE  -----
      2015-04-17T23:11:55.981+0200 I -        [conn31] 
       
      ***aborting after invariant() failure
      

      Worked before.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: