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

Server shuts down when compacting collection due to assertion failure in alignedbuilder.cpp

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.0-rc1
    • Affects Version/s: 2.6.0-rc0
    • Component/s: Storage
    • ALL
    • Hide
      function addData(coll, iterations) {
          var arr = [];
      
          for (var i = 1; i <= iterations; i++) {
              arr.push({_id: i, data: new Array(1024 * 500).join('a')});
      
              if (i % 50 === 0) {
                  coll.insert(arr);
                  arr = [];
              }
          }
      }
      
      var myDB = db.getSiblingDB('repro');
      myDB.dropDatabase();
      
      // add some dummy data and compact
      addData(myDB.compactme, 5000);
      myDB.runCommand({compact: 'compactme'});
      
      Show
      function addData(coll, iterations) { var arr = []; for (var i = 1; i <= iterations; i++) { arr.push({_id: i, data: new Array(1024 * 500).join('a')}); if (i % 50 === 0) { coll.insert(arr); arr = []; } } } var myDB = db.getSiblingDB('repro'); myDB.dropDatabase(); // add some dummy data and compact addData(myDB.compactme, 5000); myDB.runCommand({compact: 'compactme'});

      Running compact on a collection with ~2.6 GB of data causes a server shutdown.

      [...snip...]
      2014-02-24T20:54:35.388-0500 [conn2] warning: DR102 too much data written uncommitted 560.517MB
      2014-02-24T20:54:35.388-0500 [conn2] repro.compactme warning assertion failure a <= 256*1024*1024 src/mongo/util/alignedbuilder.cpp 103
      2014-02-24T20:54:35.392-0500 [conn2] repro.compactme 0x100770850 0x10071d4cb 0x10070ab07 0x10070a1a3 0x100227bc6 0x10022764b 0x10021a680 0x100219fb5 0x10021ae3b 0x10021af0f 0x100573c95 0x1005759bb 0x100152f84 0x1001f2665 0x1001f3525 0x1001f47db 0x100434da5 0x1002e5b42 0x10000ed87 0x10072ba81 
       0   mongod                              0x0000000100770850 _ZN5mongo15printStackTraceERSo + 64
       1   mongod                              0x000000010071d4cb _ZN5mongo10logContextEPKc + 155
       2   mongod                              0x000000010070ab07 _ZN5mongo9wassertedEPKcS1_j + 615
       3   mongod                              0x000000010070a1a3 _ZN5mongo14AlignedBuilder14growReallocateEj + 99
       4   mongod                              0x0000000100227bc6 _ZN5mongo3durL21prepBasicWrite_inlockERNS_14AlignedBuilderEPKNS0_11WriteIntentERNS_12RelativePathE + 1174
       5   mongod                              0x000000010022764b _ZN5mongo3dur13PREPLOGBUFFERERNS0_11JSectHeaderERNS_14AlignedBuilderE + 443
       6   mongod                              0x000000010021a680 _ZN5mongo3durL11groupCommitEPNS_4Lock11GlobalWriteE + 1680
       7   mongod                              0x0000000100219fb5 _ZN5mongo3dur11DurableImpl9commitNowEv + 21
       8   mongod                              0x000000010021ae3b _ZN5mongo3dur11DurableImpl16_aCommitIsNeededEv + 635
       9   mongod                              0x000000010021af0f _ZN5mongo3dur11DurableImpl14commitIfNeededEb + 79
       10  mongod                              0x0000000100573c95 _ZN5mongo10Collection14_compactExtentENS_7DiskLocEiRNS_15MultiIndexBlockEPKNS_14CompactOptionsEPNS_12CompactStatsE + 1573
       11  mongod                              0x00000001005759bb _ZN5mongo10Collection7compactEPKNS_14CompactOptionsE + 4075
       12  mongod                              0x0000000100152f84 _ZN5mongo10CompactCmd3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 2516
       13  mongod                              0x00000001001f2665 _ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 37
       14  mongod                              0x00000001001f3525 _ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb + 2629
       15  mongod                              0x00000001001f47db _ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 875
       16  mongod                              0x0000000100434da5 _ZN5mongo11newRunQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ + 741
       17  mongod                              0x00000001002e5b42 _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 1698
       18  mongod                              0x000000010000ed87 _ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE + 183
       19  mongod                              0x000000010072ba81 _ZN5mongo17PortMessageServer17handleIncomingMsgEPv + 913
      2014-02-24T20:54:35.392-0500 [conn2] repro.compactme Assertion failure a <= 512*1024*1024 src/mongo/util/alignedbuilder.cpp 104
      2014-02-24T20:54:35.396-0500 [conn2] repro.compactme 0x100770850 0x10071d4cb 0x10070ad43 0x10070a1c3 0x100227bc6 0x10022764b 0x10021a680 0x100219fb5 0x10021ae3b 0x10021af0f 0x100573c95 0x1005759bb 0x100152f84 0x1001f2665 0x1001f3525 0x1001f47db 0x100434da5 0x1002e5b42 0x10000ed87 0x10072ba81 
       0   mongod                              0x0000000100770850 _ZN5mongo15printStackTraceERSo + 64
       1   mongod                              0x000000010071d4cb _ZN5mongo10logContextEPKc + 155
       2   mongod                              0x000000010070ad43 _ZN5mongo12verifyFailedEPKcS1_j + 435
       3   mongod                              0x000000010070a1c3 _ZN5mongo14AlignedBuilder14growReallocateEj + 131
       4   mongod                              0x0000000100227bc6 _ZN5mongo3durL21prepBasicWrite_inlockERNS_14AlignedBuilderEPKNS0_11WriteIntentERNS_12RelativePathE + 1174
       5   mongod                              0x000000010022764b _ZN5mongo3dur13PREPLOGBUFFERERNS0_11JSectHeaderERNS_14AlignedBuilderE + 443
       6   mongod                              0x000000010021a680 _ZN5mongo3durL11groupCommitEPNS_4Lock11GlobalWriteE + 1680
       7   mongod                              0x0000000100219fb5 _ZN5mongo3dur11DurableImpl9commitNowEv + 21
       8   mongod                              0x000000010021ae3b _ZN5mongo3dur11DurableImpl16_aCommitIsNeededEv + 635
       9   mongod                              0x000000010021af0f _ZN5mongo3dur11DurableImpl14commitIfNeededEb + 79
       10  mongod                              0x0000000100573c95 _ZN5mongo10Collection14_compactExtentENS_7DiskLocEiRNS_15MultiIndexBlockEPKNS_14CompactOptionsEPNS_12CompactStatsE + 1573
       11  mongod                              0x00000001005759bb _ZN5mongo10Collection7compactEPKNS_14CompactOptionsE + 4075
       12  mongod                              0x0000000100152f84 _ZN5mongo10CompactCmd3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 2516
       13  mongod                              0x00000001001f2665 _ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 37
       14  mongod                              0x00000001001f3525 _ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb + 2629
       15  mongod                              0x00000001001f47db _ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 875
       16  mongod                              0x0000000100434da5 _ZN5mongo11newRunQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ + 741
       17  mongod                              0x00000001002e5b42 _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 1698
       18  mongod                              0x000000010000ed87 _ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE + 183
       19  mongod                              0x000000010072ba81 _ZN5mongo17PortMessageServer17handleIncomingMsgEPv + 913
      2014-02-24T20:54:35.396-0500 [conn2] dbexception in groupCommit causing immediate shutdown: 0 assertion src/mongo/util/alignedbuilder.cpp:104
      2014-02-24T20:54:35.396-0500 [conn2] SEVERE: gc1
      Got signal: 6 (Abort trap: 6).
      Backtrace:
      0x100770850 0x100007466 0x7fff906a390a 0 0x7fff906faf61 0x1002e5482 0x10021a1bd 0x100219fb5 0x10021ae3b 0x10021af0f 0x100573c95 0x1005759bb 0x100152f84 0x1001f2665 0x1001f3525 0x1001f47db 0x100434da5 0x1002e5b42 0x10000ed87 0x10072ba81 
       0   mongod                              0x0000000100770850 _ZN5mongo15printStackTraceERSo + 64
       1   mongod                              0x0000000100007466 _ZN5mongo10abruptQuitEi + 422
       2   libsystem_c.dylib                   0x00007fff906a390a _sigtramp + 26
       3   ???                                 0x0000000000000000 0x0 + 0
       4   libsystem_c.dylib                   0x00007fff906faf61 abort + 143
       5   mongod                              0x00000001002e5482 _ZN5mongo10mongoAbortEPKc + 146
       6   mongod                              0x000000010021a1bd _ZN5mongo3durL11groupCommitEPNS_4Lock11GlobalWriteE + 461
       7   mongod                              0x0000000100219fb5 _ZN5mongo3dur11DurableImpl9commitNowEv + 21
       8   mongod                              0x000000010021ae3b _ZN5mongo3dur11DurableImpl16_aCommitIsNeededEv + 635
       9   mongod                              0x000000010021af0f _ZN5mongo3dur11DurableImpl14commitIfNeededEb + 79
       10  mongod                              0x0000000100573c95 _ZN5mongo10Collection14_compactExtentENS_7DiskLocEiRNS_15MultiIndexBlockEPKNS_14CompactOptionsEPNS_12CompactStatsE + 1573
       11  mongod                              0x00000001005759bb _ZN5mongo10Collection7compactEPKNS_14CompactOptionsE + 4075
       12  mongod                              0x0000000100152f84 _ZN5mongo10CompactCmd3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 2516
       13  mongod                              0x00000001001f2665 _ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 37
       14  mongod                              0x00000001001f3525 _ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb + 2629
       15  mongod                              0x00000001001f47db _ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 875
       16  mongod                              0x0000000100434da5 _ZN5mongo11newRunQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ + 741
       17  mongod                              0x00000001002e5b42 _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 1698
       18  mongod                              0x000000010000ed87 _ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE + 183
       19  mongod                              0x000000010072ba81 _ZN5mongo17PortMessageServer17handleIncomingMsgEPv + 913
      

      Version: ce97325da8b0494b813c2777283fed532adda9db

        1. server_12876_log.txt
          47 kB
          Kamran K.
        2. server_12876_v249_log.txt
          15 kB
          Kamran K.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: