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

Assertion failure when trying to auth on replset connection before user is replicated (auth_repl.js)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.1
    • Affects Version/s: 2.5.0
    • Component/s: Internal Client
    • Labels:
    • Environment:
      buildbot: OS X 10.5 64-bit
    • ALL

      Summary of bug:

      When using the C++ driver (or the mongo shell, which uses the driver) to authenticate on a replica set connection, an assertion will fail when the driver tries to authenticate the user before it gets replicated to the secondary.

      Buildbot error:

      http://buildbot.mongodb.org/builders/OS%20X%2010.5%2064-bit/builds/5556
      http://buildbot.mongodb.org/builders/OS%20X%2010.5%2064-bit/builds/5556/steps/test_11/logs/stdio
      http://buildlogs.mongodb.org/OS%20X%2010.5%2064-bit/builds/5556/test/sharding/auth_repl.js

      { "user" : "a", "readOnly" : false }
       m31001| Mon Jul  8 21:44:15.886 [repl writer worker 1] build index admin.system.users { _id: 1 }
       m31000| Mon Jul  8 21:44:15.886 [conn18]  authenticate db: test { authenticate: 1, nonce: "8ff1b65414b46bca", user: "a", key: "ae3ba84fc7997ecdcc40d180ba8ed59c" }
       m31001| Mon Jul  8 21:44:15.887 [repl writer worker 1] build index done.  scanned 0 total records. 0 secs
       m31001| Mon Jul  8 21:44:15.887 [repl writer worker 1] build index admin.system.users { user: 1, userSource: 1 }
       m31001| Mon Jul  8 21:44:15.888 [repl writer worker 1] build index done.  scanned 0 total records. 0 secs
       m31001| Mon Jul  8 21:44:15.888 [conn6]  authenticate db: test { authenticate: 1, nonce: "b005991f1a1b5dd6", user: "a", key: "8233ba10ff78ed256f6599ab0da197e8" }
      
       m31001| Mon Jul  8 21:44:15.889 [conn6] auth: couldn't find user a@test, test.system.users
      
      Mon Jul  8 21:44:15.889   Assertion failure _lastSlaveOkConn->isFailed() src/mongo/client/dbclient_rs.cpp 1484
      
      
      0x1000f830b 0x1000d563c 0x10005debd 0x1000ce9ee 0x1000b86d0 0x1001a4b70 0xdb7efd06362 
       m31001| Mon Jul  8 21:44:15.889 [repl writer worker 1] build index test.system.users { _id: 1 }
       m31001| Mon Jul  8 21:44:15.890 [repl writer worker 1] build index done.  scanned 0 total records. 0 secs
       m31001| Mon Jul  8 21:44:15.890 [repl writer worker 1] build index test.system.users { user: 1, userSource: 1 }
       m31001| Mon Jul  8 21:44:15.890 [repl writer worker 1] build index done.  scanned 0 total records. 0 secs
       0   mongo                               0x00000001000f830b _ZN5mongo15printStackTraceERSo + 43
       1   mongo                               0x00000001000d563c _ZN5mongo12verifyFailedEPKcS1_j + 284
       2   mongo                               0x000000010005debd _ZN5mongo18DBClientReplicaSet5_authERKNS_7BSONObjE + 225
       3   mongo                               0x00000001000ce9ee _ZN5mongo9mongoAuthEPNS_7V8ScopeERKN2v89ArgumentsE + 302
       4   mongo                               0x00000001000b86d0 _ZN5mongo7V8Scope10v8CallbackERKN2v89ArgumentsE + 116
       5   mongo                               0x00000001001a4b70 _ZN2v88internalL21Builtin_HandleApiCallENS0_12_GLOBAL__N_116BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE1EEEPNS0_7IsolateE + 464
       6   ???                                 0x00000db7efd06362 0x0 + 15083653587810
      Error: 0 assertion src/mongo/client/dbclient_rs.cpp:1484
      assert: [1] != [0] are not equal : undefined
      Error: Printing Stack Trace
          at printStackTrace (src/mongo/shell/utils.js:37:15)
          at doassert (src/mongo/shell/assert.js:6:5)
          at Function.assert.eq (src/mongo/shell/assert.js:32:5)
          at /data/buildslaves/OS_X_105_64bit/mongo/jstests/sharding/auth_repl.js:36:8
      Mon Jul  8 21:44:15.893 [1] != [0] are not equal : undefined at src/mongo/shell/assert.js:7
      failed to load: /data/buildslaves/OS_X_105_64bit/mongo/jstests/sharding/auth_repl.js
      

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            matt.kangas Matt Kangas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: