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

Suppress stack trace on replication errors

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.5.0
    • Affects Version/s: 2.2.0, 2.2.2
    • Component/s: Replication
    • ALL
    • Hide

      1) Shutdown down a secondary
      2) Start it without --replSet and another port
      3) Create unique index on secondary
      4) Restart as replSet member
      5) Insert a document in the primary which would duplicate a key in the index in the primary

      eg.
      //step 3
      db.test.ensureIndex(

      {"a": 1}

      ,

      {"unique": true}

      )
      db.test.insert(

      {a:1}

      )
      //step 4
      db.test.insert(

      {a:1}

      )

      Show
      1) Shutdown down a secondary 2) Start it without --replSet and another port 3) Create unique index on secondary 4) Restart as replSet member 5) Insert a document in the primary which would duplicate a key in the index in the primary eg. //step 3 db.test.ensureIndex( {"a": 1} , {"unique": true} ) db.test.insert( {a:1} ) //step 4 db.test.insert( {a:1} )

      As mentioned in the comments in SERVER-6228, this should be handled via a clean shutdown or logging the assertion.

      Tue Dec 18 12:05:54 [initandlisten] MongoDB starting : pid=6992 port=40002 dbpath=/Users/gianfranco/data/replset/node2 64-bit host=Gianfranco-10gen.local
      Tue Dec 18 12:05:54 [initandlisten] db version v2.2.2, pdfile version 4.5
      Tue Dec 18 12:05:54 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
      Tue Dec 18 12:05:54 [initandlisten] build info: Darwin bs-osx-106-x86-64-1.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_49
      Tue Dec 18 12:05:54 [initandlisten] options: { dbpath: "/Users/gianfranco/data/replset/node2", port: 40002, replSet: "myapp" }
      Tue Dec 18 12:05:54 [initandlisten] journal dir=/Users/gianfranco/data/replset/node2/journal
      Tue Dec 18 12:05:54 [initandlisten] recover : no journal files present, no recovery needed
      Tue Dec 18 12:05:54 [websvr] admin web console waiting for connections on port 41002
      ...
      Tue Dec 18 12:06:18 [repl writer worker 1] ERROR: writer worker caught exception: E11000 duplicate key error index: test.test.$a_1  dup key: { : 1.0 } on: { ts: Timestamp 1355832378000|1, h: 6182722510085346418, v: 2, op: "i", ns: "test.test", o: { _id: ObjectId('50d05c3a8a41536396de58f9'), a: 1.0 } }
      Tue Dec 18 12:06:18 [repl writer worker 1]   Fatal Assertion 16360
      0x10059544b 0x100557dc5 0x10043e700 0x1005688ed 0x1005e08e3 0x7fff8e926742 0x7fff8e913181 
       0   mongod                              0x000000010059544b _ZN5mongo15printStackTraceERSo + 43
       1   mongod                              0x0000000100557dc5 _ZN5mongo13fassertFailedEi + 165
       2   mongod                              0x000000010043e700 _ZN5mongo7replset14multiSyncApplyERKSt6vectorINS_7BSONObjESaIS2_EEPNS0_8SyncTailE + 336
       3   mongod                              0x00000001005688ed _ZN5mongo10threadpool6Worker4loopEv + 621
       4   mongod                              0x00000001005e08e3 thread_proxy + 163
       5   libsystem_c.dylib                   0x00007fff8e926742 _pthread_start + 327
       6   libsystem_c.dylib                   0x00007fff8e913181 thread_start + 13
      Tue Dec 18 12:06:18 [repl writer worker 1] 
      
      ***aborting after fassert() failure
      
      
      Tue Dec 18 12:06:18 Got signal: 6 (Abort trap: 6).
      
      Tue Dec 18 12:06:18 Backtrace:
      0x10059544b 0x10000197b 0x7fff8e9148ea 0x105c98970 0x7fff8e96bdce 0x100557e00 0x10043e700 0x1005688ed 0x1005e08e3 0x7fff8e926742 0x7fff8e913181 
       0   mongod                              0x000000010059544b _ZN5mongo15printStackTraceERSo + 43
       1   mongod                              0x000000010000197b _ZN5mongo10abruptQuitEi + 987
       2   libsystem_c.dylib                   0x00007fff8e9148ea _sigtramp + 26
       3   ???                                 0x0000000105c98970 0x0 + 4392061296
       4   libsystem_c.dylib                   0x00007fff8e96bdce abort + 143
       5   mongod                              0x0000000100557e00 _ZN5mongo13fassertFailedEi + 224
       6   mongod                              0x000000010043e700 _ZN5mongo7replset14multiSyncApplyERKSt6vectorINS_7BSONObjESaIS2_EEPNS0_8SyncTailE + 336
       7   mongod                              0x00000001005688ed _ZN5mongo10threadpool6Worker4loopEv + 621
       8   mongod                              0x00000001005e08e3 thread_proxy + 163
       9   libsystem_c.dylib                   0x00007fff8e926742 _pthread_start + 327
       10  libsystem_c.dylib                   0x00007fff8e913181 thread_start + 13
      

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            gianfranco Gianfranco Palumbo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: