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

copydb with invalid db name crashes mongos

    • Fully Compatible
    • ALL
    • Hide
      var s = new ShardingTest({nodes:2})
      var t = s.getDB('test')
      
      t.adminCommand({
         copydb: 1,
          fromdb: 'a/b.c',
          todb: 'somedb'
      })
      
      Show
      var s = new ShardingTest({nodes:2}) var t = s.getDB( 'test' ) t.adminCommand({ copydb: 1, fromdb: 'a/b.c' , todb: 'somedb' })
    • Sharding B (10/30/15)

      crash affects 3.1.9

      [ShardedClusterFixture:job0:mongos] 2015-10-08T20:20:44.877+0000 I -        [conn5] Invariant failure nsIsDbOnly(dbName) src/mongo/s/catalog/replset/catalog_manager_replica_set.cpp 334
      
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo15printStackTraceERSo+0x32) [0xbc4c32]
      [ShardedClusterFixture:job0:mongos]  mongos(+0x7C3D99) [0xbc3d99]
      [ShardedClusterFixture:job0:mongos]  mongos(+0x7C45A2) [0xbc45a2]
      [ShardedClusterFixture:job0:mongos]  libpthread.so.0(+0x10340) [0x7f5f7e28d340]
      [ShardedClusterFixture:job0:mongos]  libc.so.6(gsignal+0x39) [0x7f5f7deeecc9]
      [ShardedClusterFixture:job0:mongos]  libc.so.6(abort+0x148) [0x7f5f7def20d8]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo15invariantFailedEPKcS1_j+0xCB) [0xb5195b]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo24CatalogManagerReplicaSet11getDatabaseEPNS_16OperationContextERKSs+0x3B3) [0xa14e53]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo24ForwardingCatalogManager11getDatabaseEPNS_16OperationContextERKSs+0x7E) [0x9da71e]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo12CatalogCache11getDatabaseEPNS_16OperationContextERKSs+0xE5) [0x9c4995]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo15dbgrid_pub_cmds9CopyDBCmd3runEPNS_16OperationContextERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderE+0x25B) [0xad996b]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo7Command22execCommandClientBasicEPNS_16OperationContextEPS0_RNS_11ClientBasicEiPKcRNS_7BSONObjERNS_14BSONObjBuilderE+0x701) [0xb00ff1]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo7Command20runAgainstRegisteredEPNS_16OperationContextEPKcRNS_7BSONObjERNS_14BSONObjBuilderEi+0x2D9) [0xb01c99]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo8Strategy15clientCommandOpEPNS_16OperationContextERNS_7RequestE+0x1E6) [0xb0f5c6]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo7Request7processEPNS_16OperationContextEi+0x598) [0xb00448]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo21ShardedMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortE+0x65) [0x645f05]
      [ShardedClusterFixture:job0:mongos]  mongos(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x265) [0xb71c95]
      [ShardedClusterFixture:job0:mongos]  libpthread.so.0(+0x8182) [0x7f5f7e285182]
      [ShardedClusterFixture:job0:mongos]  libc.so.6(clone+0x6D) [0x7f5f7dfb247d]
      

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            robert.guo@mongodb.com Robert Guo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: